[hackers] [scc] [tests] Execute all the tests always || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 6 Mar 2017 15:44:37 +0100 (CET)

commit e86e08ba21d753c4e5946f31e0639ca07bee3727
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Mar 6 14:54:29 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Mar 6 14:54:29 2017 +0100

    [tests] Execute all the tests always
    
    It is a good idea to execute all the tests always because it allows us
    to discover TODOs that are not longer TODOs. This patch also introduces
    the use of CFLAGS in tests, which allows to execute the test for different
    architectures.

diff --git a/tests/execute/Makefile b/tests/execute/Makefile
index 267289a..08761f2 100644
--- a/tests/execute/Makefile
+++ b/tests/execute/Makefile
_AT_@ -2,6 +2,6 @@
 all: tests
 
 tests:
- SCCEXECPATH=../../bin PATH=../../bin:$$PATH ./chktest.sh < scc-tests.lst
+ CFLAGS='' SCCEXECPATH=../../bin PATH=../../bin:$$PATH ./chktest.sh < scc-tests.lst
 clean:
         rm -f *.as *.o *.ir *.qbe *core
diff --git a/tests/execute/chktest.sh b/tests/execute/chktest.sh
index 9ca9d9d..91a49df 100755
--- a/tests/execute/chktest.sh
+++ b/tests/execute/chktest.sh
_AT_@ -7,12 +7,8 @@ ulimit -c 0
 while read i state
 do
         printf "%s\t" $i
- if test "$state" = TODO
- then
- echo '[TODO]'
- else
- rm -f a.out
- (scc -Isysinclude -m qbe "$i" && ./a.out) 2>/dev/null &&
- echo [OK] || echo [FAILED]
- fi
+ printf "%s" $state
+ rm -f a.out
+ (scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>/dev/null &&
+ echo [OK] || echo [FAILED]
 done
diff --git a/tests/execute/scc-tests.lst b/tests/execute/scc-tests.lst
index eda9f33..aa72811 100644
--- a/tests/execute/scc-tests.lst
+++ b/tests/execute/scc-tests.lst
_AT_@ -52,7 +52,7 @@
 0054-struct.c
 0055-enum.c
 0056-enum.c
-0057-duff.c TODO
+0057-duff.c [TODO]
 0058-bug.c
 0059-multistring.c
 0060-charlit.c
_AT_@ -86,12 +86,12 @@
 0091-fptr.c
 0092-fptr.c
 0093-arrayinit.c
-0094-arrayinit.c TODO
+0094-arrayinit.c [TODO]
 0095-arrayselector.c
 0096-inferredarraysize.c
 0097-extern.c
-0098-tentative.c TODO
-0099-tentative.c TODO
+0098-tentative.c [TODO]
+0099-tentative.c [TODO]
 0102-bug.c
 0103-voidparm.c
 0104-qbebug.c
_AT_@ -104,15 +104,15 @@
 0111-doubledef.c
 0112-cond.c
 0113-externredecl.c
-0114-shortassig.c TODO
+0114-shortassig.c [TODO]
 0115-null-comparision.c
-0116-floatcmp.c TODO
+0116-floatcmp.c [TODO]
 0117-pointarith.c
-0118-voidmain.c TODO
+0118-voidmain.c [TODO]
 0119-macrostr.c
 0120-funpar.c
-0121-localinit.c TODO
-0122-localinit.c TODO
-0123-doubleconst.c TODO
-0124-enumstruct.c TODO
+0121-localinit.c [TODO]
+0122-localinit.c [TODO]
+0123-doubleconst.c [TODO]
+0124-enumstruct.c [TODO]
 0125-fundcl.c
Received on Mon Mar 06 2017 - 15:44:37 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 06 2017 - 15:48:18 CET