SameBoy/.github/actions/sanity_tests.sh

33 lines
1.1 KiB
Bash
Raw Permalink Normal View History

2020-04-25 14:12:53 +00:00
set -e
2020-04-25 13:59:47 +00:00
./build/bin/tester/sameboy_tester --jobs 5 \
2021-10-07 15:30:09 +00:00
--length 45 .github/actions/cgb_sound.gb \
2020-04-25 13:59:47 +00:00
--length 10 .github/actions/cgb-acid2.gbc \
--length 10 .github/actions/dmg-acid2.gb \
2021-10-07 15:30:09 +00:00
--dmg --length 45 .github/actions/dmg_sound-2.gb \
2020-04-25 13:59:47 +00:00
--dmg --length 20 .github/actions/oam_bug-2.gb
mv .github/actions/dmg{,-mode}-acid2.bmp
./build/bin/tester/sameboy_tester \
--dmg --length 10 .github/actions/dmg-acid2.gb
2020-04-25 15:11:01 +00:00
set +e
2020-04-25 13:59:47 +00:00
FAILED_TESTS=`
2021-10-05 16:53:19 +00:00
shasum .github/actions/*.bmp | grep -E -v \(\
5283564df0cf5bb78a7a90aff026c1a4692fd39e\ \ .github/actions/cgb-acid2.bmp\|\
2020-04-25 13:59:47 +00:00
dbcc438dcea13b5d1b80c5cd06bda2592cc5d9e0\ \ .github/actions/cgb_sound.bmp\|\
0caadf9634e40247ae9c15ff71992e8f77bbf89e\ \ .github/actions/dmg-acid2.bmp\|\
2021-10-05 16:53:19 +00:00
a732077f98f43d9231453b1764d9f797a836924d\ \ .github/actions/dmg-mode-acid2.bmp\|\
2020-04-25 13:59:47 +00:00
c9e944b7e01078bdeba1819bc2fa9372b111f52d\ \ .github/actions/dmg_sound-2.bmp\|\
f0172cc91867d3343fbd113a2bb98100074be0de\ \ .github/actions/oam_bug-2.bmp\
\)`
if [ -n "$FAILED_TESTS" ] ; then
echo "Failed the following tests:"
2021-10-05 16:53:19 +00:00
echo $FAILED_TESTS | tr " " "\n" | grep -o -E "[^/]+\.bmp" | sed s/.bmp// | sort
2020-04-25 13:59:47 +00:00
exit 1
fi
echo Passed all tests