base: use 'assert'-proc in run scripts

Issue #5432
This commit is contained in:
Roman Iten 2025-02-17 11:10:01 +01:00 committed by Christian Helmuth
parent df26fe779a
commit 6c1e269ed2
3 changed files with 18 additions and 22 deletions

View File

@ -1,17 +1,12 @@
build { core init lib/ld test/migrate timer }
if {![have_include "power_on/qemu"]} {
puts "Run script is not supported on this platform"
exit 0
}
if {[have_spec foc] && ([have_board pbxa9] || [have_board rpi3])} {
# foc kernel does detect solely 1 CPU */
puts "Run script is not supported on this platform"
exit 0
}
if {![have_spec nova] && ![have_spec foc] && ![have_spec sel4]} {
puts "Run script is not supported on this platform"
exit 0
assert {[have_include power_on/qemu]}
assert {[have_spec nova] || [have_spec foc] || [have_spec sel4]}
if {[have_spec foc]} {
assert {![have_board pbxa9] && ![have_board rpi3]} \
"foc kernel does detect solely 1 CPU"
}
create_boot_directory

View File

@ -5,9 +5,9 @@
# \author Alexander Boettcher
#
if { [get_cmd_switch --autopilot] && [have_include "power_on/qemu"] } {
puts "Run script does not support autopilot mode on Qemu"
exit 0
if {[have_cmd_arg --autopilot]} {
assert {![have_include power_on/qemu]} \
"Autopilot mode is not supported on this platform."
}
build { core init lib/ld test/smp }

View File

@ -30,15 +30,16 @@ build_boot_image [build_artifacts]
append qemu_args " -nographic"
if {[get_cmd_switch --autopilot] && [have_include "power_on/qemu"] && [have_spec nova]} {
# NOVA requires a CPU with invariant TSC support, which is by default not
# supported. KVM has support by explicitly enabling this feature, but by
# now the nightly test machines is not permitted to use KVM
if {[have_cmd_arg --autopilot]} {
assert {![have_spec nova] && ![have_include power_on/qemu]} {
NOVA requires a CPU with invariant TSC support, which is by default not
supported. KVM has support by explicitly enabling this feature, but by
now the nightly test machines is not permitted to use KVM
# append qemu_args " -accel kvm -cpu host,migratable=no,+invtsc"
append qemu_args " -accel kvm -cpu host,migratable=no,+invtsc"
puts "Run script does not support autopilot mode on Qemu"
exit 0
Autopilot mode is not supported on this platform.
}
}
set err_cnt 0