test: find $BUILD_DIR in test-functions, remove from other scripts
The $BUILD_DIR is only used in test-functions, and doesn't need to be specified in any other scripts. Additionally, to be able to allow the integration test suite to be run against locally installed binaries, instead of built binaries, moving BUILD_DIR logic completely into test-functions allows later patches to be simpler.
This commit is contained in:
@@ -49,6 +49,12 @@ TEST_UNITS_DIR="$TEST_BASE_DIR/units"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user