From 169d5bc376ec382f727c091e7407768ecf58a887 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 16 Apr 2018 13:33:20 +0200 Subject: [PATCH] run: non-fatal exit on unsupported base build config The kernel-specific boot dir scripts exit with 0 and log "Test requires..." to inform the logger frontend of the base-archive unavailability. --- tool/run/boot_dir/fiasco | 10 +++++++++- tool/run/boot_dir/foc | 10 +++++++++- tool/run/boot_dir/hw | 11 +++++++---- tool/run/boot_dir/nova | 10 +++++++++- tool/run/boot_dir/okl4 | 10 +++++++++- tool/run/boot_dir/pistachio | 10 +++++++++- tool/run/boot_dir/sel4 | 10 +++++++++- 7 files changed, 61 insertions(+), 10 deletions(-) diff --git a/tool/run/boot_dir/fiasco b/tool/run/boot_dir/fiasco index 54bde03ceb..fa76ab81d6 100644 --- a/tool/run/boot_dir/fiasco +++ b/tool/run/boot_dir/fiasco @@ -106,5 +106,13 @@ proc run_boot_dir {binaries} { ## # Base source archive within depot # -proc base_src { } { return base-fiasco } +proc base_src { } { + if {[have_spec x86_32]} { return base-fiasco } + + global specs + + puts stderr "Test requires base-fiasco kernel archive, which is missing for this build configuration" + puts stderr " SPECS=\"$specs\"" + exit 0 +} diff --git a/tool/run/boot_dir/foc b/tool/run/boot_dir/foc index b69e605a9b..fe218bc296 100644 --- a/tool/run/boot_dir/foc +++ b/tool/run/boot_dir/foc @@ -213,5 +213,13 @@ proc run_boot_dir {binaries} { ## # Base source archive within depot # -proc base_src { } { return base-foc } +proc base_src { } { + if {[have_spec x86]} { return base-foc } + + global specs + + puts stderr "Test requires base-foc kernel archive, which is missing for this build configuration" + puts stderr " SPECS=\"$specs\"" + exit 0 +} diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 92c3dc3b60..71fd6272d8 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -202,9 +202,12 @@ proc run_boot_dir {binaries} { # proc base_src { } { - if {[have_spec x86_64]} { return base-hw-pc } - if {[have_spec pbxa9]} { return base-hw-pbxa9 } + if {[have_spec x86_64] && ![have_spec muen]} { return base-hw-pc } + if {[have_spec pbxa9]} { return base-hw-pbxa9 } - puts stderr "base-hw kernel does not support this build configuration" - exit 1 + global specs + + puts stderr "Test requires base-hw kernel archive, which is missing for this build configuration" + puts stderr " SPECS=\"$specs\"" + exit 0 } diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 0e861bdc8d..fd17ca0dca 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -135,5 +135,13 @@ proc run_boot_dir {binaries} { ## # Base source archive within depot # -proc base_src { } { return base-nova } +proc base_src { } { + if {[have_spec x86]} { return base-nova } + + global specs + + puts stderr "Test requires base-nova kernel archive, which is missing for this build configuration" + puts stderr " SPECS=\"$specs\"" + exit 0 +} diff --git a/tool/run/boot_dir/okl4 b/tool/run/boot_dir/okl4 index e8d64454d9..69981006fd 100644 --- a/tool/run/boot_dir/okl4 +++ b/tool/run/boot_dir/okl4 @@ -203,5 +203,13 @@ proc run_boot_dir {binaries} { ## # Base source archive within depot # -proc base_src { } { return base-okl4 } +proc base_src { } { + if {[have_spec x86_32]} { return base-okl4 } + + global specs + + puts stderr "Test requires base-okl4 kernel archive, which is missing for this build configuration" + puts stderr " SPECS=\"$specs\"" + exit 0 +} diff --git a/tool/run/boot_dir/pistachio b/tool/run/boot_dir/pistachio index 375a44de1f..8426182152 100644 --- a/tool/run/boot_dir/pistachio +++ b/tool/run/boot_dir/pistachio @@ -103,5 +103,13 @@ proc run_boot_dir {binaries} { ## # Base source archive within depot # -proc base_src { } { return base-pistachio } +proc base_src { } { + if {[have_spec x86_32]} { return base-pistachio } + + global specs + + puts stderr "Test requires base-pistachio kernel archive, which is missing for this build configuration" + puts stderr " SPECS=\"$specs\"" + exit 0 +} diff --git a/tool/run/boot_dir/sel4 b/tool/run/boot_dir/sel4 index 802cb36474..d824fe97aa 100644 --- a/tool/run/boot_dir/sel4 +++ b/tool/run/boot_dir/sel4 @@ -142,5 +142,13 @@ proc run_boot_dir {binaries} { ## # Base source archive within depot # -proc base_src { } { return base-sel4 } +proc base_src { } { + if {[have_spec x86]} { return base-sel4 } + + global specs + + puts stderr "Test requires base-sel4 kernel archive, which is missing for this build configuration" + puts stderr " SPECS=\"$specs\"" + exit 0 +}