]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: allow run-integration-tests.sh to run without build
authorDan Streetman <ddstreet@canonical.com>
Tue, 17 Nov 2020 20:55:47 +0000 (15:55 -0500)
committerDan Streetman <ddstreet@canonical.com>
Tue, 26 Jan 2021 22:09:48 +0000 (17:09 -0500)
test/README.testsuite
test/run-integration-tests.sh

index a05a9936a69ffc6d5524ea612346b9da62cee3d2..da989c1e0d2ff549afe19f4009cbc25bd5e5ca65 100644 (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
 =======================
 
index 219216ac566664afc50465a8fa0fb89a0f872e6d..34fa4f56a207ea21f3acb6914140c07195fddd2a 100755 (executable)
@@ -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