Commit 6e6c98a9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Initial checkin.

parent c03afcd3
#
# Generated from
# Copyright (C) 1996 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
#
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING. If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
# Begin LK_STD
srcdir = @srcdir@
VPATH = @srcdir@
SHELL = /bin/sh
all: binaries
AWK = @AWK@
CC = @CC@
CFLAGS = @CFLAGS@
ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
$(DEFS) $(CFLAGS)
DEPENDFLAG = @DEPENDFLAG@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LEX = @LEX@
MKDIR = mkdir
RANLIB = @RANLIB@
RM = rm -f
SED = @SED@
SYMLINK = @LN_S@
TOUCHLIB = @RANLIB@
YACC = @YACC@
INCLUDEDIR = @BUILDTOPDIR@/include
LIBDIR = @BUILDTOPDIR@/lib
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
dbdir = $(exec_prefix)/db
etcdir = $(exec_prefix)/etc
coredir = $(exec_prefix)/cores
DEFS = @DEFS@
LDFLAGS = @LDFLAGS@
CPPFLAGS = @CPPFLAGS@
SCRIPTDIR = @SRCTOPDIR@/scripts
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
FORCE:
# END section from LK_STD
LIBS = @LIBS@
KOMLIBS = $(LIBDIR)/libisc-new$(PROFILE-LIB-SUFFIX).a \
$(LIBDIR)/libmisc$(PROFILE-LIB-SUFFIX).a \
$(LIBDIR)/liblyskom-server$(PROFILE-LIB-SUFFIX).a \
$(LIBDIR)/libregex.a \
$(LIBDIR)/libansi$(PROFILE-LIB-SUFFIX).a
MALLOCLIB=`if [ "@GNUMALLOC@" = gnumalloc ];then echo $(LIBDIR)/libgmalloc$(PROFILE-LIB-SUFFIX).a;fi`
PROGRAMS = test-l2g
L2GOBJS = ../local_to_global.o
L2GOBJS = /users/inge/src/server/l2g.o
test-l2g: $(L2GOBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(KOMLIBS) $(MALLOCLIB) $(LIBS)
.gdbinit: Makefile
$(RM) -f .gdbinit
echo dir @SRCTOPDIR@/src/libraries/libcommon >.gdbinit
echo dir @SRCTOPDIR@/src/libraries/libansi >>.gdbinit
echo dir @SRCTOPDIR@/src/libraries/libisc-new >>.gdbinit
echo dir @SRCTOPDIR@/src/libraries/libmisc >>.gdbinit
echo dir @SRCTOPDIR@/src/libraries/gnumalloc >>.gdbinit
tags:
$(RM) TAGS
etags $(INCLUDEDIR)/*.h $(srcdir)/*.h \
@SRCTOPDIR@/src/libraries/libisc-new/src/*.h \
@SRCTOPDIR@/src/libraries/lib*/*.h \
@SRCTOPDIR@/src/server/*.h \
$(srcdir)/*.c \
@SRCTOPDIR@/src/server/*.c \
@SRCTOPDIR@/src/libraries/libisc-new/src/*.c \
@SRCTOPDIR@/src/libraries/lib*/*.c
check: l2g_check
l2g_check: test-l2g site.exp
runtest --tool l2g
site.exp: Makefile
echo "# this file is automatically generated" > site.exp
echo "set l2g ./test-l2g" >> site.exp
.PHONY: includes
includes: FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making includes in directory $$i; \
if (cd ./$$i; $(MAKE) includes); \
then true; else exit 1; fi ; \
else true; fi; \
done
.PHONY: libraries
libraries: FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making libraries in directory $$i; \
if (cd ./$$i; $(MAKE) libraries); \
then true; else exit 1; fi ; \
else true; fi; \
done
.PHONY: binaries
binaries: $(PROGRAMS) FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making binaries in directory $$i; \
if (cd ./$$i; $(MAKE) binaries); \
then true; else exit 1; fi ; \
else true; fi; \
done
.PHONY: install
install: FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making install in directory $$i; \
if (cd ./$$i; $(MAKE) install); \
then true; else exit 1; fi ; \
else true; fi; \
done
dependencies:
touch dependencies
include dependencies
.PHONY: depend
depend: $(C_SPECIALS) FORCE
$(CC) $(DEPENDFLAG) $(ALL_CFLAGS) $(srcdir)/*.c $(C_SPECIALS) \
>dependencies
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making depend in directory $$i; \
if (cd ./$$i; $(MAKE) depend); \
then true; else exit 1; fi ; \
else true; fi; \
done
# Output from LK_CLEAN
GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2 *.tmp $(SCRIPTS) $(PROGRAMS)
GENERIC-PURE = Makefile.in configure
GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile config.log config.cache
.PHONY: mostlyclean
mostlyclean: domostlyclean FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making mostlyclean in directory $$i; \
if (cd ./$$i; $(MAKE) mostlyclean); \
then true; else exit 1; fi ; \
else true; fi; \
done
.PHONY: clean
clean: doclean FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making clean in directory $$i; \
if (cd ./$$i; $(MAKE) clean); \
then true; else exit 1; fi ; \
else true; fi; \
done
.PHONY: distclean
distclean: dodistclean FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making distclean in directory $$i; \
if (cd ./$$i; $(MAKE) distclean); \
then true; else exit 1; fi ; \
else true; fi; \
done
.PHONY: realclean
realclean: dorealclean FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making realclean in directory $$i; \
if (cd ./$$i; $(MAKE) realclean); \
then true; else exit 1; fi ; \
else true; fi; \
done
.PHONY: pure
pure: dopure FORCE
@for i in DuMmY $(SUBDIRS); do \
if test -f $$i/Makefile ; then \
echo making pure in directory $$i; \
if (cd ./$$i; $(MAKE) pure); \
then true; else exit 1; fi ; \
else true; fi; \
done
dopure: dorealclean
$(RM) $(GENERIC-PURE)
dorealclean: dodistclean
dodistclean: doclean
$(RM) $(GENERIC-DISTCLEAN)
doclean: domostlyclean
domostlyclean:
$(RM) $(GENERIC-MOSTLYCLEAN)
# End output from LK_CLEAN
#
# $Id: Makefile.src,v 1.1 1996/08/25 18:39:39 ceder Exp $
# Copyright (C) 1996 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
#
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING. If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
LK_STD([binaries])
[
LIBS = @LIBS@
KOMLIBS = $(LIBDIR)/libisc-new$(PROFILE-LIB-SUFFIX).a \
$(LIBDIR)/libmisc$(PROFILE-LIB-SUFFIX).a \
$(LIBDIR)/liblyskom-server$(PROFILE-LIB-SUFFIX).a \
$(LIBDIR)/libregex.a \
$(LIBDIR)/libansi$(PROFILE-LIB-SUFFIX).a
MALLOCLIB=`if [ "@GNUMALLOC@" = gnumalloc ];then echo $(LIBDIR)/libgmalloc$(PROFILE-LIB-SUFFIX).a;fi`
PROGRAMS = test-l2g
L2GOBJS = ../local_to_global.o
L2GOBJS = /users/inge/src/server/l2g.o
test-l2g: $(L2GOBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(KOMLIBS) $(MALLOCLIB) $(LIBS)
.gdbinit: Makefile
$(RM) -f .gdbinit
echo dir @SRCTOPDIR@/src/libraries/libcommon >.gdbinit
echo dir @SRCTOPDIR@/src/libraries/libansi >>.gdbinit
echo dir @SRCTOPDIR@/src/libraries/libisc-new >>.gdbinit
echo dir @SRCTOPDIR@/src/libraries/libmisc >>.gdbinit
echo dir @SRCTOPDIR@/src/libraries/gnumalloc >>.gdbinit
tags:
$(RM) TAGS
etags $(INCLUDEDIR)/*.h $(srcdir)/*.h \
@SRCTOPDIR@/src/libraries/libisc-new/src/*.h \
@SRCTOPDIR@/src/libraries/lib*/*.h \
@SRCTOPDIR@/src/server/*.h \
$(srcdir)/*.c \
@SRCTOPDIR@/src/server/*.c \
@SRCTOPDIR@/src/libraries/libisc-new/src/*.c \
@SRCTOPDIR@/src/libraries/lib*/*.c
check: l2g_check
l2g_check: test-l2g site.exp
runtest --tool l2g
site.exp: Makefile
echo "# this file is automatically generated" > site.exp
echo "set l2g ./test-l2g" >> site.exp
]
define([prebinaries],[[$(PROGRAMS)]])dnl
dnl
LK_ALL_C_DEPEND
LK_DESCEND
set gnos { 125774 0 0 0 0 0 0 0 0 0 0 0 0 0 0 133120 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 149669 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 186661 0 0 0 0 0 0 191776 0 0 0 0 0 0 0 0 206984 0 0 0 209246 209676 0 0 220383 0 0 221290 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 261031 260540 0 0 0 0 0 275641 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 343330 0 0 0 0 0 0 0 0 0 0 0 0 0 0 382077 0 0 0 0 386538 0 0 0 0 0 0 0 0 0 0 0 0 403237 0 0 418462 0 0 0 438003 0 444906 449239 462189 0 495236 0 0 0 508860 0 534093 0 0 557873 0 567221 0 569719 0 0 572898 0 0 582801 0 0 589108 593683 0 0 0 630819 0 0 0 0 0 0 0 0 0 662415 666020 671541 0 0 0 0 0 680837 0 0 0 718901 0 0 722468 0 0 0 0 0 0 0 783378 784274 0 790900 0 0 0 0 806264 0 807356 0 0 841938 0 868517 0 0 0 0 0 918416 921595 0 928855 931805 0 957119 990192 0 0 0 0 1002208 0 1016709 1040762 1048418 0 0 1062992 0 0 0 0 0 0 0 0 0 0 0 0 1132441 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1299995 0 0 0 0 0 0 0 0 0 0 0 0 1301477 0 0 0 0 0 0 0 0 0 0 1305016 0 1305353 0 0 0 1306568 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1320736 1320758 0 0 0 0 0 0 0 0 0 0 0 0 1354855 1355009 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1376381 1376537 1376541 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1385636 1385671 0 0 0 0 0 0 0 1387253 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1437973 1438575 1439041 1440431 1443955 1443992 1444546 1445227 1445230 1445232 1445233 0 1445245 1445417 1445502 1445732 1450781 1452270 1452878 1453143 1453146 1453151 1453161 1454013 1454072 1454091 1454147 1459028 1461127 1465970 1468117 1474241 1474651 1474653 1474655 1477105 1477128 1477777 1478831 1478954 1479232 1479360 1479465 1480037 1480899 1484545 1484617 1484690 1484695 1486554 1486688 1488289 1492052 1492064 1492107 1499101 1499140 1499158 1499174 1499178 1499181 1499185 1499188 1499271 1499274 1506014 1506146 1506331 1506339 1506353 1506355 1506358 1506361 1506372 1506841 1506846 1511944 1512188 1513042 1516835 1516856 1516858 1516860 1516876 1516880 1516925 1516926 1516949 1516955 1517346 1517383 1517409 1517410 1517439 1517833 1517836 1517855 1517857 1517859 1517862 1517867 1517868 1517879 1517932 1517936 1517940 1517943 1517953 1517965 1517966 1517967 1517972 1517988 1518050 1518055 1518066 1518070 1518080 1518083 1518084 1518085 1518094 1518097 1518396 1518432 1518442 1518506 1518543 1518550 1518973 1519454 1519458 1519783 1520924 1520930 1520943 1520981 1521394 1522802 1522810 1522812 1526432 1526439 1526452 1526658 1526879 1526935 1526940 1526944 1527064 1527179 1527204 1527235 1527240 1527306 1528302 1528623 1528624 1530233 1530241 1530279 1530290 1530299 1530320 1530323 1531149 1531195 1531196 1531198 1531435 1531524 1531906 1532090 1532957 1533024 1533052 1533055 1533442 1534020 1534221 1534227 1535979 1536105 1536108 1537548 1537828 1537906 1538144 1538150 1538153 1539349 1539350 1539372 1539373 1539424 1539502 1539505 1539512 1539514 1539515 1541652 1541717 1542043 1542689 1542739 1542871 1542874 1542880 1543143 1543373 1543386 1543401 1543404 1543661 1543664 1543689 1544226 1544487 1544490 1544561 1544563 1544677 1544695 1544697 1544709 1545018 1545115 1545168 1545192 1545434 1545511 1545800 1545866 1546042 1546054 1546257 1548249 }
l2g_start
send_user "initializing\n"
# 0: add each number, even when the global number is 0
l2g_send "I0"
# 1: only add non-zero globals
l2g_send "I1"
# 2: add random number for zeroes and remove them immediately
l2g_send "I2"
# 2: add random number for zeroes and remove them in a separate pass
l2g_send "I3"
send_user "adding\n"
set lno 10
foreach gno $gnos {
l2g_send "a0 $lno $gno"
if {$gno} {
l2g_send "a1 $lno $gno"
l2g_send "a2 $lno $gno"
l2g_send "a3 $lno $gno"
} else {
l2g_send "a2 $lno 2423128"
l2g_send "a3 $lno 2423129"
l2g_send "l2 $lno"
simple_expect 2423128 "test 7"
l2g_send "d2 $lno"
l2g_send "l2 $lno"
simple_expect 0 "test 8"
}
incr lno
}
send_user "deleting\n"
set lno 10
foreach gno $gnos {
if {$gno == 0} {
l2g_send "l3 $lno"
simple_expect 2423129 "test 9"
l2g_send "d3 $lno"
l2g_send "l3 $lno"
simple_expect 0 "test 10"
}
incr lno
}
send_user "checking\n"
proc check {lno gno} {
l2g_send "l0 $lno"
simple_expect "$gno" "test 1 lookup up $lno"
l2g_send "l1 $lno"
simple_expect "$gno" "test 2 lookup up $lno"
l2g_send "l2 $lno"
simple_expect "$gno" "test 11 lookup up $lno"
l2g_send "l3 $lno"
simple_expect "$gno" "test 12 lookup up $lno"
}
foreach lno {0 1 2 3 4 5 6 7 8 9} {
check $lno 0
}
check 805 1548249
check 806 0
check 807 0
check 808 0
set lno 10
set plno 0
foreach gno $gnos {
if {$gno} {
while {$plno < $lno} {
l2g_send "n0 $plno"
simple_expect "$lno" "test 3 after $plno"
l2g_send "n1 $plno"
simple_expect "$lno" "test 4 after $plno"
l2g_send "n2 $plno"
simple_expect "$lno" "test 13 after $plno"
l2g_send "n3 $plno"
simple_expect "$lno" "test 14 after $plno"
incr plno
}
}
check $lno $gno
incr lno
}
l2g_send "n0 $plno"
simple_expect "0" "test 5 plno $plno"
l2g_send "n1 $plno"
simple_expect "0" "test 6 plno $plno"
l2g_send "n2 $plno"
simple_expect "0" "test 15 plno $plno"
l2g_send "n3 $plno"
simple_expect "0" "test 16 plno $plno"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment