test: don't check for -Dinstall-tests=true with NO_BUILD=1
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 14 Dec 2023 14:06:46 +0000 (15:06 +0100)
committerLuca Boccassi <bluca@debian.org>
Wed, 24 Jan 2024 20:03:15 +0000 (20:03 +0000)
(cherry picked from commit 58bcbad86cc910e007fae3c66c3a5cfc17046801)

Gbp-Pq: Name test-don-t-check-for-Dinstall-tests-true-with-NO_BUILD-1.patch

test/test-functions

index 8f04a37db94eb05e73bc3bdce7d69b33d0fa3314..948a00bc210ed41d4528b2ab9203c54d63f14167 100644 (file)
@@ -3345,9 +3345,10 @@ test_create_image() {
 }
 
 test_setup() {
-    if get_bool "${TEST_REQUIRE_INSTALL_TESTS:?}" && \
-            command -v meson >/dev/null && \
-            [[ "$(meson configure "${BUILD_DIR:?}" | grep install-tests | awk '{ print $2 }')" != "true" ]]; then
+    if ! get_bool "$NO_BUILD" && \
+         get_bool "${TEST_REQUIRE_INSTALL_TESTS:?}" && \
+         command -v meson >/dev/null && \
+         [[ "$(meson configure "${BUILD_DIR:?}" | grep install-tests | awk '{ print $2 }')" != "true" ]]; then
         dfatal "$BUILD_DIR needs to be built with -Dinstall-tests=true"
         exit 1
     fi