fmf: Use correct os-release

With commit 2e8b932e, run-test.sh now runs inside the cockpit/tasks
container, and its os-release is irrelevant. Read the host's os-release
instead to compute a correct `$TEST_OS`.
This commit is contained in:
Martin Pitt 2024-03-16 10:51:04 +01:00 committed by Allison Karlitskaya
parent 7b1315a3ca
commit ee5e9bd243
2 changed files with 2 additions and 1 deletions

View file

@ -36,5 +36,6 @@ exec podman \
--security-opt=label=disable \
--volume="${TMT_TEST_DATA}":/logs:rw,U --env=LOGS=/logs \
--volume="$(pwd)":/source:rw,U --env=SOURCE=/source \
--volume=/usr/lib/os-release:/run/host/usr/lib/os-release:ro \
"${CONTAINER}" \
sh /source/test/browser/run-test.sh

View file

@ -20,7 +20,7 @@ fi
# disable detection of affected tests; testing takes too long as there is no parallelization
mv .git dot-git
. /etc/os-release
. /run/host/usr/lib/os-release
export TEST_OS="${ID}-${VERSION_ID/./-}"
if [ "${TEST_OS#centos-}" != "$TEST_OS" ]; then