diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..f588bd6 --- /dev/null +++ b/test.sh @@ -0,0 +1,24 @@ +#!/bin/sh +set -e + +count_ok=0 +count_failed=0 + +for test in tests/*.sh; do + echo "== $test" + $test && result=$? || result=$? + + if [[ $result = 0 ]]; then + echo "✔" + count_ok=$((count_ok+1)) + else + echo "❌" + count_failed=$((count_failed+1)) + fi + echo +done + +echo "$count_ok ok, $count_failed failed" +if [[ $count_failed -gt 0 ]]; then + exit 1 +fi diff --git a/test-core.sh b/tests/test-core.sh similarity index 100% rename from test-core.sh rename to tests/test-core.sh diff --git a/test-dinglehopper.sh b/tests/test-dinglehopper.sh similarity index 100% rename from test-dinglehopper.sh rename to tests/test-dinglehopper.sh diff --git a/test-eynollah.sh b/tests/test-eynollah.sh similarity index 100% rename from test-eynollah.sh rename to tests/test-eynollah.sh diff --git a/test-ocrd_anybaseocr.sh b/tests/test-ocrd_anybaseocr.sh similarity index 100% rename from test-ocrd_anybaseocr.sh rename to tests/test-ocrd_anybaseocr.sh diff --git a/test-ocrd_calamari.sh b/tests/test-ocrd_calamari.sh similarity index 100% rename from test-ocrd_calamari.sh rename to tests/test-ocrd_calamari.sh diff --git a/test-ocrd_cis.sh b/tests/test-ocrd_cis.sh similarity index 100% rename from test-ocrd_cis.sh rename to tests/test-ocrd_cis.sh diff --git a/test-ocrd_fileformat.sh b/tests/test-ocrd_fileformat.sh similarity index 100% rename from test-ocrd_fileformat.sh rename to tests/test-ocrd_fileformat.sh diff --git a/test-ocrd_olena.sh b/tests/test-ocrd_olena.sh similarity index 100% rename from test-ocrd_olena.sh rename to tests/test-ocrd_olena.sh diff --git a/test-ocrd_segment.sh b/tests/test-ocrd_segment.sh similarity index 100% rename from test-ocrd_segment.sh rename to tests/test-ocrd_segment.sh diff --git a/test-ocrd_tesserocr.sh b/tests/test-ocrd_tesserocr.sh similarity index 100% rename from test-ocrd_tesserocr.sh rename to tests/test-ocrd_tesserocr.sh diff --git a/test-ocrd_trocr.sh b/tests/test-ocrd_trocr.sh similarity index 100% rename from test-ocrd_trocr.sh rename to tests/test-ocrd_trocr.sh diff --git a/test-ocrd_wrap.sh b/tests/test-ocrd_wrap.sh similarity index 100% rename from test-ocrd_wrap.sh rename to tests/test-ocrd_wrap.sh diff --git a/test-sbb_binarization.sh b/tests/test-sbb_binarization.sh similarity index 100% rename from test-sbb_binarization.sh rename to tests/test-sbb_binarization.sh