]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix the "make depend" check in GitLab CI
authorMichał Kępień <michal@isc.org>
Fri, 30 Oct 2020 07:49:16 +0000 (08:49 +0100)
committerMichał Kępień <michal@isc.org>
Fri, 30 Oct 2020 07:53:46 +0000 (08:53 +0100)
"make depend" prints errors to stderr, not to stdout.  This means that
the check for "make depend" errors currently used in the definition of
every build job in GitLab CI could never fail.  Fix that check by
redirecting stderr to stdout.  Also employ tee to prevent the output of
"make depend" from being hidden in the job log.  (While using tee hides
the exit code of "make depend" itself, the next line still checks for
errors anyway.)

(cherry picked from commit 0ab099ca09bc026f92a836a17648032d617a420e)

.gitlab-ci.yml

index d7d64c97b0afafa46d1edcf17a36071785f807df..3b729e5da1f57085507616cdd62f591753f2e410 100644 (file)
@@ -223,7 +223,8 @@ stages:
     - test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
   script:
     - *configure
-    - make depend | grep "error:" && exit 1
+    - make -j${BUILD_PARALLEL_JOBS:-1} depend 2>&1 | tee make-depend.log
+    - grep -F "error:" make-depend.log && exit 1
     - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
     - test -z "${RUN_MAKE_INSTALL}" || make install
     - test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install