]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: do not run 'meson configure' if NO_BUILD is set
authorLuca Boccassi <bluca@debian.org>
Wed, 16 Jun 2021 20:50:23 +0000 (21:50 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 17 Jun 2021 08:21:17 +0000 (17:21 +0900)
There is no build tree and packages are used, so it cannot work. Unlikely
that static linking has been set for those builds anyway.

Fixes https://github.com/systemd/systemd/issues/19955

test/test-functions

index f9f9d6a9e6ad25e392683a4e46408fa420b35e98..a82e9f73e8c68c9c5d6142f92be367d37a00b257 100644 (file)
@@ -1006,11 +1006,13 @@ create_empty_image() {
     fi
 
     local size=500
-    if meson configure "${BUILD_DIR:?}" | grep 'static-lib\|standalone-binaries' | awk '{ print $2 }' | grep -q 'true'; then
-        size=$((size+=200))
-    fi
-    if meson configure "${BUILD_DIR:?}" | grep 'link-.*-shared' | awk '{ print $2 }' | grep -q 'false'; then
-        size=$((size+=200))
+    if [ -z "$NO_BUILD" ]; then
+        if meson configure "${BUILD_DIR:?}" | grep 'static-lib\|standalone-binaries' | awk '{ print $2 }' | grep -q 'true'; then
+            size=$((size+=200))
+        fi
+        if meson configure "${BUILD_DIR:?}" | grep 'link-.*-shared' | awk '{ print $2 }' | grep -q 'false'; then
+            size=$((size+=200))
+        fi
     fi
     if [[ "$STRIP_BINARIES" = "no" ]]; then
         size=$((4 * size))