]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fmf: Fix glob 35917/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 8 Jan 2025 09:38:21 +0000 (10:38 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 8 Jan 2025 10:15:43 +0000 (11:15 +0100)
Globs inside quotes aren't expanded and we need the glob to be more
specific to avoid matching multiple entries inside the tmt source
directory.

test/fmf/integration-tests/test.sh

index 73771d42372079459878d464765b010ea0f039bc..0a1595fa9726820a0e4a6fdcf2c2b27293dff286 100755 (executable)
@@ -23,8 +23,11 @@ setenforce 0 || true
 # execute:
 #   how: tmt
 
+shopt -s extglob
+
 if [[ -n "${TMT_SOURCE_DIR:-}" ]]; then
-    pushd "$TMT_SOURCE_DIR/*/"
+    # Match either directories ending with branch names (e.g. systemd-fmf) or releases (e.g systemd-257.1).
+    pushd "$TMT_SOURCE_DIR"/systemd-+([0-9a-z.~])/
 elif [[ -n "${PACKIT_TARGET_URL:-}" ]]; then
     # Prepare systemd source tree
     git clone "$PACKIT_TARGET_URL" systemd --branch "$PACKIT_TARGET_BRANCH"