Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 2021 19:02:12 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 77013d11e648 - main - Cirrus-CI: add some timing info on pkg install failure
Message-ID:  <202108041902.174J2Ci4055075@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=77013d11e6483b970af25e13c9b892075742f7e5

commit 77013d11e6483b970af25e13c9b892075742f7e5
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-06-02 17:08:29 +0000
Commit:     Ed Maste <emaste@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108041902.174J2Ci4055075>