ref: ec6c42e9d60d3695e89f675588195597efbf32ff
parent: 1bd41bf79ae9af867e473f13ca23d036f6f27174
parent: cdf6000618fddd6fc89ba401248c80f7ac4aa313
author: Eldred Habert <[email protected]>
date: Tue Jan 28 13:59:11 EST 2020
Merge pull request #467 from ISSOtm/report Report failing file names in comparisons
--- a/test/asm/test.sh
+++ b/test/asm/test.sh
@@ -8,6 +8,14 @@
errput=$(mktemp)
rc=0
+tryDiff () {
+ diff -u --strip-trailing-cr $1 $2 || (echo -e "\033[1;31m${i%.asm}.$3$variant mismatch!\033[0;0m"; false)
+}
+
+tryCmp () {
+ cmp $1 $2 || (echo -e "\033[1;31m${i%.asm}.bin$variant mismatch!\033[0;0m"; false)
+}
+
for i in *.asm; do
for variant in '' '.pipe'; do
if [ -z "$variant" ]; then
@@ -37,9 +45,9 @@
sed "s/$subst/-/g" ${i%.asm}.err > $desired_errput
fi
- diff -u --strip-trailing-cr $desired_output $output
+ tryDiff $desired_output $output out
our_rc=$?
- diff -u --strip-trailing-cr $desired_errput $errput
+ tryDiff $desired_errput $errput err
our_rc=$(($? || $our_rc))
bin=${i%.asm}.out.bin
@@ -48,7 +56,7 @@
dd if=$gb count=1 bs=$(printf %s $(wc -c < $bin)) > $output 2>/dev/null
hexdump -C $output > $input && mv $input $output
hexdump -C $bin > $input
- cmp $input $output
+ tryCmp $input $output
our_rc=$(($? || $our_rc))
fi