CI: Respect TEST_ARTIFACTS but detect tmt

STI used to allow /tmp/artifacts, in tmt we have
TMT_PLAN_DATA and TMT_TEST_DATA. Use the later, which is test specific.

(cherry picked from Fedora commit 8998e8e027)
This commit is contained in:
Lukáš Zachar 2025-07-28 17:09:27 +02:00 committed by Miro Hrončok
parent 33524ea761
commit 63e4a347b8

View File

@ -72,7 +72,7 @@ mock --verbose --isolation=simple -r $config --enablerepo="$repos" init
mock --verbose --isolation=simple -r $config --enablerepo="$repos" "$@" ~/rpmbuild/SRPMS/${pkgname}-*.src.rpm || res=$?
# move the results to the artifacts directory, so we can examine them
artifacts=${TEST_ARTIFACTS:-/tmp/artifacts}
artifacts=${TEST_ARTIFACTS:-${TMT_TEST_DATA:-/tmp/artifacts}}
# on Fedora Rawhide, the directory contains "rawhide" instead of the actual version
pushd /var/lib/mock/${mock}/result || pushd /var/lib/mock/${mock/${version}/rawhide}/result