git: 77013d11e648 - main - Cirrus-CI: add some timing info on pkg install failure
Ed Maste
emaste at FreeBSD.org
Wed Aug 4 19:02:12 UTC 2021
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=77013d11e6483b970af25e13c9b892075742f7e5
commit 77013d11e6483b970af25e13c9b892075742f7e5
Author: Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2021-06-02 17:08:29 +0000
Commit: Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-08-04 19:02:00 +0000
Cirrus-CI: add some timing info on pkg install failure
Sponsored by: The FreeBSD Foundation
---
.cirrus-ci/pkg-install.sh | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/.cirrus-ci/pkg-install.sh b/.cirrus-ci/pkg-install.sh
index ef83e5284078..bcb781191023 100644
--- a/.cirrus-ci/pkg-install.sh
+++ b/.cirrus-ci/pkg-install.sh
@@ -1,10 +1,11 @@
#!/bin/sh
set -e
+start_time=$(date +%s)
pkg install -y "$@" && exit 0
cat <<EOF
-pkg install failed
+pkg install failed after $(($(date +%s) - $start_time))s
dmesg tail:
$(dmesg | tail)
@@ -12,4 +13,10 @@ $(dmesg | tail)
trying again
EOF
-pkg install -y "$@"
+start_time=$(date +%s)
+pkg install -y "$@" && exit 0
+
+cat <<EOF
+second pkg install failed after $(($(date +%s) - $start_time))s
+EOF
+exit 1
More information about the dev-commits-src-main
mailing list