shithub: scc

Download patch

ref: 2b23214e403126795c483d79a85e840c1a3fe4ab
parent: a91402c720c0b7a791a0df888a2707cf497cb6fe
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Aug 26 09:46:11 EDT 2018

[tests/scc] Set system environment variables

After this commit the test tries to use the target system of
the host system. It makes easier to test it in different psystems.

--- a/tests/scc/execute/Makefile
+++ b/tests/scc/execute/Makefile
@@ -5,7 +5,7 @@
 all: tests
 
 tests:
-	CFLAGS='' SCCPREFIX=$(ROOT) PATH=$(ROOT)/bin:$$PATH ./chktest.sh scc-tests.lst
+	@CFLAGS='' SCCPREFIX=$(ROOT) PATH=$(ROOT)/bin:$$PATH ./chktest.sh scc-tests.lst
 
 clean:
 	rm -f *.as *.o *.ir *.qbe *core test.log
--- a/tests/scc/execute/chktest.sh
+++ b/tests/scc/execute/chktest.sh
@@ -8,6 +8,13 @@
 ulimit -c 0
 rm -f test.log
 
+SYS=`uname | tr A-Z a-z`
+FORMAT=elf
+ABI=sysv
+ARCH=amd64
+
+export SYS FORMAT ABI ARCH
+
 while read i state
 do
 	echo $i >>test.log
@@ -14,6 +21,7 @@
 	printf "%s\t" $i
 	printf "%s" $state
 	rm -f a.out
-	(scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>test.log &&
+
+	(scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>>test.log &&
 		echo "[OK]" || echo "[FAILED]"
 done < $file