Ignore line endings in test suite

This removes many false positives with Windows
This commit is contained in:
ISSOtm
2019-10-30 00:14:56 +01:00
parent 5a06fad31e
commit 8a90d74340
2 changed files with 17 additions and 17 deletions

View File

@@ -37,9 +37,9 @@ for i in *.asm; do
sed "s/$subst/-/g" ${i%.asm}.err > $desired_errput sed "s/$subst/-/g" ${i%.asm}.err > $desired_errput
fi fi
diff -u $desired_output $output diff -u --strip-trailing-cr $desired_output $output
rc=$(($? || $rc)) rc=$(($? || $rc))
diff -u $desired_errput $errput diff -u --strip-trailing-cr $desired_errput $errput
rc=$(($? || $rc)) rc=$(($? || $rc))
bin=${i%.asm}.out.bin bin=${i%.asm}.out.bin
@@ -48,7 +48,7 @@ for i in *.asm; do
dd if=$gb count=1 bs=$(printf %s $(wc -c < $bin)) > $output 2>/dev/null dd if=$gb count=1 bs=$(printf %s $(wc -c < $bin)) > $output 2>/dev/null
hexdump -C $output > $input && mv $input $output hexdump -C $output > $input && mv $input $output
hexdump -C $bin > $input hexdump -C $bin > $input
diff -u $input $output diff -u --strip-trailing-cr $input $output
rc=$(($? || $rc)) rc=$(($? || $rc))
fi fi
done done

View File

@@ -12,62 +12,62 @@ RGBLINK=../../rgblink
$RGBASM -o $otemp bank-numbers.asm $RGBASM -o $otemp bank-numbers.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff bank-numbers.out $outtemp diff --strip-trailing-cr bank-numbers.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
dd if=$gbtemp count=1 bs=20 > $otemp 2>/dev/null dd if=$gbtemp count=1 bs=20 > $otemp 2>/dev/null
diff bank-numbers.out.bin $otemp diff --strip-trailing-cr bank-numbers.out.bin $otemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBASM -o $otemp section-attributes.asm $RGBASM -o $otemp section-attributes.asm
$RGBLINK -l section-attributes.link -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -l section-attributes.link -o $gbtemp $otemp > $outtemp 2>&1
diff section-attributes.out $outtemp diff --strip-trailing-cr section-attributes.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBLINK -l section-attributes-mismatch.link -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -l section-attributes-mismatch.link -o $gbtemp $otemp > $outtemp 2>&1
diff section-attributes-mismatch.out $outtemp diff --strip-trailing-cr section-attributes-mismatch.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBASM -o $otemp wramx-dmg-mode.asm $RGBASM -o $otemp wramx-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff wramx-dmg-mode-no-d.out $outtemp diff --strip-trailing-cr wramx-dmg-mode-no-d.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
diff wramx-dmg-mode-d.out $outtemp diff --strip-trailing-cr wramx-dmg-mode-d.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBASM -o $otemp vram-fixed-dmg-mode.asm $RGBASM -o $otemp vram-fixed-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff vram-fixed-dmg-mode-no-d.out $outtemp diff --strip-trailing-cr vram-fixed-dmg-mode-no-d.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
diff vram-fixed-dmg-mode-d.out $outtemp diff --strip-trailing-cr vram-fixed-dmg-mode-d.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBASM -o $otemp vram-floating-dmg-mode.asm $RGBASM -o $otemp vram-floating-dmg-mode.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff vram-floating-dmg-mode-no-d.out $outtemp diff --strip-trailing-cr vram-floating-dmg-mode-no-d.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
diff vram-floating-dmg-mode-d.out $outtemp diff --strip-trailing-cr vram-floating-dmg-mode-d.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBASM -o $otemp romx-tiny.asm $RGBASM -o $otemp romx-tiny.asm
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
diff romx-tiny-no-t.out $outtemp diff --strip-trailing-cr romx-tiny-no-t.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1 $RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1
diff romx-tiny-t.out $outtemp diff --strip-trailing-cr romx-tiny-t.out $outtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBASM -o $otemp high-low-a.asm $RGBASM -o $otemp high-low-a.asm
$RGBLINK -o $gbtemp $otemp $RGBLINK -o $gbtemp $otemp
$RGBASM -o $otemp high-low-b.asm $RGBASM -o $otemp high-low-b.asm
$RGBLINK -o $gbtemp2 $otemp $RGBLINK -o $gbtemp2 $otemp
diff $gbtemp $gbtemp2 diff --strip-trailing-cr $gbtemp $gbtemp2
rc=$(($? || $rc)) rc=$(($? || $rc))
$RGBASM -o $otemp all-instructions.asm $RGBASM -o $otemp all-instructions.asm
$RGBLINK -o $gbtemp $otemp $RGBLINK -o $gbtemp $otemp
diff all-instructions.out.bin $gbtemp diff --strip-trailing-cr all-instructions.out.bin $gbtemp
rc=$(($? || $rc)) rc=$(($? || $rc))
rm -f $otemp $gbtemp $gbtemp2 $outtemp rm -f $otemp $gbtemp $gbtemp2 $outtemp