From e19c503444494938fcf90af21bbdb1575d6e8d34 Mon Sep 17 00:00:00 2001 From: Roman Iten Date: Wed, 22 Jan 2025 10:49:56 +0100 Subject: [PATCH] os: use 'assert'-proc in run scripts Issue #5432 --- repos/os/run/ahci_block.run | 2 +- repos/os/run/assert_nic.inc | 19 +++++++------------ repos/os/run/assert_qemu_nic.inc | 6 +----- repos/os/run/block_tester.run | 2 +- repos/os/run/bomb.run | 8 +++----- repos/os/run/cpu_balancer.run | 11 +++-------- repos/os/run/cpu_bench.run | 13 ++++--------- repos/os/run/demo.run | 20 ++++++++++++-------- repos/os/run/fb_bench.run | 28 ++++++++++++++-------------- repos/os/run/framebuffer.run | 8 ++++++++ repos/os/run/init_smp.run | 12 +++++------- repos/os/run/internet_checksum.run | 4 ++-- repos/os/run/log_core.run | 16 +++++++--------- repos/os/run/lx_fs_import.run | 2 +- repos/os/run/mixer.run | 9 +++++---- repos/os/run/monitor.run | 5 +---- repos/os/run/monitor_gdb.inc | 5 +---- repos/os/run/nvme.run | 9 ++++----- repos/os/run/ping.run | 12 ++++-------- repos/os/run/platform.run | 5 +---- repos/os/run/pointer.run | 6 +++++- repos/os/run/rom_to_file.run | 2 +- repos/os/run/sd_card.run | 5 +---- repos/os/run/sd_card_bench.run | 13 +++++-------- repos/os/run/smbios_decoder.run | 8 +++----- repos/os/run/tar_rom.run | 2 +- repos/os/run/test.run | 4 ++++ repos/os/run/uart.run | 10 ++++++---- repos/os/run/usb_block.run | 11 ++++------- repos/os/run/vmm_arm.run | 12 +++++------- repos/os/run/vmm_x86.run | 22 ++++++---------------- 31 files changed, 126 insertions(+), 165 deletions(-) diff --git a/repos/os/run/ahci_block.run b/repos/os/run/ahci_block.run index be331b6525d..335c3fcbb3d 100644 --- a/repos/os/run/ahci_block.run +++ b/repos/os/run/ahci_block.run @@ -1,4 +1,4 @@ -assert_spec x86 +assert {[have_spec x86]} create_boot_directory build { diff --git a/repos/os/run/assert_nic.inc b/repos/os/run/assert_nic.inc index 504335a7ebb..0f0b31d8854 100644 --- a/repos/os/run/assert_nic.inc +++ b/repos/os/run/assert_nic.inc @@ -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]} { + assert {![have_board linux] && + ![have_board zynq_qemu] && + ![have_board virt_qemu_riscv]} \ + Autopilot mode is not supported on this platform. } diff --git a/repos/os/run/assert_qemu_nic.inc b/repos/os/run/assert_qemu_nic.inc index b369bd9ab0c..4a0b7ec4037 100644 --- a/repos/os/run/assert_qemu_nic.inc +++ b/repos/os/run/assert_qemu_nic.inc @@ -3,8 +3,4 @@ source ${genode_dir}/repos/os/run/assert_nic.inc # # the test should be run isolated as it would disturb normal network operation # -if {![have_include power_on/qemu]} { - - puts "Run script is not supported on this platform." - exit 0 -} +assert {[have_include power_on/qemu]} diff --git a/repos/os/run/block_tester.run b/repos/os/run/block_tester.run index e7e2fe27a4c..1bf10172dcb 100644 --- a/repos/os/run/block_tester.run +++ b/repos/os/run/block_tester.run @@ -1,4 +1,4 @@ -assert_spec linux +assert {[have_spec linux]} # # Check used commands diff --git a/repos/os/run/bomb.run b/repos/os/run/bomb.run index 6c9b1b8d33e..4dbaa5f4be2 100644 --- a/repos/os/run/bomb.run +++ b/repos/os/run/bomb.run @@ -17,11 +17,9 @@ if {[have_include "power_on/qemu"]} { } } -if {[have_spec pistachio]} { - # The bomb test triggers a kernel assertion at kernel/src/api/v4/tcb.h, - # line 727, which remains unfixed since the kernel is no longer developed. - puts "Run script does not support Pistachio" - exit 0 +assert {![have_spec pistachio]} { + The bomb test triggers a kernel assertion at kernel/src/api/v4/tcb.h, + line 727, which remains unfixed since the kernel is no longer developed. } # prevent hitting the socket-descriptor limit on Linux diff --git a/repos/os/run/cpu_balancer.run b/repos/os/run/cpu_balancer.run index fdc63aeb95e..0f7195afbdb 100644 --- a/repos/os/run/cpu_balancer.run +++ b/repos/os/run/cpu_balancer.run @@ -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]} { + foc in principle supports migration, but due to bug #4357 foc is not tested } set cpu_width 4 diff --git a/repos/os/run/cpu_bench.run b/repos/os/run/cpu_bench.run index 23c8d295a29..ac0aac621ae 100644 --- a/repos/os/run/cpu_bench.run +++ b/repos/os/run/cpu_bench.run @@ -1,14 +1,9 @@ -if {[get_cmd_switch --autopilot]} { - if {[have_include "power_on/qemu"]} { - puts "\nRun script does not support Qemu.\n" - exit 0 - } +if {[have_cmd_arg --autopilot]} { + assert {![have_include power_on/qemu]} \ + Autopilot mode is not supported on this platform. } -if {[have_board linux]} { - puts "\n Run script is not supported on this platform. \n"; - exit 0 -} +assert {![have_board linux]} build { core init timer lib/ld test/cpu_bench } diff --git a/repos/os/run/demo.run b/repos/os/run/demo.run index 4c7514fd872..3f341e23750 100644 --- a/repos/os/run/demo.run +++ b/repos/os/run/demo.run @@ -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]} +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)} diff --git a/repos/os/run/fb_bench.run b/repos/os/run/fb_bench.run index 38f52bb00f5..0bd06d7e00c 100644 --- a/repos/os/run/fb_bench.run +++ b/repos/os/run/fb_bench.run @@ -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]} +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 diff --git a/repos/os/run/framebuffer.run b/repos/os/run/framebuffer.run index d729d8e324c..6c7e41f0b71 100644 --- a/repos/os/run/framebuffer.run +++ b/repos/os/run/framebuffer.run @@ -1,3 +1,7 @@ +assert {[have_recipe pkg/[drivers_interactive_pkg]]} " + Recipe for 'pkg/[drivers_interactive_pkg]' not available. +" + create_boot_directory import_from_depot [depot_user]/src/[base_src] \ @@ -56,4 +60,8 @@ install_config { build_boot_image [build_artifacts] +assert {![have_cmd_arg --autopilot]} { + Autopilot mode is not supported by this run script. +} + run_genode_until forever diff --git a/repos/os/run/init_smp.run b/repos/os/run/init_smp.run index d158d106299..0aadf43ba69 100644 --- a/repos/os/run/init_smp.run +++ b/repos/os/run/init_smp.run @@ -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]} # 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 diff --git a/repos/os/run/internet_checksum.run b/repos/os/run/internet_checksum.run index 2187b3de27f..084ae50d071 100644 --- a/repos/os/run/internet_checksum.run +++ b/repos/os/run/internet_checksum.run @@ -1,4 +1,4 @@ -assert_spec linux +assert {[have_spec linux]} set tshark [installed_command tshark] set trafgen [installed_command trafgen] @@ -11,7 +11,7 @@ rename exit run_tool_exit proc exit {{code 0}} { global lx_fs_dir global input_file - if {[get_cmd_switch --autopilot]} { exec rm -rf $input_file $lx_fs_dir } + if {[have_cmd_arg --autopilot]} { exec rm -rf $input_file $lx_fs_dir } run_tool_exit $code } build { core init lib/ld lib/vfs test/internet_checksum server/lx_fs } diff --git a/repos/os/run/log_core.run b/repos/os/run/log_core.run index 9818ecb1bc2..c18c3d337f9 100644 --- a/repos/os/run/log_core.run +++ b/repos/os/run/log_core.run @@ -1,14 +1,12 @@ -if {[have_spec linux]} { - puts "\n Run script is not supported on this platform. \n"; - exit 0 -} -if {[get_cmd_switch --autopilot] && ![have_include "power_on/qemu"]} { - puts "\n Run script is not supported on this platform. \n"; - exit 0 +assert {![have_spec linux]} + +if {[have_cmd_arg --autopilot]} { + assert {[have_include power_on/qemu]} \ + Autopilot mode is not supported on this platform. } proc log_service { } { - if { [get_cmd_switch --autopilot] } { return log } + if { [have_cmd_arg --autopilot] } { return log } return ram } @@ -112,7 +110,7 @@ build_boot_image [build_artifacts] append qemu_args " -nographic " -if { [get_cmd_switch --autopilot] } { +if { [have_cmd_arg --autopilot] } { run_genode_until {.*\[log_core -> log] \[.*\n} 20 } else { run_genode_until forever diff --git a/repos/os/run/lx_fs_import.run b/repos/os/run/lx_fs_import.run index 81ce056d781..0a11cf4bf89 100644 --- a/repos/os/run/lx_fs_import.run +++ b/repos/os/run/lx_fs_import.run @@ -7,7 +7,7 @@ lappend depot_archives [depot_user]/src/vfs_import set build_components { } -if { [get_cmd_switch --autopilot] } { +if { [have_cmd_arg --autopilot] } { lappend depot_archives [depot_user]/src/lx_fs } else { lappend build_components server/lx_fs diff --git a/repos/os/run/mixer.run b/repos/os/run/mixer.run index 00c5a1dd2c1..e5c3a0bd933 100644 --- a/repos/os/run/mixer.run +++ b/repos/os/run/mixer.run @@ -1,7 +1,4 @@ -if {[have_include "power_on/qemu"]} { - puts "\nTest running on Qemu is not supported.\n" - exit 0 -} +assert {![have_include power_on/qemu]} build { core init timer lib/ld @@ -200,6 +197,10 @@ install_config { } +assert {![have_cmd_arg --autopilot]} { + Autopilot mode is not supported by this run script. +} + if {[expr ![file exists bin/client1.f32] || ![file exists bin/client2.f32]]} { puts "" puts "The sample files are missing. Please take a look at repos/dde_bsd/README" diff --git a/repos/os/run/monitor.run b/repos/os/run/monitor.run index 1f5911d7f23..6f5bad36dc7 100644 --- a/repos/os/run/monitor.run +++ b/repos/os/run/monitor.run @@ -5,10 +5,7 @@ proc platform_supported { } { return 0 } -if {![platform_supported]} { - puts "Run script is not supported on this platform" - exit 0 -} +assert {[platform_supported]} build { core lib/ld init timer monitor lib/sandbox diff --git a/repos/os/run/monitor_gdb.inc b/repos/os/run/monitor_gdb.inc index 94c7b753312..7d97e922842 100644 --- a/repos/os/run/monitor_gdb.inc +++ b/repos/os/run/monitor_gdb.inc @@ -10,10 +10,7 @@ proc platform_supported { } { return 0 } -if {![platform_supported]} { - puts "Run script is not supported on this platform" - exit 0 -} +assert {[platform_supported]} create_boot_directory diff --git a/repos/os/run/nvme.run b/repos/os/run/nvme.run index 64920c510f0..8130cc7e5c0 100644 --- a/repos/os/run/nvme.run +++ b/repos/os/run/nvme.run @@ -1,4 +1,4 @@ -assert_spec x86 +assert {[have_spec x86]} # perform write tests when requested if {[info exists env(GENODE_TEST_WRITE)]} { @@ -14,10 +14,9 @@ set is_32bit_x86_hw [expr !$is_qemu && [have_spec 32bit]] # # Only run tests on supported platforms # -if {[expr [have_spec linux] || $is_32bit_x86_hw || [expr $is_qemu && $is_old]]} { - puts "This run script is not supported on this platform." - exit 0 -} +assert {![have_spec linux]} +assert {!$is_32bit_x86_hw} +assert {!($is_qemu && $is_old)} # # Qemu and on certain platforms only use the small set of tests diff --git a/repos/os/run/ping.run b/repos/os/run/ping.run index a119c3358f6..0c9c6813bdf 100644 --- a/repos/os/run/ping.run +++ b/repos/os/run/ping.run @@ -38,16 +38,12 @@ set on_linux_with_dst_ip "" catch {set on_linux_with_dst_ip $::env(ON_LINUX_WITH_DST_IP)} set on_linux [expr ![string equal $on_linux_with_dst_ip ""]] -if {[expr [have_spec linux] && !$on_linux]} { - - puts "You must set 'on_linux_with_dst_ip' in the run script if you want to run on Linux." - exit 0 +assert {!([have_spec linux] && !$on_linux)} { + You must set 'on_linux_with_dst_ip' in the run script if you want to run on Linux. } -if {[expr ![have_spec linux] && $on_linux]} { - - puts "You must run on Linux if 'on_linux_with_dst_ip' in the run script is set." - exit 0 +assert {!(![have_spec linux] && $on_linux)} { + You must run on Linux if 'on_linux_with_dst_ip' in the run script is set. } set on_hardware [expr ![have_include power_on/qemu]] diff --git a/repos/os/run/platform.run b/repos/os/run/platform.run index 123798aa64c..285c727fdda 100644 --- a/repos/os/run/platform.run +++ b/repos/os/run/platform.run @@ -1,7 +1,4 @@ -if { ![have_board pbxa9] } { - puts "Platform is unsupported." - exit 0 -} +assert {[have_board pbxa9]} create_boot_directory diff --git a/repos/os/run/pointer.run b/repos/os/run/pointer.run index d796d5f3fff..3dc1d9e916f 100644 --- a/repos/os/run/pointer.run +++ b/repos/os/run/pointer.run @@ -1,4 +1,4 @@ -assert_spec linux +assert {[have_spec linux]} build { core init timer lib/ld @@ -264,6 +264,10 @@ install_config { build_boot_image [build_artifacts] +assert {![have_cmd_arg --autopilot]} { + Autopilot mode is not supported by this run script. +} + run_genode_until forever # vi: set ft=tcl : diff --git a/repos/os/run/rom_to_file.run b/repos/os/run/rom_to_file.run index d8c9aa33fe5..ef665278f91 100644 --- a/repos/os/run/rom_to_file.run +++ b/repos/os/run/rom_to_file.run @@ -1,4 +1,4 @@ -assert_spec linux +assert {[have_spec linux]} build { core init timer lib/ld server/dynamic_rom app/rom_to_file server/lx_fs } diff --git a/repos/os/run/sd_card.run b/repos/os/run/sd_card.run index 5926adf44d5..45da8c858b6 100644 --- a/repos/os/run/sd_card.run +++ b/repos/os/run/sd_card.run @@ -1,7 +1,4 @@ -if {![have_board pbxa9]} { - puts "Test requires board pbxa9" - exit -} +assert {[have_board pbxa9]} create_boot_directory import_from_depot [depot_user]/src/[base_src] \ diff --git a/repos/os/run/sd_card_bench.run b/repos/os/run/sd_card_bench.run index 5ecc1759797..b06266bbcfc 100644 --- a/repos/os/run/sd_card_bench.run +++ b/repos/os/run/sd_card_bench.run @@ -1,10 +1,9 @@ # # Check for platform support # -if {[get_cmd_switch --autopilot] && - [expr [have_board virt_qemu_riscv] || [have_board rpi]]} { - puts "Autopilot mode is not supported on this platform." - exit 0 +if {[have_cmd_arg --autopilot]} { + assert {![have_board virt_qemu_riscv] && ![have_board rpi]} \ + Autopilot mode is not supported on this platform. } proc buffer_size_kib {} { @@ -13,8 +12,7 @@ proc buffer_size_kib {} { if {[have_board imx53_qsb]} { return [expr 1024] } if {[have_board imx53_qsb_tz]} { return [expr 1024] } if {[have_board rpi]} { return [expr 4 * 1024] } - puts "\n Run script is not supported on this platform. \n"; - exit 0; + assert {false} Run script is not supported on this platform. } proc sd_card {} { @@ -23,8 +21,7 @@ proc sd_card {} { if {[have_board imx53_qsb]} { return imx53_sd_card } if {[have_board imx53_qsb_tz]} { return imx53_sd_card } if {[have_board rpi]} { return rpi_sd_card } - puts "\n Run script is not supported on this platform. \n"; - exit 0; + assert {false} Run script is not supported on this platform. } create_boot_directory diff --git a/repos/os/run/smbios_decoder.run b/repos/os/run/smbios_decoder.run index 1305ef2895c..d5fc9435fed 100644 --- a/repos/os/run/smbios_decoder.run +++ b/repos/os/run/smbios_decoder.run @@ -1,9 +1,7 @@ -assert_spec x86_64 +assert {[have_spec x86_64]} -if {![have_board pc] || [expr ![have_spec nova] && ![have_spec hw]] } { - puts "Run script is only supported on hw/pc and nova/pc" - exit 0 -} +assert {[have_board pc]} +assert {[have_spec nova] || [have_spec hw]} build { core init timer lib/ld driver/acpi server/report_rom app/smbios_decoder } diff --git a/repos/os/run/tar_rom.run b/repos/os/run/tar_rom.run index 6d884d63e88..74ef437a12e 100644 --- a/repos/os/run/tar_rom.run +++ b/repos/os/run/tar_rom.run @@ -16,7 +16,7 @@ # file system ('execve' takes a file name as argument). Data extracted via # 'tar_rom' is not represented as file. Hence, it cannot be executed. # -if {[have_spec linux]} { puts "Run script does not support Linux"; exit 0 } +assert {![have_spec linux]} build { core init timer lib/ld test/timer server/tar_rom } diff --git a/repos/os/run/test.run b/repos/os/run/test.run index 47ec205997a..d933d85840b 100644 --- a/repos/os/run/test.run +++ b/repos/os/run/test.run @@ -39,6 +39,10 @@ # make run/test KERNEL=linux PKG=test-fs_report # +assert {![have_cmd_arg --autopilot]} { + Autopilot mode is not supported by this run script. +} + ## # Obtain name of the test pkg from the 'PKG' environment variable # diff --git a/repos/os/run/uart.run b/repos/os/run/uart.run index 34ca6ad89f1..cb62bec454f 100644 --- a/repos/os/run/uart.run +++ b/repos/os/run/uart.run @@ -1,7 +1,4 @@ -if { ![have_board pbxa9] } { - puts "Platform is unsupported." - exit 0 -} +assert {[have_board pbxa9]} build { core init timer lib/ld driver/uart test/uart } @@ -55,5 +52,10 @@ append qemu_args " -display none -serial stdio" append qemu_args " -serial file:/tmp/serial1" append qemu_args " -serial file:/tmp/serial2" append qemu_args " -serial file:/tmp/serial3" + +assert {![have_cmd_arg --autopilot]} { + Autopilot mode is not supported by this run script. +} + run_genode_until forever diff --git a/repos/os/run/usb_block.run b/repos/os/run/usb_block.run index f2ff657f8d8..b3f1c97ab82 100644 --- a/repos/os/run/usb_block.run +++ b/repos/os/run/usb_block.run @@ -1,11 +1,8 @@ -if {![have_board pc]} { - puts "\nRun script is not supported on this platform.\n"; - exit 0 -} +assert {[have_board pc]} -if {[get_cmd_switch --autopilot] && ![have_include "power_on/qemu"]} { - puts "\nAutopilot run is not supported on this platform\n" - exit 0 +if {[have_cmd_arg --autopilot]} { + assert {[have_include "power_on/qemu"]} \ + Autopilot mode is not supported on this platform. } create_boot_directory diff --git a/repos/os/run/vmm_arm.run b/repos/os/run/vmm_arm.run index 0673c79aa52..0183606464c 100644 --- a/repos/os/run/vmm_arm.run +++ b/repos/os/run/vmm_arm.run @@ -4,14 +4,12 @@ # \date 2015-06-25 # -assert_spec hw +assert {[have_spec hw]} -if { ![have_board imx7d_sabre] && ![have_board imx8q_evk] && - ![have_board virt_qemu_arm_v7a] && - ![have_board virt_qemu_arm_v8a]} { - puts "Run script is not supported on this platform" - exit 0 -} +assert {[have_board imx7d_sabre] || + [have_board imx8q_evk] || + [have_board virt_qemu_arm_v7a] || + [have_board virt_qemu_arm_v8a]} create_boot_directory import_from_depot [depot_user]/src/[base_src] \ diff --git a/repos/os/run/vmm_x86.run b/repos/os/run/vmm_x86.run index 4c0d4fe6e01..b5ea1fe9541 100644 --- a/repos/os/run/vmm_x86.run +++ b/repos/os/run/vmm_x86.run @@ -4,25 +4,15 @@ # \author Benjamin Lamowski # \date 2018-08-26 -assert_spec x86 +assert {[have_spec x86]} -if { [get_cmd_switch --autopilot] } { - # nightly x86 32bit test machine has no vmx support - if {[have_spec x86_32] && ![have_include "power_on/qemu"]} { - puts "\n Run script is not supported on this platform. \n"; - exit 0 - } +if { [have_cmd_arg --autopilot] } { + assert {!([have_spec x86_32] && ![have_include power_on/qemu])} \ + nightly x86 32bit test machine has no vmx support - if {[have_include "power_on/qemu"] && [have_spec sel4]} { - puts "\n Run script is not supported on this platform. \n"; - exit 0 - } + assert {!([have_include power_on/qemu] && [have_spec sel4])} - if {[have_spec nova] || [have_spec foc] || [have_spec sel4]} { - } else { - puts "\n Run script is not supported on this platform. \n"; - exit 0 - } + assert {[have_spec nova] || [have_spec foc] || [have_spec sel4]} } # ia32_tsc_aux with rdtscp