aboutsummaryrefslogtreecommitdiff
path: root/tests/test_unittests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_unittests.sh')
-rwxr-xr-xtests/test_unittests.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/test_unittests.sh b/tests/test_unittests.sh
new file mode 100755
index 0000000..802cc49
--- /dev/null
+++ b/tests/test_unittests.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+ALL_OUTPUT=0
+
+test () {
+ python tests/unit_tests/$1
+ if [ "$?" -eq "1" ]; then
+ tput setaf 1
+ echo "$1 NOT OK:"
+ tput sgr0
+ exit 1
+ else
+ tput setaf 2
+ echo "$1 OK"
+ tput sgr0
+ fi
+}
+
+if [ "$#" -eq 1 ]; then
+ ALL_OUTPUT=1
+ test $1
+else
+ for file in tests/unit_tests/*; do
+ test "$(basename $file)"
+ done
+fi
+