summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-07-01 18:01:30 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-07-18 16:05:06 +0200
commit209f4b9e33a79e648d46a53c05ea94f8c1676c5f (patch)
treea2d462595ae4f7bcf23b6af997e60bb18dafda0d /test
parentbuild-sys: drop gitignore patterns for in-tree builds (diff)
downloadsystemd-209f4b9e33a79e648d46a53c05ea94f8c1676c5f.tar.xz
systemd-209f4b9e33a79e648d46a53c05ea94f8c1676c5f.zip
test: convert test/ to use meson install
Automatic rebuilding is removed: it doesn't play well with ninja, because ninja always writes logs, and even if nothing needs to be built, it will make the log file owned by root. So let's just remove this, and say that the user must always do the build first. I'm also keeping make for the tests, because ninja doesn't play well with sudo. Since the build directory is arbitrary, it needs to be specified, e.g. sudo make BUILD_DIR=/home/zbyszek/src/systemd/build1 -C test/TEST-01-BASIC/
Diffstat (limited to 'test')
-rw-r--r--test/TEST-01-BASIC/Makefile12
-rw-r--r--test/TEST-13-NSPAWN-SMOKE/Makefile10
l---------[-rw-r--r--]test/TEST-14-MACHINE-ID/Makefile11
-rw-r--r--test/test-functions6
4 files changed, 8 insertions, 31 deletions
diff --git a/test/TEST-01-BASIC/Makefile b/test/TEST-01-BASIC/Makefile
index 5e89a29eff..c29fd06763 100644
--- a/test/TEST-01-BASIC/Makefile
+++ b/test/TEST-01-BASIC/Makefile
@@ -1,10 +1,2 @@
-all:
- @make -s --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --all
-setup:
- @make --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --setup
-clean:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --clean
-run:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --run
+all setup clean run:
+ @basedir=../.. TEST_BASE_DIR=../ ./test.sh --$@
diff --git a/test/TEST-13-NSPAWN-SMOKE/Makefile b/test/TEST-13-NSPAWN-SMOKE/Makefile
index ff1470f852..e58c0d909b 100644
--- a/test/TEST-13-NSPAWN-SMOKE/Makefile
+++ b/test/TEST-13-NSPAWN-SMOKE/Makefile
@@ -1,11 +1,5 @@
-all:
- @make -s --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --all
-setup:
- @make --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --setup
+all setup run:
+ @basedir=../.. TEST_BASE_DIR=../ ./test.sh --$@
clean:
@basedir=../.. TEST_BASE_DIR=../ ./test.sh --clean
@rm -f has-overflow
-run:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --run
diff --git a/test/TEST-14-MACHINE-ID/Makefile b/test/TEST-14-MACHINE-ID/Makefile
index 5e89a29eff..e9f93b1104 100644..120000
--- a/test/TEST-14-MACHINE-ID/Makefile
+++ b/test/TEST-14-MACHINE-ID/Makefile
@@ -1,10 +1 @@
-all:
- @make -s --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --all
-setup:
- @make --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --setup
-clean:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --clean
-run:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --run
+../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/test-functions b/test/test-functions
index ea4f700841..64926089d4 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -155,7 +155,7 @@ $KERNEL_APPEND \
run_nspawn() {
[[ -d /run/systemd/system ]] || return 1
- local _nspawn_cmd="../../systemd-nspawn --register=no --kill-signal=SIGKILL --directory=$TESTDIR/nspawn-root $ROOTLIBDIR/systemd $KERNEL_APPEND"
+ local _nspawn_cmd="$BUILD_DIR/systemd-nspawn --register=no --kill-signal=SIGKILL --directory=$TESTDIR/nspawn-root $ROOTLIBDIR/systemd $KERNEL_APPEND"
if [[ "$NSPAWN_TIMEOUT" != "infinity" ]]; then
_nspawn_cmd="timeout --foreground $NSPAWN_TIMEOUT $_nspawn_cmd"
fi
@@ -317,7 +317,7 @@ install_dmevent() {
install_systemd() {
# install compiled files
- (cd $TEST_BASE_DIR/..; set -x; make DESTDIR=$initdir install)
+ (set -x; DESTDIR=$initdir ninja -C $BUILD_DIR install)
# remove unneeded documentation
rm -fr $initdir/usr/share/{man,doc}
# we strip binaries since debug symbols increase binaries size a lot
@@ -396,7 +396,7 @@ EOF
install_execs() {
ddebug "install any Execs from the service files"
(
- export PKG_CONFIG_PATH=$TEST_BASE_DIR/../src/core/
+ export PKG_CONFIG_PATH=$BUILD_DIR/src/core/
systemdsystemunitdir=$(pkg-config --variable=systemdsystemunitdir systemd)
systemduserunitdir=$(pkg-config --variable=systemduserunitdir systemd)
egrep -ho '^Exec[^ ]*=[^ ]+' $initdir/{$systemdsystemunitdir,$systemduserunitdir}/*.service \