Installing posix tests in /usr/tests/minix-posix
The goal is to enable anyone to simply run our current test suite. Change-Id: I27d8856cb82a4be2baa5dc5273526383b7f4fc2c
This commit is contained in:
@@ -1,38 +1,65 @@
|
||||
DBG=-O0 -g
|
||||
CFLAGS+= -Wall -Werror -fno-builtin
|
||||
LDADD+= -lm -lcompat_minix
|
||||
BINDIR?= /usr/tests/minix-posix
|
||||
WARNS?= 1
|
||||
|
||||
# Tests have no manpages
|
||||
MKMAN=no
|
||||
MKMAN= no
|
||||
|
||||
# They are all bin-owned; by default normal executable mode
|
||||
BINOWN=root
|
||||
BINOWN= bin
|
||||
|
||||
# Some have special flags compiling
|
||||
CFLAGS.test51=-mhard-float
|
||||
CFLAGS.test52=-mhard-float
|
||||
|
||||
# Some have special libraries
|
||||
LDADD.test59= -lmthread
|
||||
LDFLAGS.mod= -shared # make shared object
|
||||
|
||||
# Some have an extra file
|
||||
OBJS.test57=test57loop.o
|
||||
|
||||
.for t in \
|
||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
|
||||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
|
||||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
|
||||
61 62 64 65 66 67 68
|
||||
PROG+= test$(t)
|
||||
.endfor
|
||||
|
||||
PROG+= t10a t11a t11b t40a t40b t40c t40d t40e t40f t60a t60b \
|
||||
t67a t67b t68a t68b
|
||||
CFLAGS+= -fno-builtin
|
||||
LDADD+= -lm -lcompat_minix
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
.if $(MKPIC) == "yes"
|
||||
# Some have special flags compiling
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# LSC FIXME: Compilation error for now on ARM with that!
|
||||
COPTS.test51.c= -mhard-float
|
||||
COPTS.test52.c= -mhard-float
|
||||
.endif
|
||||
|
||||
COPTS.test9.c= -O0
|
||||
COPTS.test37.c= -O0
|
||||
COPTS.test53.c= -O0
|
||||
COPTS.test68.c= -O0
|
||||
|
||||
# Some have special libraries
|
||||
LDADD.test59= -lmthread
|
||||
LDFLAGS.mod= -shared # make shared object
|
||||
|
||||
# Some have an extra file
|
||||
OBJS.test57= test57loop.o
|
||||
|
||||
# Tests to compile, For every architecture
|
||||
MINIX_TESTS= \
|
||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
|
||||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
|
||||
41 42 43 44 45 46 48 49 50 52 53 54 55 56 58 59 60 \
|
||||
61 64 65 66 67 68
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
MINIX_TESTS+= \
|
||||
47 51 57 \
|
||||
62
|
||||
.endif # ${MACHINE_ARCH} == "i386"
|
||||
|
||||
.if ${MACHINE_ARCH} == "earm"
|
||||
# LSC Not yet supported on ARM
|
||||
MKPIC:= no
|
||||
LDSTATIC:= -static
|
||||
.endif
|
||||
|
||||
.for t in ${MINIX_TESTS}
|
||||
PROGS+= test${t}
|
||||
.endfor
|
||||
|
||||
PROGS+= t10a t11a t11b t40a t40b t40c t40d t40e t40f t60a t60b \
|
||||
t67a t67b t68a t68b
|
||||
|
||||
SCRIPTS+= run testinterp.sh testsh1.sh testsh2.sh
|
||||
|
||||
.if ${MKPIC} == "yes"
|
||||
# Build them as dynamic executables by default if shared libraries
|
||||
# are available; so that the building and executing of dynamic
|
||||
# executables is tested
|
||||
@@ -40,19 +67,12 @@ LDSTATIC= -dynamic
|
||||
|
||||
# Add test that must be linked dynamically, and its dynamically loaded
|
||||
# module
|
||||
PROG+= test63 mod
|
||||
PROGS+= test63 mod
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
# Some are suid-root
|
||||
all:
|
||||
chmod 4755 test11 test33 test43 test44 test46 test56 test60 test61 \
|
||||
test65
|
||||
|
||||
# LSC Make sure there is not leftover after a failed testrun
|
||||
clean: .PHONY .MAKE
|
||||
$(MAKE) -C select clean
|
||||
rm -rf *.o *.s *.bak test? test?? t10a t11a t11b \
|
||||
t40a t40b t40c t40d t40e t40f \
|
||||
t60a t60b t67a t67b t68a t68b \
|
||||
DIR*
|
||||
rm -rf DIR*
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
7
test/run
7
test/run
@@ -11,6 +11,9 @@ skipped=`expr 0` # count number of tests that were skipped
|
||||
total=`expr 0` # total number of tests tried
|
||||
badones= # list of tests that failed
|
||||
|
||||
# Tests which require setuid
|
||||
setuids="test11 test33 test43 test44 test46 test56 test60 test61 test65"
|
||||
|
||||
tests=" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
|
||||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
|
||||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
|
||||
@@ -21,6 +24,10 @@ tests_no=`expr 0`
|
||||
# Directory must be owned by bin
|
||||
[ "$USER" != root ] || chown bin .
|
||||
|
||||
# If root, make sure the setuid tests have the correct permissions
|
||||
[ "$USER" = root ] && chown root ${setuids}
|
||||
[ "$USER" = root ] && chmod 4755 ${setuids}
|
||||
|
||||
# Count tests
|
||||
for i in `echo $tests`; do
|
||||
if [ -x ./test$i ]; then
|
||||
|
||||
0
test/test48.c
Executable file → Normal file
0
test/test48.c
Executable file → Normal file
0
test/test49.c
Executable file → Normal file
0
test/test49.c
Executable file → Normal file
Reference in New Issue
Block a user