Updated test runner
This commit is contained in:
parent
c3a711c3c9
commit
db8afb15d5
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "cif-tests"]
|
||||||
|
path = cif-tests
|
||||||
|
url = https://github.com/comes-group/cif-tests
|
1
cif-tests
Submodule
1
cif-tests
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b75d28c082b4355be605e111690dca0ebf15bcca
|
|
@ -1,8 +1,29 @@
|
||||||
#!/usr/bin/sh
|
#!/usr/bin/sh
|
||||||
|
|
||||||
for image in ../cif-tests/valid/*.cif; do
|
exit_code=0
|
||||||
|
|
||||||
|
echo "--- Valid tests: ---"
|
||||||
|
for image in cif-tests/valid/*.cif; do
|
||||||
echo "Running test on $image"
|
echo "Running test on $image"
|
||||||
./zardzewialy-dekoder-cif $image aaa.png
|
stderr="$(./zardzewialy-dekoder-cif $image aaa.png 2>&1 > /dev/null)"
|
||||||
echo ""
|
if [[ ${#stderr} != 0 ]]; then
|
||||||
|
echo "Failed on a valid test:"
|
||||||
|
echo $stderr
|
||||||
|
exit_code=1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "--- Invalid tests: ---"
|
||||||
|
for image in cif-tests/invalid/*.cif; do
|
||||||
|
echo "Running test on $image"
|
||||||
|
stderr="$(./zardzewialy-dekoder-cif $image aaa.png 2>&1 /dev/null)"
|
||||||
|
if [[ ${#stderr} == 0 ]]; then
|
||||||
|
echo "Error: preduced an invalid image"
|
||||||
|
exit_code=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
rm aaa.png
|
||||||
|
exit $exit_code
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue