From: Zbigniew Jędrzejewski-Szmek Date: Tue, 10 Dec 2019 15:05:48 +0000 (+0100) Subject: test: move TEST-08-ISSUE-2730 setup to static files and meson scripts X-Git-Tag: v246-rc1~682^2~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c84752398be61952c94c7413926f173f270eaea6;p=thirdparty%2Fsystemd.git test: move TEST-08-ISSUE-2730 setup to static files and meson scripts Unfortunately meson does not install symlinks, but copies the symlink destination instead. So symlinks need to be created by a script. This commit adds both symlinks in test/testsuite-08.units/ and meson scriptlet calls. Strictly speaking, the first is not necessary, since nothing reads stuff directly from the source tree. --- diff --git a/test/TEST-08-ISSUE-2730/test.sh b/test/TEST-08-ISSUE-2730/test.sh index 2fedef7b58a..7acca157d27 100755 --- a/test/TEST-08-ISSUE-2730/test.sh +++ b/test/TEST-08-ISSUE-2730/test.sh @@ -17,54 +17,9 @@ test_setup() { setup_basic_environment - # setup the testsuite service - cat >$initdir/etc/systemd/system/testsuite.service < /testok; systemctl poweroff' -Type=oneshot -EOF - - rm $initdir/etc/fstab - cat >$initdir/etc/systemd/system/-.mount <$initdir/etc/systemd/system/systemd-remount-fs.service </testok; systemctl poweroff' +Type=oneshot diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh index da0d13a341f..cdd5214125f 100755 --- a/tools/meson-make-symlink.sh +++ b/tools/meson-make-symlink.sh @@ -5,8 +5,8 @@ set -eu # and we need to create the target directory... mkdir -vp "$(dirname "${DESTDIR:-}$2")" -if [ "$(dirname $1)" = . ]; then - ln -vfs -T "$1" "${DESTDIR:-}$2" +if [ "$(dirname $1)" = . -o "$(dirname $1)" = .. ]; then + ln -vfs -T -- "$1" "${DESTDIR:-}$2" else - ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2" + ln -vfs -T --relative -- "${DESTDIR:-}$1" "${DESTDIR:-}$2" fi