about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2023-08-07 09:56:34 +0200
committerJakub Beránek <berykubik@gmail.com>2023-08-07 09:56:34 +0200
commit8d3360830ccc0d0edb2ed93bb6e59a7a028a9a2d (patch)
treec98b9377d33f4fdb823eae5875620543aeb82be8
parent1cabb8ed2301faf193132e71ca5b10f82913e48a (diff)
downloadrust-8d3360830ccc0d0edb2ed93bb6e59a7a028a9a2d.tar.gz
rust-8d3360830ccc0d0edb2ed93bb6e59a7a028a9a2d.zip
Do not hide CI error logs in a group when a failure happens
-rwxr-xr-xsrc/ci/run.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ci/run.sh b/src/ci/run.sh
index da1960fc057..483cb42ae6a 100755
--- a/src/ci/run.sh
+++ b/src/ci/run.sh
@@ -154,13 +154,25 @@ fi
 # check for clock drifts. An HTTP URL is used instead of HTTPS since on Azure
 # Pipelines it happened that the certificates were marked as expired.
 datecheck() {
-  echo "::group::Clock drift check"
+  # If an error has happened, we do not want to start a new group, because that will collapse
+  # a previous group that might have contained the error log.
+  exit_code=$?
+
+  if [ $exit_code -eq 0 ]
+  then
+    echo "::group::Clock drift check"
+  fi
+
   echo -n "  local time: "
   date
   echo -n "  network time: "
   curl -fs --head http://ci-caches.rust-lang.org | grep ^Date: \
       | sed 's/Date: //g' || true
-  echo "::endgroup::"
+
+  if [ $exit_code -eq 0 ]
+  then
+    echo "::endgroup::"
+  fi
 }
 datecheck
 trap datecheck EXIT