#!/bin/bash # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. FAILURE=0 CODEBASE_PATH=$(dirname $0) cd ${CODEBASE_PATH}/tests for test in *_test.py; do echo "Testing $test ..." ./${test} 2>&1 FAILURE=$(($FAILURE | $?)) echo done if [ $FAILURE -eq 0 ]; then echo -e "\e[32m" # Green echo "Tests passed." else echo -e "\e[91m" # Red echo "Tests failed." fi echo -e "\e[39m" # Normal exit $FAILURE