Merge branch 'dev'
This commit is contained in:
commit
f1ad31c442
1 changed files with 15 additions and 4 deletions
|
|
@ -125,7 +125,7 @@ check_result() {
|
|||
echo -e ' ' "Expected code $ref_code but got $actual_code"
|
||||
test_failed=1
|
||||
# Check output
|
||||
elif diff $output $ref_output > /dev/null; then
|
||||
elif [[ $(diff $output $ref_output > /dev/null) -ne 0 ]]; then
|
||||
echo -e $BRed "FAILED" $Color_Off
|
||||
echo -e ' ' "on '$command'"
|
||||
echo -e ' ' "Output is not the one expected"
|
||||
|
|
@ -226,9 +226,13 @@ test_script() {
|
|||
|
||||
summarize() {
|
||||
|
||||
# Compute statistics
|
||||
(( passed_tests = $total_tests - $errors_count ))
|
||||
(( tests_percentage = 100 * $passed_tests / $total_tests ))
|
||||
|
||||
# Adapt color depending on results
|
||||
|
||||
# Percentage
|
||||
if [[ tests_percentage -gt 80 ]]; then
|
||||
coverage_color=$BGreen
|
||||
elif [[ tests_percentage -gt 50 ]]; then
|
||||
|
|
@ -238,12 +242,19 @@ summarize() {
|
|||
else
|
||||
coverage_color=$BRed
|
||||
fi
|
||||
# Timeouts
|
||||
if [[ $timeouts_count -eq 0 ]]; then
|
||||
timeouts_color=$BGreen
|
||||
else
|
||||
timeouts_color=$BRed
|
||||
fi
|
||||
|
||||
# Print
|
||||
echo -e $BWhite "\n\n""===========" $UWhite"Summary"$Color_Off "\n"
|
||||
echo -e " Passed $coverage_color$passed_tests/$total_tests$Color_Off tests ($coverage_color$tests_percentage$Color_Off%)"
|
||||
echo -e " Got $BRed$timeouts_count timeout(s)$Color_Off"
|
||||
if [ "$OUTPUT_FILE" != "" ];
|
||||
then echo $tests_percentage > "$OUTPUT_FILE";
|
||||
echo -e " Got $timeouts_color$timeouts_count timeout(s)$Color_Off"
|
||||
if [ "$OUTPUT_FILE" != "" ]; then
|
||||
echo $tests_percentage > "$OUTPUT_FILE";
|
||||
fi
|
||||
echo
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue