test: allow run-integration-tests.sh to run without build

This commit is contained in:
Dan Streetman 2020-11-17 15:55:47 -05:00
parent 8fa038085e
commit 232add5c47
2 changed files with 17 additions and 1 deletions

View file

@ -41,6 +41,14 @@ $ sudo make -C test/TEST-01-BASIC BUILD_DIR=../../some-other-build/ ...
Note that in the second case, the path is relative to the test case directory.
An absolute path may also be used in both cases.
Testing installed binaries instead of built
===========================================
To run the extended testsuite using the systemd installed on the system instead
of the systemd from a build, use the NO_BUILD=1:
$ sudo NO_BUILD=1 test/run-integration-tests
Configuration variables
=======================

View file

@ -1,7 +1,15 @@
#!/usr/bin/env bash
set -e
BUILD_DIR="$($(dirname "$0")/../tools/find-build-dir.sh)"
if [ "$NO_BUILD" ]; then
BUILD_DIR=""
elif BUILD_DIR="$($(dirname "$0")/../tools/find-build-dir.sh)"; then
ninja -C "$BUILD_DIR"
else
echo "No build found, please set BUILD_DIR or NO_BUILD" >&2
exit 1
fi
if [ $# -gt 0 ]; then
args="$@"
else