eris/test-all

25 lines
490 B
Text
Raw Normal View History

2015-12-14 18:03:11 +00:00
#!/bin/bash
2019-02-04 11:48:47 +10:00
# Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved.
2017-06-01 01:03:39 +01:00
# Licensed under the Artistic License 2.0.
2015-12-14 18:03:11 +00:00
FAILURE=0
CODEBASE_PATH=$(dirname $0)
cd ${CODEBASE_PATH}/tests
for test in *_test.py; do
2015-12-14 18:03:11 +00:00
echo "Testing $test ..."
./${test} 2>&1
FAILURE=$(($FAILURE | $?))
2015-12-14 18:03:11 +00:00
echo
done
if [ $FAILURE -eq 0 ]; then
2016-11-10 17:58:40 +01:00
echo -e "\e[32m" # Green
echo "Tests passed."
else
2016-11-10 17:58:40 +01:00
echo -e "\e[91m" # Red
echo "Tests failed."
fi
2016-11-10 17:58:40 +01:00
echo -e "\e[39m" # Normal
exit $FAILURE