summary refs log tree commit diff
path: root/.gitlab-ci/run-test.sh
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci/run-test.sh')
-rwxr-xr-x.gitlab-ci/run-test.sh24
1 files changed, 19 insertions, 5 deletions
diff --git a/.gitlab-ci/run-test.sh b/.gitlab-ci/run-test.sh
index 4091cdd4..2008c189 100755
--- a/.gitlab-ci/run-test.sh
+++ b/.gitlab-ci/run-test.sh
@@ -106,22 +106,36 @@ check_run_clean() {
     return 0
 }
 
+die_with_testlog() {
+    mv ./build/meson-logs/testlog.txt ./testlog.txt
+    exit 1
+}
+
 if check_run_clean meson+gcc+docs+valgrind ; then
-    BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
+    BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh || die_with_testlog
     mv INST/share/gtk-doc/html "$ARTIFACT_DIR/docs-html"
 fi
 
-check_run_clean meson+clang && BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
-check_run_clean rpm+meson && test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
+if check_run_clean meson+clang; then
+    BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh || die_with_testlog
+fi
+
+if check_run_clean rpm+meson; then
+    if [[ $IS_FEDORA = 1 ]]; then
+        ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson || die_with_testlog
+    fi
+fi
 
 if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
-    SIGN_SOURCE=0 ./contrib/fedora/rpm/build_clean.sh -r
+    SIGN_SOURCE=0 ./contrib/fedora/rpm/build_clean.sh -r || die_with_testlog
     mv ./build/meson-dist/NetworkManager-1*.tar.xz "$ARTIFACT_DIR/"
     mv ./contrib/fedora/rpm/latest/SRPMS/NetworkManager-1*.src.rpm "$ARTIFACT_DIR/"
     do_clean
 fi
 
-check_run_clean tarball+meson && BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
+if check_run_clean tarball+meson; then
+    BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh || die_with_testlog
+fi
 
 ###############################################################################