From 0107d39b632b748dffe5f419d08517ea3f6fc866 Mon Sep 17 00:00:00 2001 From: Sean Law Date: Sun, 14 Jul 2024 00:39:45 -0400 Subject: [PATCH] Show elapsed time for unit/coverage tests --- test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test.sh b/test.sh index e76b54135..bd2485712 100755 --- a/test.sh +++ b/test.sh @@ -196,6 +196,7 @@ test_custom() test_unit() { echo "Testing Numba JIT Compiled Functions" + SECONDS=0 if [[ ${#custom_testfiles[@]} -eq "0" ]]; then for testfile in tests/test_*.py do @@ -209,6 +210,8 @@ test_unit() check_errs $? done fi + duration=$SECONDS + echo "Elapsed Time: $((duration / 60)) minutes and $((duration % 60)) seconds" } test_coverage() @@ -226,6 +229,7 @@ test_coverage() # We always attempt to test everything but we may ignore things (ray, helper scripts) when we generate the coverage report + SECONDS=0 if [[ ${#custom_testfiles[@]} -eq "0" ]]; then # Execute all tests for testfile in tests/test_*.py; @@ -241,6 +245,8 @@ test_coverage() check_errs $? done fi + duration=$SECONDS + echo "Elapsed Time: $((duration / 60)) minutes and $((duration % 60)) seconds" show_coverage_report }