Simplified test-all.

- Tests scripts can be run directly, but only when cwd is the
  'tests' directory.
- Fixed a broken import missed in the previous commit.
This commit is contained in:
Andrew Hamilton 2017-06-28 11:38:29 +01:00
parent 09bfe79e65
commit 9e410fa796
2 changed files with 5 additions and 4 deletions

View file

@ -5,10 +5,11 @@
FAILURE=0
CODEBASE_PATH=$(realpath $(dirname $0))
for test in ${CODEBASE_PATH}/tests/*_test.py; do
CODEBASE_PATH=$(dirname $0)
cd ${CODEBASE_PATH}/tests
for test in *_test.py; do
echo "Testing $test ..."
python3 -m unittest ${test} 2>&1
./${test} 2>&1
FAILURE=$(($FAILURE | $?))
echo
done