pc: use 'assert'-proc in run scripts

Issue #5432
This commit is contained in:
Roman Iten 2025-02-18 10:41:04 +01:00 committed by Christian Helmuth
parent 347953e159
commit 28994f8c27
4 changed files with 13 additions and 20 deletions

View File

@ -1,13 +1,9 @@
assert_spec x86_64
assert {[have_spec x86_64]}
if {[get_cmd_switch --autopilot] && [have_include "power_on/qemu"]} {
puts "Run script does not support autopilot mode on Qemu"
exit 0
}
if {[get_cmd_switch --autopilot] && [have_board linux]} {
puts "Autopilot mode is not supported on this platform."
exit 0
if {[have_cmd_arg --autopilot]} {
assert {![have_include power_on/qemu] &&
![have_board linux]} \
"Autopilot mode is not supported on this platform."
}
#
@ -372,7 +368,7 @@ install_config $config
build_boot_image [build_artifacts]
if { [get_cmd_switch --autopilot] } {
if {[have_cmd_arg --autopilot]} {
run_genode_until {\[init -\> init_dynamic -\> intel_fb\].*connector connected="true" name="HDMI-A-3"} 30
run_genode_until {\</connectors\>} 20 [output_spawn_id]
run_genode_until {green} 30 [output_spawn_id]

View File

@ -1,13 +1,10 @@
if {![have_include "load/ipxe"]} {
puts "run script requires load/ipxe"
exit 1
}
assert {[have_spec x86]}
assert {[have_include load/ipxe]}
proc _arch { } {
if {[have_spec "x86_32"]} { return "x86_32" }
if {[have_spec "x86_64"]} { return "x86_64" }
puts "not supported architecture!"
exit 1
if {[have_spec x86_32]} { return "x86_32" }
if {[have_spec x86_64]} { return "x86_64" }
assert {false} "Run script is not supported on this platform."
}
set arch [_arch]

View File

@ -1,4 +1,4 @@
assert_spec x86
assert {[have_spec x86]}
build { driver/nic/pc }

View File

@ -10,7 +10,7 @@ source ${genode_dir}/repos/dde_linux/run/wifi_config.inc
#
# Restrict platforms
#
assert_spec x86
assert {[have_spec x86]}
#
# Build