Skip to content

Commit

Permalink
regression prints execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hader committed Feb 22, 2024
1 parent da32bd4 commit aec6c21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/regress/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ fail=$(find "$logdir" -type f -name "*.error" | wc -l)

echo "Pass: $pass"
echo "Fail: $fail"
if [[ $pass -gt 0 ]]; then
echo "Runtime: $(find "$logdir" -type f -exec sed -n '2p' {} \; | paste -sd+ - | bc) s"
if [[ $fail -gt 0 ]]; then
echo "Runtime (passed): $(find "$logdir" -type f -name "*.pass" -exec sed -n '2p' {} \; | paste -sd+ - | bc) s"
fi
fi

if [ "$fail" -eq 0 ] ; then
code=0
Expand Down
2 changes: 2 additions & 0 deletions tests/regress/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,15 @@ then
if [ -n "$log_file" ] ; then
log_file="$log_file.pass"
echo "$test_string" > "$log_file"
echo "$runtime" >> "$log_file"
fi
code=0
else
echo -e "$red FAIL $black $test_string"
if [ -n "$log_file" ] ; then
log_file="$log_file.error"
echo "$test_string" > "$log_file"
echo "$runtime" >> "$log_file"
echo "$DIFF" >> "$log_file"
fi
code=1
Expand Down

0 comments on commit aec6c21

Please sign in to comment.