diff options
| author | Scott Gasch <[email protected]> | 2021-09-15 09:32:08 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2021-09-15 09:32:08 -0700 |
| commit | 4c315e387f18010ba0b5661744ad3c792f21d2d1 (patch) | |
| tree | a5657340bea356aa3aaf2c24b7f2be98bb4bc302 /tests | |
| parent | 83c1e0d04fe2e78963c8b508e8b7d0ae03bfcb16 (diff) | |
Adding doctests. Also added a logging filter.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/run_tests.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 6e0c30c..9623f1b 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -78,10 +78,11 @@ if [ ${DOCTEST} -eq 1 ]; then BASE="${BASE} (doctest)" make_header "${BASE}" "${CYAN}" OUT=$( python3 ${doctest} 2>&1 ) - if [ "$OUT" == "" ]; then + FAILED=$( echo "${OUT}" | grep '\*\*\*Test Failed\*\*\*' | wc -l ) + if [ $FAILED == 0 ]; then echo "OK" else - echo -e "${OUT}" + echo -e "${FAILED}" FAILURES=$((FAILURES+1)) fi done @@ -112,5 +113,11 @@ if [ ${INTEGRATION} -eq 1 ]; then fi if [ ${FAILURES} -ne 0 ]; then - echo -e "${RED}There were ${FAILURES} failure(s).${NC}" + if [ ${FAILURES} -eq 1 ]; then + echo -e "${RED}There was ${FAILURES} failure.${NC}" + else + echo -e "${RED}There were ${FAILURES} failures.${NC}" + fi +else + echo -e "${GREEN}Everything looks good.${NC}" fi |
