ref: 4b683708fc97121cabae5a725f3feec987cf2ab4
parent: c13f5c7b6fd0122187512da4c42dac57825bda24
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Oct 7 18:03:06 EDT 2019
[tests] Update shell scripts to new cc name and dir layout
--- a/tests/ar/execute/Makefile
+++ b/tests/ar/execute/Makefile
@@ -5,7 +5,7 @@
all: tests
tests: master.a
- @TZ=UTC PATH=$(ROOT)/bin:$$PATH chktest.sh
+ @TZ=UTC PATH=$(ROOT)/bin:$$PATH ./chktest.sh
master.a:
./mkmaster.sh
--- a/tests/cc/error/Makefile
+++ b/tests/cc/error/Makefile
@@ -1,11 +1,13 @@
.POSIX:
-ROOT=../../../root
+ROOT=../../..
+SCCPREFIX=$(ROOT)
+CC=$(ROOT)/bin/cc
all: tests
tests:
- @CFLAGS='' SCCPREFIX=$(ROOT) PATH=$(ROOT)/bin:$$PATH chktest.sh scc-tests.lst
+ CC=$(CC) SCCPREFIX=$(SCCPREFIX) ./chktest.sh scc-tests.lst
clean:
rm -f *.as *.o *.ir *.qbe *core test.log
--- a/tests/cc/error/chktest.sh
+++ b/tests/cc/error/chktest.sh
@@ -11,11 +11,11 @@
while read i state
do
echo $i >> test.log
- state=${state:-"\t"}
+ state=${state:-""}
- scc $CFLAGS -w -c $i 2> $err
- echo "/^PATTERN/+;/^\./-w $chk" | ed -s $i
- diff -c $chk $err >> test.log && printf '[PASS]' || echo '[FAIL]'
- printf "%s\t%s\n" "$state" "$i"
+ (SCCPREFIX=$SCCPREFIX $CC $CFLAGS -w -c $i) 2> $err
+ (echo "/^PATTERN/+;/^\./-w $chk" | ed -s $i) >/dev/null 2>&1
+ diff -c $chk $err >> test.log && printf '[PASS]' || printf '[FAIL]'
+ printf "\t%s\t%s\n" $i $state
rm -f *.o
done < $file
--- a/tests/cc/error/update.sh
+++ b/tests/cc/error/update.sh
@@ -3,7 +3,7 @@
for i
do
(echo '/^PATTERN/+;/^\./-c'
- scc $CFLAGS -w -c $i 2>&1
+ cc $CFLAGS -w -c $i 2>&1
printf ".\nw\n"
echo w) |
ed -s $i
--- a/tests/cc/execute/Makefile
+++ b/tests/cc/execute/Makefile
@@ -1,11 +1,13 @@
.POSIX:
ROOT=../../..
+SCCPREFIX=$(ROOT)
+CC=$(ROOT)/bin/cc
all: tests
tests:
- @CFLAGS='' SCCPREFIX=$(ROOT) PATH=$(ROOT)/bin:$$PATH ./chktest.sh scc-tests.lst
+ @CC=$(CC) SCCPREFIX=$(SCCPREFIX) ./chktest.sh scc-tests.lst
clean:
rm -f *.as *.o *.ir *.qbe *core test.log
--- a/tests/cc/execute/chktest.sh
+++ b/tests/cc/execute/chktest.sh
@@ -18,7 +18,7 @@
state=${state:-""}
rm -f a.out
- (scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>>test.log &&
+ (SCCPREFIX=$SCCPREFIX $CC -Isysinclude $CFLAGS "$i" && ./a.out) 2>>test.log &&
printf '[PASS]' || printf '[FAIL]'
printf '\t%s\t%s\n' $i $state
done < $file