Skip to content

Commit 0107d39

Browse files
committed
Show elapsed time for unit/coverage tests
1 parent 87fbd57 commit 0107d39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ test_custom()
196196
test_unit()
197197
{
198198
echo "Testing Numba JIT Compiled Functions"
199+
SECONDS=0
199200
if [[ ${#custom_testfiles[@]} -eq "0" ]]; then
200201
for testfile in tests/test_*.py
201202
do
@@ -209,6 +210,8 @@ test_unit()
209210
check_errs $?
210211
done
211212
fi
213+
duration=$SECONDS
214+
echo "Elapsed Time: $((duration / 60)) minutes and $((duration % 60)) seconds"
212215
}
213216

214217
test_coverage()
@@ -226,6 +229,7 @@ test_coverage()
226229

227230
# We always attempt to test everything but we may ignore things (ray, helper scripts) when we generate the coverage report
228231

232+
SECONDS=0
229233
if [[ ${#custom_testfiles[@]} -eq "0" ]]; then
230234
# Execute all tests
231235
for testfile in tests/test_*.py;
@@ -241,6 +245,8 @@ test_coverage()
241245
check_errs $?
242246
done
243247
fi
248+
duration=$SECONDS
249+
echo "Elapsed Time: $((duration / 60)) minutes and $((duration % 60)) seconds"
244250
show_coverage_report
245251
}
246252

0 commit comments

Comments
 (0)