tool/autopilot: mark incompletely executed tests

...with "ABORT", in case of an unmet 'assert_spec' in the run scenario.

Issue #5432
This commit is contained in:
Roman Iten 2025-01-22 10:06:43 +01:00 committed by Christian Helmuth
parent c228bbfda3
commit 815e207470
2 changed files with 16 additions and 1 deletions

View File

@ -267,6 +267,19 @@ proc build_failed_because_of_missing_run_script { arch board kernel run_script }
}
proc build_failed_because_of_unsatisfied_requirement { arch board kernel run_script } {
# we cannot inspect any logfile when --stdout was used
if {[have_cmd_arg --stdout]} { return 0 }
# grep log output for the respective error message
if {[catch {
exec grep {^\(\[....-..-.. ..:..:..] \)*Test requires} [log_file $arch $board $kernel $run_script]
}]} { return 0 }
return 1
}
#
# Collect command-line arguments
#
@ -484,6 +497,8 @@ foreach arch $architectures {
if {[build_failed_because_of_missing_run_script $arch $board $kernel $run_script]} {
puts stderr "-> UNAVAILABLE"
} elseif {[build_failed_because_of_unsatisfied_requirement $arch $board $kernel $run_script]} {
puts stderr "-> ABORT ($elapsed)"
} else {
puts stderr "-> ERROR ($elapsed)"
set exit_value -1

View File

@ -31,7 +31,7 @@ proc assert_spec {spec} {
global specs
if {[lsearch $specs $spec] == -1} {
puts stderr "Test requires '$spec'"
exit 0
exit 1
}
}