diff --git a/tests/unit-tests/run-unit-tests.sh b/tests/unit-tests/run-unit-tests.sh index a899790..7d7c4bb 100755 --- a/tests/unit-tests/run-unit-tests.sh +++ b/tests/unit-tests/run-unit-tests.sh @@ -57,7 +57,7 @@ fi cd "${TMT_SOURCE_DIR}" # Extract the Source0 basename without extension -SRC_DIR=$(spectool --source 0 osbuild.spec | sed 's/.\+\(osbuild-[0-9]\+\)\.tar\.gz/\1/') +SRC_DIR=$(spectool --source 0 osbuild.spec | sed -E 's|.*/([^/]*)\.tar\.gz$|\1|') # Move to the extracted sources directory (patches are applied by default) cd "${SRC_DIR}"