git: b00e7ce4036e - stable/13 - Cirrus-CI: add some timing info on pkg install failure
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Feb 2022 17:40:33 UTC
The branch stable/13 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=b00e7ce4036e4bb7a9f20c6c28858e0aebc1057a
commit b00e7ce4036e4bb7a9f20c6c28858e0aebc1057a
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-06-02 17:08:29 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-02-09 17:39:50 +0000
Cirrus-CI: add some timing info on pkg install failure
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 77013d11e6483b970af25e13c9b892075742f7e5)
---
.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