]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
ci: run TEST_CONTAINER_COMMAND before configure runs
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 10 Jan 2026 11:21:43 +0000 (06:21 -0500)
committerLaszlo <laszlo.gombos@gmail.com>
Sat, 10 Jan 2026 14:12:45 +0000 (09:12 -0500)
Move running TEST_CONTAINER_COMMAND during CI tests
earlier so that packages can be installed/uninstalled
before configure runs.

test/test-container.sh

index a64723286b26fd294e9662dc56598ecbe288bbce..ced80b0d29a34beedca383b72fc580860ef1eadc 100755 (executable)
@@ -8,6 +8,9 @@ if command -v systemd-detect-virt > /dev/null && ! systemd-detect-virt -c &> /de
     exit 1
 fi
 
+# allow the execution of arbitrary commands within the test container
+[[ -n ${TEST_CONTAINER_COMMAND-} ]] && eval "$TEST_CONTAINER_COMMAND"
+
 set -eu
 if [ "${V-}" = "2" ]; then set -x; fi
 
@@ -27,9 +30,6 @@ if [ "${V-}" = "2" ]; then set -x; fi
 # shellcheck disable=SC2086
 ./configure --enable-test ${CONFIGURE_ARG-}
 
-# allow the execution of arbitrary commands within the test container
-[[ -n ${TEST_CONTAINER_COMMAND-} ]] && eval "$TEST_CONTAINER_COMMAND"
-
 # treat warnings as error
 # shellcheck disable=SC2086
 CFLAGS="-Wextra -Werror" make TEST_RUN_ID="${TEST_RUN_ID:=${1-}}" TESTS="${TESTS:=${2-}}" V="${V:=1}" ${MAKEFLAGS-} ${TARGETS:=all install check}