Skip to content

Commit 28f4360

Browse files
committed
run_local_tests.sh: simplify update test handline
1 parent fa623fe commit 28f4360

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

run_local_tests.sh

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,27 @@ function run_local_tests() (
7171
rm -f results.*
7272

7373
local mantle_container="$(cat "sdk_container/.repo/manifests/mantle-container")"
74-
local custom_test_list=false
74+
local tests=""
75+
local update_tests=false
7576

7677
# Generate list of all tests for qemu w/o the devcontainer tests.
7778
# This will generate globs for top-level test modules, e.g. "cl.update.oem" will become cl.*.
7879
# Globs are necessary because tests ignore OS min/max version specification if a test was specified with its full name.
7980
# Using globs will prevent tests to be run which aren't meant for the OS version we're testing.
81+
# NOTE that update tests get special handling because qemu_update is a separate "platform".
8082
if [[ $# -eq 0 ]] ; then
8183
tests="$(docker run "${mantle_container}" \
8284
kola list --platform qemu \
8385
| awk '!/^(devcontainer|Test)/ {if ($1 != "") print gensub(/^([^.]+).*/,"\\1",1,$1) ".*"}' | uniq)"
84-
set -- ${tests}
86+
update_tests=true
8587
else
86-
custom_test_list=true
88+
tests="${@}"
89+
if [[ "$tests" = *"qemu_update"* ]] ; then
90+
update_tests=true
91+
fi
92+
if [[ "$tests" = "qemu_update" ]] ; then
93+
tests=""
94+
fi
8795
fi
8896

8997
source ci-automation/test.sh || exit 1
@@ -93,8 +101,15 @@ function run_local_tests() (
93101
echo "Using Mantle docker image '${mantle_container}'"
94102

95103
rm -f results.sqlite
96-
test_run "${arch}" qemu_uefi "${@}"
97-
if [[ "${custom_test_list}" = "false" ]] ; then
104+
if [[ -n "${tests}" ]] ; then
105+
echo "================================="
106+
echo "Running qemu_uefi tests"
107+
test_run "${arch}" qemu_uefi "${tests}"
108+
fi
109+
110+
if ${update_tests} ; then
111+
echo "================================="
112+
echo "Running qemu_update tests"
98113
test_run "${arch}" qemu_update
99114
fi
100115

0 commit comments

Comments
 (0)