[hackers] [scc] [tests] Improve Makefile infrastructure || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 6 Mar 2017 17:00:09 +0100 (CET)

commit ec8f82c9f549565ab4efa20b9d85b249a194f099
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Mar 6 16:43:27 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Mar 6 17:00:00 2017 +0100

    [tests] Improve Makefile infrastructure

diff --git a/Makefile b/Makefile
index 90c08b2..6434f50 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -33,7 +33,7 @@ libc: libc/src/libc.a
         cd libc/src && $(MAKE) -e CC=scc
 
 tests: all
- cd tests/execute && $(MAKE) -e tests
+ cd tests && $(MAKE) -e all
 
 install: all
         mkdir -p $(DESTDIR)/$(PREFIX)/libexec/scc/
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..2fca733
--- /dev/null
+++ b/tests/Makefile
_AT_@ -0,0 +1,4 @@
+
+all clean:
+ cd error && make -e $_AT_
+ cd execute && make -e $_AT_
diff --git a/tests/error/Makefile b/tests/error/Makefile
index a71126d..87c9fc6 100644
--- a/tests/error/Makefile
+++ b/tests/error/Makefile
_AT_@ -5,5 +5,5 @@ tests:
         CFLAGS='' SCCEXECPATH=../../bin PATH=../../bin:$$PATH ./chktest.sh < scc-tests.lst
 
 clean:
- rm -f *.as *.o *.ir *.qbe *core
+ rm -f *.as *.o *.ir *.qbe *core test.log
 
diff --git a/tests/error/chktest.sh b/tests/error/chktest.sh
index c39e3f8..e92cbb2 100755
--- a/tests/error/chktest.sh
+++ b/tests/error/chktest.sh
_AT_@ -6,9 +6,11 @@ chk=/tmp/$$.chk
 trap "tabs -8;rm -f a.out *.o $err" 0 1 2 3 15
 tabs 40
 ulimit -c 0
+rm -f test.log
 
 while read i state
 do
+ echo $i >> test.log
         printf "%s\t" $i
         printf "%s" $state
 
diff --git a/tests/execute/Makefile b/tests/execute/Makefile
index 08761f2..2df8368 100644
--- a/tests/execute/Makefile
+++ b/tests/execute/Makefile
_AT_@ -4,4 +4,4 @@ all: tests
 tests:
         CFLAGS='' SCCEXECPATH=../../bin PATH=../../bin:$$PATH ./chktest.sh < scc-tests.lst
 clean:
- rm -f *.as *.o *.ir *.qbe *core
+ rm -f *.as *.o *.ir *.qbe *core test.log
diff --git a/tests/execute/chktest.sh b/tests/execute/chktest.sh
index 91a49df..6aa42d6 100755
--- a/tests/execute/chktest.sh
+++ b/tests/execute/chktest.sh
_AT_@ -3,12 +3,14 @@
 trap 'tabs -8;rm -f a.out' 0 1 2 3 15
 tabs 40
 ulimit -c 0
+rm -f test.log
 
 while read i state
 do
+ echo $i >>test.log
         printf "%s\t" $i
         printf "%s" $state
         rm -f a.out
- (scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>/dev/null &&
+ (scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>test.log &&
                 echo [OK] || echo [FAILED]
 done
Received on Mon Mar 06 2017 - 17:00:09 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 06 2017 - 17:12:15 CET