]> 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:49:16 +0000 (08:49 +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.)

.gitlab-ci.yml

index a25e48e696701e590672f16fe3efd353a8f26038..36b364316ca26b160b42dfa99aa6a6d8348b0200 100644 (file)
@@ -222,7 +222,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