From cb78516bf1b0a8cecb6ea325bdc3c9b96ab422fc Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 10 Apr 2018 16:45:01 +0200 Subject: [PATCH] os: add tests to autopilot Since the autopilot has become able to use the depot, futher tests can be enabled by default. --- repos/base/run/platform_drv.inc | 2 ++ repos/gems/run/depot_download.run | 12 +++++++++--- repos/libports/run/fetchurl.run | 22 +++++++++++++++++----- repos/os/run/weak_ptr.run | 1 + tool/autopilot.list | 6 ++++++ 5 files changed, 35 insertions(+), 8 deletions(-) diff --git a/repos/base/run/platform_drv.inc b/repos/base/run/platform_drv.inc index 275eeacc6..481c707de 100644 --- a/repos/base/run/platform_drv.inc +++ b/repos/base/run/platform_drv.inc @@ -49,6 +49,8 @@ proc nic_drv_config { } { return "" } if {[have_spec wand_quad]} { return "" } + if {[have_spec omap4] || [have_spec arndale] || [have_spec rpi]} { + return {} } return "" } diff --git a/repos/gems/run/depot_download.run b/repos/gems/run/depot_download.run index 0947a121b..14b14ca44 100644 --- a/repos/gems/run/depot_download.run +++ b/repos/gems/run/depot_download.run @@ -1,5 +1,11 @@ create_boot_directory +# the test currently is tied to the x86-only iPXE NIC driver +if {![have_spec x86] || [have_spec linux]} { + puts "Run script does not support this platform." + exit 0 +} + import_from_depot genodelabs/src/[base_src] \ genodelabs/src/report_rom \ genodelabs/src/fs_rom \ @@ -45,7 +51,7 @@ set config { append_platform_drv_config -proc depot_user { } { return nfeske } +proc depot_user { } { return genodelabs } proc depot_user_download { } { return [exec cat [genode_dir]/depot/[depot_user]/download] } @@ -106,7 +112,7 @@ append config { set fd [open [run_dir]/genode/installation w] puts $fd " - + " close $fd @@ -124,5 +130,5 @@ build_boot_image $boot_modules append qemu_args " -nographic -net nic,model=e1000 -net user " -run_genode_until forever +run_genode_until {.*\[init -> depot_download -> manager\] installation complete.*\n} 120 diff --git a/repos/libports/run/fetchurl.run b/repos/libports/run/fetchurl.run index 6bfb73dd8..648dbf661 100644 --- a/repos/libports/run/fetchurl.run +++ b/repos/libports/run/fetchurl.run @@ -4,17 +4,26 @@ # \date 2016-06-05 # +if {[have_spec odroid_xu] || [have_spec linux]} { + puts "Run script does not support this platform." + exit 0 +} + set build_components { app/fetchurl core init drivers/nic drivers/timer lib/vfs/lxip + server/report_rom } source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components +lappend_if [expr {[nic_drv_binary] == "nic_drv"}] build_components drivers/nic +lappend_if [expr {[nic_drv_binary] == "usb_drv"}] build_components drivers/usb + build $build_components create_boot_directory @@ -45,14 +54,15 @@ append config { - + - + + } [nic_drv_config] { - + @@ -89,11 +99,11 @@ set boot_modules { libssh.lib.so libssl.lib.so lxip.lib.so - nic_drv pthread.lib.so timer vfs_lxip.lib.so zlib.lib.so + report_rom } # platform-specific modules @@ -102,6 +112,8 @@ lappend boot_modules [nic_drv_binary] build_boot_image $boot_modules -append qemu_args " -nographic -net nic,model=e1000 -net user" +append_if [have_spec x86] qemu_args " -net nic,model=e1000 " +append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 " +append qemu_args " -nographic -net user" run_genode_until {child "fetchurl" exited with exit value 0} 120 diff --git a/repos/os/run/weak_ptr.run b/repos/os/run/weak_ptr.run index 69078652c..a5a1a25bb 100644 --- a/repos/os/run/weak_ptr.run +++ b/repos/os/run/weak_ptr.run @@ -17,6 +17,7 @@ install_config { + diff --git a/tool/autopilot.list b/tool/autopilot.list index b6b42a153..0909e9943 100644 --- a/tool/autopilot.list +++ b/tool/autopilot.list @@ -113,3 +113,9 @@ demo ping ping_nic_router nvme +weak_ptr +extract +verify +fetchurl +depot_query +depot_download