diff --git a/lib/analyze_test_results.py b/lib/analyze_test_results.py index 430b6b8..70f65b2 100644 --- a/lib/analyze_test_results.py +++ b/lib/analyze_test_results.py @@ -119,7 +119,7 @@ def level_6(tests): def level_7(tests): """ All tests succeeded + no warning in linter (that part is tested by the - # linter which will report a "qualify_for_level_7" in successes) + linter which will report a "qualify_for_level_7" in successes) """ linter_tests = [t for t in tests if t["test_type"] == "PACKAGE_LINTER"] @@ -223,7 +223,8 @@ summary = { "test_type": t["test_type"], "test_arg": t["test_arg"], "test_serie": t["test_serie"], - "main_result": t["results"]["main_result"] + "main_result": t["results"]["main_result"], + "test_duration": t["results"]["test_duration"] } for t in tests], "level_results": {level.level: level.passed for level in levels[1:]}, "level": global_level.level diff --git a/lib/common.sh b/lib/common.sh index 0c1d2ce..e1c18ab 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -177,7 +177,7 @@ stop_timer () { [ $minutes -eq 1 ] && pminutes="${pminutes}, " || test -z "$pminutes" || pminutes="${pminutes}s, " [ $seconds -gt 1 ] && pseconds="${pseconds}s" || pseconds="0s" - time="${phours}${pminutes}${pseconds} ($(date '+%T'))" + local time="${phours}${pminutes}${pseconds} ($(date '+%T'))" if [ $1 -eq 2 ]; then log_info "Working time for this test: $time" elif [ $1 -eq 3 ]; then diff --git a/lib/tests_coordination.sh b/lib/tests_coordination.sh index 817cc34..9f20fee 100644 --- a/lib/tests_coordination.sh +++ b/lib/tests_coordination.sh @@ -321,6 +321,9 @@ TEST_LAUNCHER () { [ $? -eq 0 ] && SET_RESULT "success" main_result || SET_RESULT "failure" main_result + local test_duration=$(echo $(( $(date +%s) - $global_start_timer ))) + SET_RESULT "$test_duration" test_duration + break_before_continue # Restore the started time for the timer