ref: 2b5ad9dc38f160c5f883fd7c94c60cd473eddd1a
parent: 5679c7066b0f7365f0696fd07f539e5b9dd82a7d
author: Antonio Niño Díaz <[email protected]>
date: Mon Apr 10 18:10:10 EDT 2017
Make test scripts return error code Make them executable. Signed-off-by: Antonio Niño Díaz <[email protected]>
--- a/test/asm/test.sh
+++ b/test/asm/test.sh
@@ -1,8 +1,10 @@
fname=$(mktemp)
+rc=0
for i in *.asm; do
../../rgbasm $i >$fname 2>&1
diff -u $fname ${i%.asm}.out
+ rc=$(($? || $rc))
done
-exit 0
+exit $rc
--- a/test/link/test.sh
+++ b/test/link/test.sh
@@ -2,6 +2,7 @@
gbtemp=$(mktemp)
gbtemp2=$(mktemp)
outtemp=$(mktemp)
+rc=0
RGBASM=../../rgbasm
RGBLINK=../../rgblink
@@ -9,32 +10,42 @@
$RGBASM -o $otemp bank-numbers.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff bank-numbers.out $outtemp
+rc=$(($? || $rc))
head -c 20 $gbtemp > $otemp 2>&1
diff bank-numbers.out.bin $otemp
+rc=$(($? || $rc))
$RGBASM -o $otemp wramx-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff wramx-dmg-mode-no-d.out $outtemp
+rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
diff wramx-dmg-mode-d.out $outtemp
+rc=$(($? || $rc))
$RGBASM -o $otemp vram-fixed-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff vram-fixed-dmg-mode-no-d.out $outtemp
+rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
diff vram-fixed-dmg-mode-d.out $outtemp
+rc=$(($? || $rc))
$RGBASM -o $otemp vram-floating-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff vram-floating-dmg-mode-no-d.out $outtemp
+rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
diff vram-floating-dmg-mode-d.out $outtemp
+rc=$(($? || $rc))
$RGBASM -o $otemp romx-tiny.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff romx-tiny-no-t.out $outtemp
+rc=$(($? || $rc))
$RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1
diff romx-tiny-t.out $outtemp
+rc=$(($? || $rc))
$RGBASM -o $otemp high-low-a.asm
$RGBLINK -o $gbtemp $otemp
@@ -41,5 +52,6 @@
$RGBASM -o $otemp high-low-b.asm
$RGBLINK -o $gbtemp2 $otemp
diff $gbtemp $gbtemp2
+rc=$(($? || $rc))
-exit 0
+exit $rc