summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-02-02 00:19:30 +0100
committerHarald Hoyer <harald@redhat.com>2015-02-03 09:50:45 +0100
commit53d90f9582f96208b3674da823ad1a3d2c3b1aa4 (patch)
tree11a6b4becc3f7630be5c0eb1c7b5210c5f28f0a4 /test
parent3486cb6cfa3d32a95c0daf02c7510fdf372507bf (diff)
tests: don't hardcode systemctl path
Get it from type -P instead, to support --enable-split-usr.
Diffstat (limited to 'test')
-rw-r--r--test/end.service.in (renamed from test/end.service)2
-rw-r--r--test/test-functions3
2 files changed, 3 insertions, 2 deletions
diff --git a/test/end.service b/test/end.service.in
index 0f04dfeb20..4857ffe02b 100644
--- a/test/end.service
+++ b/test/end.service.in
@@ -3,4 +3,4 @@ Description=End the test
After=testsuite.service
[Service]
-ExecStart=/usr/bin/systemctl poweroff --no-block
+ExecStart=@SYSTEMCTL@ poweroff --no-block
diff --git a/test/test-functions b/test/test-functions
index a0f1bf4eb2..42c954d565 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -293,7 +293,8 @@ install_terminfo() {
}
setup_testsuite() {
- cp $TEST_BASE_DIR/{testsuite.target,end.service} $initdir/etc/systemd/system/
+ cp $TEST_BASE_DIR/testsuite.target $initdir/etc/systemd/system/
+ sed "s#@SYSTEMCTL@#$(type -P systemctl)#g" $TEST_BASE_DIR/end.service.in > $initdir/etc/systemd/system/end.service
mkdir -p $initdir/etc/systemd/system/testsuite.target.wants
ln -fs $TEST_BASE_DIR/testsuite.service $initdir/etc/systemd/system/testsuite.target.wants/testsuite.service