summaryrefslogtreecommitdiff
path: root/tests/run.sh
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-09-01 11:02:55 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2022-09-01 11:02:55 +0200
commit47e7d3a9da2aafcf438c78ad1d74ac2288a77cd3 (patch)
tree2bafc08234eec8f756b1eeefa7f59df5737f7710 /tests/run.sh
parent2b2cb091459f050f94c966a8e49fa70d8ccde395 (diff)
Switch to run.py
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-xtests/run.sh43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/run.sh b/tests/run.sh
deleted file mode 100755
index 98f0a23..0000000
--- a/tests/run.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env bash
-
-wai=$(dirname $(readlink -f "$0")) # Current script directory
-tests=$(ls -d ${wai}/*/) # Find tests
-out=$(mktemp)
-test_timeout=20
-abort=1
-
-for test in ${tests}
-do
- printf "%-50s%s %s" "- $(basename $test)" "=>"
- cd $test
- timeout $test_timeout ./simulator.py &> "$out"
-
- # Ensure timeout
- if [ $? -eq 124 ]
- then
- echo "failed :("
- echo "------------- Test timeout (should not exceed ${test_timeout}s) -------------"
- cat "$out";
- rm "$out"
- exit 2
- fi
-
- # Ensure test output
- if [ "$(base64 $out)" = "$(base64 ./out)" ]
- then
- echo "passed"
- else
- echo "failed :("
- echo "------------- Expected -------------"
- cat out
- echo "------------- Got -------------"
- cat "$out";
- rm "$out"
- [ $abort -eq 1 ] && exit 1
- fi
-
- # Prepare for next test
- cd - &>/dev/null
-done
-
-rm "$out"