From: Luca Boccassi Date: Wed, 16 Jun 2021 20:50:23 +0000 (+0100) Subject: test: do not run 'meson configure' if NO_BUILD is set X-Git-Tag: v249-rc2~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63878c52beec442f1b3314ca223e54c897de499b;p=thirdparty%2Fsystemd.git test: do not run 'meson configure' if NO_BUILD is set 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 --- diff --git a/test/test-functions b/test/test-functions index f9f9d6a9e6a..a82e9f73e8c 100644 --- a/test/test-functions +++ b/test/test-functions @@ -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))