-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Issue genodelabs#5432
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
assert_spec x86 | ||
assert {[have_spec x86]} | ||
|
||
create_boot_directory | ||
build { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
# | ||
# there are no nic driver packages for these targets | ||
# | ||
if {[have_board rpi3] || | ||
[have_board imx53_qsb_tz]} { | ||
|
||
puts "Run script is not supported on this platform." | ||
exit 0 | ||
} | ||
assert {![have_board rpi3]} | ||
assert {![have_board imx53_qsb_tz]} | ||
|
||
# | ||
# these targets would require extra setup on the autopilot which is not desired | ||
# | ||
if {[get_cmd_switch --autopilot] && ([have_spec linux] || | ||
[have_board zynq_qemu] || | ||
[have_board virt_qemu_riscv])} { | ||
|
||
puts "Autopilot mode is not supported on this platform." | ||
exit 0 | ||
if {[have_cmd_arg --autopilot]} { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
assert {![have_board linux] && | ||
![have_board zynq_qemu] && | ||
![have_board virt_qemu_riscv]} \ | ||
Autopilot mode is not supported on this platform. | ||
This comment has been minimized.
Sorry, something went wrong.
nfeske
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
assert_spec linux | ||
assert {[have_spec linux]} | ||
|
||
# | ||
# Check used commands | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,9 @@ build { | |
server/cpu_balancer app/cpu_burner app/top server/dynamic_rom | ||
} | ||
|
||
if {![have_include "power_on/qemu"]} { | ||
puts "Run script is not supported on this platform" | ||
exit 0 | ||
} | ||
# foc in principle supports migration, but due to bug #4357 foc is not tested | ||
if {![have_spec nova] && ![have_spec sel4]} { | ||
puts "Run script is not supported on this platform" | ||
exit 0 | ||
assert {[have_include power_on/qemu]} | ||
assert {![have_spec foc]} { | ||
This comment has been minimized.
Sorry, something went wrong.
rite
Author
Owner
|
||
foc in principle supports migration, but due to bug #4357 foc is not tested | ||
} | ||
|
||
set cpu_width 4 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
if {[have_board imx6q_sabrelite] || | ||
[have_board imx7d_sabre] || | ||
[have_board zynq_usrp_e31x] || | ||
([get_cmd_switch --autopilot] && [have_board linux]) || | ||
([get_cmd_switch --autopilot] && [have_include "power_on/qemu"])} { | ||
puts "Run script does not support this platform." | ||
exit 0 | ||
assert {[have_recipe pkg/[drivers_interactive_pkg]]} " | ||
Recipe for 'pkg/[drivers_interactive_pkg]' not available. | ||
" | ||
|
||
assert {![have_board imx6q_sabrelite]} | ||
This comment has been minimized.
Sorry, something went wrong.
rite
Author
Owner
|
||
assert {![have_board imx7d_sabre]} | ||
assert {![have_board zynq_usrp_e31x]} | ||
|
||
if {[have_cmd_arg --autopilot]} { | ||
assert {![have_board linux] && ![have_include power_on/qemu]} \ | ||
Autopilot mode is not supported on this platform. | ||
} | ||
|
||
create_boot_directory | ||
|
@@ -217,7 +221,7 @@ close $launchpad_config_fd | |
|
||
build_boot_image [list {*}[build_artifacts] launchpad.config] | ||
|
||
if {[get_cmd_switch --autopilot]} { | ||
if {[have_cmd_arg --autopilot]} { | ||
run_genode_until {\[init -> scout\] png is.*\n} 40 | ||
|
||
grep_output {(requests resources: )|(Error)} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
if {[have_board imx7d_sabre] || | ||
[have_board imx6q_sabrelite] || | ||
[have_board rpi3] || | ||
[have_board zynq_qemu] || | ||
[have_board zynq_usrp_e31x] || | ||
[have_board imx53_qsb_tz] || | ||
[have_board imx53_qsb] && [have_spec foc]} { | ||
puts "\n Run script is not supported on this platform. \n"; | ||
exit 0 | ||
} | ||
assert {[have_recipe pkg/[drivers_interactive_pkg]]} " | ||
Recipe for 'pkg/[drivers_interactive_pkg]' not available. | ||
" | ||
|
||
assert {![have_board imx7d_sabre]} | ||
This comment has been minimized.
Sorry, something went wrong.
rite
Author
Owner
|
||
assert {![have_board imx6q_sabrelite]} | ||
assert {![have_board rpi3]} | ||
assert {![have_board zynq_qemu]} | ||
assert {![have_board zynq_usrp_e31x]} | ||
assert {![have_board imx53_qsb_tz]} | ||
assert {!([have_board imx53_qsb] && [have_spec foc])} | ||
|
||
if {[get_cmd_switch --autopilot] && ([have_spec linux] || | ||
[have_board virt_qemu_riscv])} { | ||
puts "\nAutopilot run is not supported on this platform\n" | ||
exit 0 | ||
if {[get_cmd_switch --autopilot]} { | ||
assert {![have_spec linux] && ![have_board virt_qemu_riscv]} \ | ||
Autopilot mode is not supported on this platform. | ||
} | ||
|
||
create_boot_directory | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,12 @@ set demand [expr 1*1024*1024] | |
set cpus 4 | ||
set init_ram 256 | ||
|
||
if { [get_cmd_switch --autopilot] } { | ||
if { [have_cmd_arg --autopilot] } { | ||
|
||
if {[have_include "power_on/qemu"]} { | ||
puts "\nRun script does not support Qemu.\n" | ||
exit 0 | ||
} | ||
assert {![have_include power_on/qemu]} \ | ||
Autopilot mode is not supported on this platform. | ||
|
||
assert_spec nova | ||
assert {[have_spec nova]} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nfeske
|
||
|
||
# set specifically for our nightly test hardware */ | ||
if {[have_spec x86_64]} { | ||
|
@@ -107,7 +105,7 @@ build_boot_image [build_artifacts] | |
|
||
append qemu_args " -m [expr 128 + $init_ram*$cpus]M -nographic -smp $cpus" | ||
|
||
if { [get_cmd_switch --autopilot] } { | ||
if { [have_cmd_arg --autopilot] } { | ||
|
||
run_genode_until {bomb started} 20 | ||
|
||
|
It is pretty common case that assertions depend on whether the run script is executed in "autopilot mode". Of course, this could be combined into the actual expression of the assertion, but IMHO the readability suffers. Another option is to add a
assert_if
-proc. This way, the log would contain all the information of why the test has been aborted without requiring to specify a additional message and without sacrificing readability. Any opinions?