]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test/TEST-01-BASIC: also install testsuite.target 18340/head
authorDan Streetman <ddstreet@canonical.com>
Wed, 18 Nov 2020 14:39:50 +0000 (09:39 -0500)
committerDan Streetman <ddstreet@canonical.com>
Tue, 26 Jan 2021 22:38:23 +0000 (17:38 -0500)
This test doesn't require the tests to be installed, so it must manually
install required test services and targets itself, including the default
target of testsuite.target

Also use $TEST_UNITS_DIR which is set by test-functions instead of
calculating the path

test/TEST-01-BASIC/test.sh

index 606b0dbfaf9b4f7fc7880de0bba738b49bdcad45..66c35fe2b723a176955924745cea0c186069da6e 100755 (executable)
@@ -9,8 +9,9 @@ TEST_REQUIRE_INSTALL_TESTS=0
 
 test_append_files() {
     # install tests manually so the test is functional even when -Dinstall-tests=false
-    mkdir -p $1/usr/lib/systemd/tests/testdata/units/
-    cp -v $(dirname $0)/../units/{testsuite-01,end}.service $1/usr/lib/systemd/tests/testdata/units/
+    local dst="$1/usr/lib/systemd/tests/testdata/units/"
+    mkdir -p "$dst"
+    cp -v $TEST_UNITS_DIR/{testsuite-01,end}.service $TEST_UNITS_DIR/testsuite.target "$dst"
 }
 
 do_test "$@" 01