mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Add test_duration info to results
This commit is contained in:
parent
428e082ab5
commit
37317c080c
3 changed files with 7 additions and 3 deletions
|
@ -119,7 +119,7 @@ def level_6(tests):
|
||||||
def level_7(tests):
|
def level_7(tests):
|
||||||
"""
|
"""
|
||||||
All tests succeeded + no warning in linter (that part is tested by the
|
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"]
|
linter_tests = [t for t in tests if t["test_type"] == "PACKAGE_LINTER"]
|
||||||
|
@ -223,7 +223,8 @@ summary = {
|
||||||
"test_type": t["test_type"],
|
"test_type": t["test_type"],
|
||||||
"test_arg": t["test_arg"],
|
"test_arg": t["test_arg"],
|
||||||
"test_serie": t["test_serie"],
|
"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],
|
} for t in tests],
|
||||||
"level_results": {level.level: level.passed for level in levels[1:]},
|
"level_results": {level.level: level.passed for level in levels[1:]},
|
||||||
"level": global_level.level
|
"level": global_level.level
|
||||||
|
|
|
@ -177,7 +177,7 @@ stop_timer () {
|
||||||
[ $minutes -eq 1 ] && pminutes="${pminutes}, " || test -z "$pminutes" || pminutes="${pminutes}s, "
|
[ $minutes -eq 1 ] && pminutes="${pminutes}, " || test -z "$pminutes" || pminutes="${pminutes}s, "
|
||||||
[ $seconds -gt 1 ] && pseconds="${pseconds}s" || pseconds="0s"
|
[ $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
|
if [ $1 -eq 2 ]; then
|
||||||
log_info "Working time for this test: $time"
|
log_info "Working time for this test: $time"
|
||||||
elif [ $1 -eq 3 ]; then
|
elif [ $1 -eq 3 ]; then
|
||||||
|
|
|
@ -321,6 +321,9 @@ TEST_LAUNCHER () {
|
||||||
|
|
||||||
[ $? -eq 0 ] && SET_RESULT "success" main_result || SET_RESULT "failure" main_result
|
[ $? -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
|
break_before_continue
|
||||||
|
|
||||||
# Restore the started time for the timer
|
# Restore the started time for the timer
|
||||||
|
|
Loading…
Add table
Reference in a new issue