From: Benjamin Drung Date: Wed, 16 Aug 2023 11:56:41 +0000 (+0200) Subject: test: skip test 98 if dracut-util is not available X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dbee4f37cb933fcb4eeb89eb7a2c8fd687eb9079;p=thirdparty%2Fdracut.git test: skip test 98 if dracut-util is not available Building `dracut-util` requires the source code to be present and prevents running the test against the installed system. Check that `dracut-util` and rely on the test environment to build `dracut-util` beforehand. --- diff --git a/test/TEST-98-GETARG/test.sh b/test/TEST-98-GETARG/test.sh index 74a1bec5d..8f628a259 100755 --- a/test/TEST-98-GETARG/test.sh +++ b/test/TEST-98-GETARG/test.sh @@ -7,11 +7,13 @@ TEST_DESCRIPTION="dracut getarg command" test_check() { - return 0 + if ! [[ -x "$PKGLIBDIR/dracut-util" ]]; then + echo "Test needs dracut-util... Skipping" + return 1 + fi } test_setup() { - make -C "$basedir" dracut-util ln -sfnr "$PKGLIBDIR"/dracut-util "$TESTDIR"/dracut-getarg ln -sfnr "$PKGLIBDIR"/dracut-util "$TESTDIR"/dracut-getargs ln -sfnr "$PKGLIBDIR"/modules.d/99base/dracut-lib.sh "$TESTDIR"/dracut-lib.sh