shithub: scc

Download patch

ref: 2f5e19af99a0de4f591acc246cde5869815a4719
parent: d82055a0e5f8f818fb086b16f28d05d65b339cad
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Jun 21 04:29:02 EDT 2016

[test] Improve chktest.sh

--- a/tests/README
+++ b/tests/README
@@ -1,3 +1,2 @@
 These tests are taken from https://github.com/andrewchambers/qc.
-All the credits for this test suite are for Andrew Chambers
-https://github.com/andrewchambers/qc.
+All the credits for this test suite are for Andrew Chambers.
--- a/tests/chktest.sh
+++ b/tests/chktest.sh
@@ -1,20 +1,13 @@
 #!/bin/sh
 
+trap 'tabs -8' 0 1 2 3 15
 tabs 40
+ulimit -c 0
+
 for i in *.c
 do
+	printf "%s\t" $i
 	(set -e
-         rm -f a.out core
-	 scc -m qbe $i
-	 ./a.out
-        ) 2>/dev/null
-
-        if test $? -eq 0
-	then
-		st=[OK]
-	else
-		st=[FAIL]
-	fi
-	echo $i "\t" $st
+	 scc -m qbe $i && ./a.out
+	) 2>/dev/null && echo [OK] || echo [FAILED]
 done
-tabs -8