From d1ab2883b64eb0b70857a767459e1ef223ec2db1 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Wed, 11 Sep 2024 16:17:42 +0200 Subject: [PATCH] WIP New scripts to run post-install tests in nested hosts --- scripts/runtests-postinstall.sh | 25 +++++++++++++++++++++++++ scripts/runtests-postupgrade.sh | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 scripts/runtests-postinstall.sh create mode 100755 scripts/runtests-postupgrade.sh diff --git a/scripts/runtests-postinstall.sh b/scripts/runtests-postinstall.sh new file mode 100755 index 00000000..f2ec0822 --- /dev/null +++ b/scripts/runtests-postinstall.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +# needs at least --nest=$NEST + +. $(dirname $0)/lib.sh + +# FIXME may depend on images +REFSHA="ff2a3238eae5abdb0effb092fadbcec2487119e4" + +. $(dirname $0)/lib.sh + +for conf in "${TESTCONFS[@]}"; do + IFS=- read fw version media sr < <(echo "$conf") + host1="install.test::Nested::boot_inst[$fw-$version-83nightly-host1-$media-$sr]-vm1-$REFSHA" + host2="install.test::Nested::boot_inst[$fw-$version-83nightly-host2-$media-$sr]-vm1-$REFSHA" + + run_pytest \ + --runner "./jobs.py run postinstall 'cache://${host1},cache://${host2}'" \ + --log-file=test-postinstall-$conf.log \ + "$@" \ + ; +done + +report_failures diff --git a/scripts/runtests-postupgrade.sh b/scripts/runtests-postupgrade.sh new file mode 100755 index 00000000..b21b5201 --- /dev/null +++ b/scripts/runtests-postupgrade.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +# needs at least --nest=$NEST + +. $(dirname $0)/lib.sh + +# FIXME may depend on images +REFSHA="ff2a3238eae5abdb0effb092fadbcec2487119e4" + +. $(dirname $0)/lib.sh + +for conf in "${REFCONFS[@]}"; do + IFS=- read fw version media sr < <(echo "$conf") + host1="install.test::Nested::boot_upg[$fw-$version-83nightly-host1-$media-$sr]-vm1-$REFSHA" + host2="install.test::Nested::boot_upg[$fw-$version-83nightly-host2-$media-$sr]-vm1-$REFSHA" + + run_pytest \ + --runner "./jobs.py run postinstall 'cache://${host1},cache://${host2}'" \ + --log-file=test-postinstall-$conf.log \ + "$@" \ + ; +done + +report_failures