ninja: Entering directory `/home/zbyszek/src/systemd/build'
ninja: no work to do.
--x-- Running TEST-01-BASIC --x--
-+ make -C TEST-01-BASIC BUILD_DIR=/home/zbyszek/src/systemd/build clean setup run
++ make -C TEST-01-BASIC clean setup run
make: Entering directory '/home/zbyszek/src/systemd/test/TEST-01-BASIC'
TEST-01-BASIC CLEANUP: Basic systemd setup
TEST-01-BASIC SETUP: Basic systemd setup
make: Leaving directory '/home/zbyszek/src/systemd/test/TEST-01-BASIC'
--x-- Result of TEST-01-BASIC: 0 --x--
--x-- Running TEST-02-CRYPTSETUP --x--
-+ make -C TEST-02-CRYPTSETUP BUILD_DIR=/home/zbyszek/src/systemd/build clean setup run
++ make -C TEST-02-CRYPTSETUP clean setup run
If one of the tests fails, then $subdir/test.log contains the log file of
the test.
-BUILD_DIR=$(shell ../../tools/find-build-dir.sh)
-
all setup run clean clean-again:
- @TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR) ./test.sh --$@
+ @TEST_BASE_DIR=../ ./test.sh --$@
.PHONY: all setup run clean clean-again
-BUILD_DIR=$(shell ../../tools/find-build-dir.sh)
-
all setup run clean clean-again:
- @TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR) ./test.sh --$@
+ @TEST_BASE_DIR=../ ./test.sh --$@
# finish option is used to run checks that can only be run outside of
# the test execution. Example case, honor first shutdown, proof is obtained
# the test will loop and will be terminated via a command timeout.
# This just provides concrete confirmation.
finish:
- @TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR) ./fini.sh --$@
+ @TEST_BASE_DIR=../ ./fini.sh --$@
.PHONY: all setup run clean clean-again finish
# cache.
if [ $do_clean = 1 ]; then
for TEST in TEST-??-* ; do
- ( set -x ; make -C "$TEST" "BUILD_DIR=$BUILD_DIR" clean )
+ ( set -x ; make -C "$TEST" clean )
done
[ -n "$args_no_clean" ] || exit 0
echo -e "\n--x-- Running $TEST --x--"
set +e
- ( set -x ; make -C "$TEST" "BUILD_DIR=$BUILD_DIR" $args_no_clean )
+ ( set -x ; make -C "$TEST" $args_no_clean )
RESULT=$?
set -e
echo "--x-- Result of $TEST: $RESULT --x--"
if [ $FAILURES -eq 0 -a $do_clean = 1 ]; then
for TEST in ${!results[@]}; do
- ( set -x ; make -C "$TEST" "BUILD_DIR=$BUILD_DIR" clean-again )
+ ( set -x ; make -C "$TEST" clean-again )
done
fi
SOURCE_DIR=$(realpath "$TEST_BASE_DIR/..")
TOOLS_DIR="$SOURCE_DIR/tools"
+# note that find-build-dir.sh will return $BUILD_DIR if provided, else it will try to find it
+if ! BUILD_DIR=$($TOOLS_DIR/find-build-dir.sh); then
+ echo "ERROR: no build found, please set BUILD_DIR" >&2
+ exit 1
+fi
+
PATH_TO_INIT=$ROOTLIBDIR/systemd
[ "$SYSTEMD_JOURNALD" ] || SYSTEMD_JOURNALD=$(which -a $BUILD_DIR/systemd-journald $ROOTLIBDIR/systemd-journald 2>/dev/null | grep '^/' -m1)
[ "$SYSTEMD_JOURNAL_REMOTE" ] || SYSTEMD_JOURNAL_REMOTE=$(which -a $BUILD_DIR/systemd-journal-remote $ROOTLIBDIR/systemd-journal-remote 2>/dev/null | grep '^/' -m1)