Skip to content

Commit f37ed4a

Browse files
committed
Minor - Tweaking test.sh
1 parent 0698a8c commit f37ed4a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

test.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
#!/usr/bin/env bash
22
versions=${1:-ALL}
33
posargs=${2:-32}
4-
set -e
5-
6-
microtime() {
7-
python -c 'import time; print(time.time())'
8-
}
4+
SECONDS=0
95

10-
START=$(microtime)
6+
set -e
117

128
./validate.sh
139
mkdir -p test-reports
1410
tox -e ${versions} -- ${posargs}
1511
coverage html --directory test-reports/coverage
16-
rm -rf .coverage* Running
12+
rm -rf test-reports/.coverage* test-reports/Running 2> /dev/null
1713

18-
echo "Time elapsed: $(echo "scale=1; ($(microtime) - $START) / 60" | bc) minutes"
14+
duration=$SECONDS
15+
echo "$(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."

0 commit comments

Comments
 (0)