From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/auto-bootstraps/
Date: Tue, 2 Jul 2019 09:37:07 +0000 (UTC) [thread overview]
Message-ID: <1562060110.ad69711ccdffa7081597a063b1709c7abfcb9929.grobian@gentoo> (raw)
commit: ad69711ccdffa7081597a063b1709c7abfcb9929
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 2 09:35:10 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jul 2 09:35:10 2019 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ad69711c
scripts/auto-bootstraps/analyse_result: split out properties per run
success and failed runs aren't the same thing, so split out the tags for
them (libressl and bootstrap snapshot)
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
scripts/auto-bootstraps/analyse_result.py | 98 ++++++++++++++++++-------------
1 file changed, 57 insertions(+), 41 deletions(-)
diff --git a/scripts/auto-bootstraps/analyse_result.py b/scripts/auto-bootstraps/analyse_result.py
index b67e494bd7..2b0e04a101 100755
--- a/scripts/auto-bootstraps/analyse_result.py
+++ b/scripts/auto-bootstraps/analyse_result.py
@@ -116,40 +116,48 @@ with os.scandir(resultsdir) as it:
arch = f.name
fail, state, suc = analyse_arch(os.path.join(resultsdir, arch))
- elapsedtime = None
- haslssl = False
- snapshot = None
- if suc:
- elapsedf = os.path.join(resultsdir, arch, "%s" % suc, "elapsedtime")
+ infos = {}
+ for d in [ fail, suc ]:
+ elapsedtime = None
+ haslssl = False
+ snapshot = None
+
+ elapsedf = os.path.join(resultsdir, arch, "%s" % d, "elapsedtime")
if os.path.exists(elapsedf):
with open(elapsedf, 'rb') as f:
l = f.readline()
if l is not '':
elapsedtime = int(l)
- mconf = os.path.join(resultsdir, arch, "%s" % suc, "make.conf")
- if os.path.exists(mconf):
- with open(mconf, 'rb') as f:
- l = [x.decode('utf-8', 'ignore') for x in f.readlines()]
- l = list(filter(lambda x: 'USE=' in x, l))
- for x in l:
- if 'libressl' in x:
- haslssl = True
-
- mconf = os.path.join(resultsdir, arch, "%s" % suc, "stage1.log")
- if os.path.exists(mconf):
- with open(mconf, 'rb') as f:
- l = [x.decode('utf-8', 'ignore') for x in f.readlines()]
- for x in l:
- if 'Fetching ' in x:
- if 'portage-latest.tar.bz2' in x:
- snapshot = 'latest'
- elif 'prefix-overlay-' in x:
- snapshot = re.split('[-.]', x)[2]
- elif 'total size is' in x:
- snapshot = 'rsync'
-
- archs[arch] = (fail, state, suc, elapsedtime, haslssl, snapshot)
+ mconf = os.path.join(resultsdir, arch, "%s" % d, "make.conf")
+ if os.path.exists(mconf):
+ with open(mconf, 'rb') as f:
+ l = [x.decode('utf-8', 'ignore') for x in f.readlines()]
+ l = list(filter(lambda x: 'USE=' in x, l))
+ for x in l:
+ if 'libressl' in x:
+ haslssl = True
+
+ mconf = os.path.join(resultsdir, arch, "%s" % d, "stage1.log")
+ if os.path.exists(mconf):
+ with open(mconf, 'rb') as f:
+ l = [x.decode('utf-8', 'ignore') for x in f.readlines()]
+ for x in l:
+ if 'Fetching ' in x:
+ if 'portage-latest.tar.bz2' in x:
+ snapshot = 'latest'
+ elif 'prefix-overlay-' in x:
+ snapshot = re.split('[-.]', x)[2]
+ elif 'total size is' in x:
+ snapshot = 'rsync'
+
+ infos[d] = {
+ 'etime': elapsedtime,
+ 'libressl': haslssl,
+ 'snapshot': snapshot
+ }
+
+ archs[arch] = (fail, state, suc, infos)
if not suc:
color = '\033[1;31m' # red
elif fail and suc < fail:
@@ -161,6 +169,23 @@ with os.scandir(resultsdir) as it:
sarchs = sorted(archs, key=lambda a: '-'.join(a.split('-')[::-1]))
+def gentags(infos):
+ tags = ''
+ if infos.get('libressl', None):
+ tags = tags + '''
+<span style="border-radius: 5px; background-color: purple; color: white;
+display: inline-block; font-size: x-small; padding: 3px 4px; text-transform: uppercase !important;">libressl</span>
+'''
+
+ snap = infos.get('snapshot', None)
+ if snap:
+ tags = tags + '''
+<span style="border-radius: 5px; background-color: darkblue; color: white;
+display: inline-block; font-size: x-small; padding: 3px 4px; text-transform: uppercase !important;">''' + snap + '''</span>
+'''
+
+ return tags
+
# generate html edition
with open(os.path.join(resultsdir, 'index.html'), "w") as h:
h.write("<html>")
@@ -172,7 +197,7 @@ with open(os.path.join(resultsdir, 'index.html'), "w") as h:
h.write("<th>last successful run</th><th>last failed run</th>")
h.write("<th>failure</th>")
for arch in sarchs:
- fail, errcode, suc, et, lssl, snap = archs[arch]
+ fail, errcode, suc, infos = archs[arch]
if not suc:
state = 'red'
elif fail and suc < fail:
@@ -180,18 +205,6 @@ with open(os.path.join(resultsdir, 'index.html'), "w") as h:
else:
state = 'limegreen'
- tags = ''
- if lssl:
- tags = tags + '''
-<span style="border-radius: 5px; background-color: purple; color: white;
-display: inline-block; font-size: x-small; padding: 3px 4px; text-transform: uppercase !important;">libressl</span>
-'''
- if snap:
- tags = tags + '''
-<span style="border-radius: 5px; background-color: darkblue; color: white;
-display: inline-block; font-size: x-small; padding: 3px 4px; text-transform: uppercase !important;">''' + snap + '''</span>
-'''
-
h.write('<tr>')
h.write('<td bgcolor="%s" nowrap="nowrap">' % state)
@@ -200,7 +213,9 @@ display: inline-block; font-size: x-small; padding: 3px 4px; text-transform: upp
h.write("<td>")
if suc:
+ tags = gentags(infos[suc])
etxt = ''
+ et = infos[suc].get('elapsedtime', None)
if et:
if et > 86400:
etxt = ' (%.1f days)' % (et / 86400)
@@ -215,6 +230,7 @@ display: inline-block; font-size: x-small; padding: 3px 4px; text-transform: upp
h.write("<td>")
if fail:
+ tags = gentags(infos[fail])
h.write('<a href="%s/%s">%s</a>%s' % (arch, fail, fail, tags))
else:
h.write('<i>never</i>')
next reply other threads:[~2019-07-02 9:37 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 9:37 Fabian Groffen [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-06-16 7:47 [gentoo-commits] repo/proj/prefix:master commit in: scripts/auto-bootstraps/ Fabian Groffen
2024-04-05 15:09 Fabian Groffen
2024-04-05 11:45 Fabian Groffen
2024-04-02 17:31 Fabian Groffen
2024-03-30 12:13 Fabian Groffen
2024-03-28 16:12 Fabian Groffen
2024-03-02 12:57 Fabian Groffen
2024-02-24 9:10 Fabian Groffen
2024-02-05 11:54 Fabian Groffen
2024-01-29 18:59 Fabian Groffen
2024-01-15 10:37 Fabian Groffen
2024-01-14 10:48 Fabian Groffen
2024-01-14 10:46 Fabian Groffen
2024-01-14 10:46 Fabian Groffen
2023-08-31 6:36 Fabian Groffen
2023-06-20 9:08 Fabian Groffen
2023-06-20 8:34 Fabian Groffen
2023-05-31 9:19 Fabian Groffen
2023-05-30 6:01 Fabian Groffen
2023-05-26 14:33 Fabian Groffen
2023-05-26 14:30 Fabian Groffen
2022-05-31 11:10 Fabian Groffen
2022-05-31 9:16 Fabian Groffen
2021-12-30 12:25 Fabian Groffen
2021-12-07 8:35 Fabian Groffen
2021-02-20 14:19 Fabian Groffen
2021-02-05 17:48 Fabian Groffen
2021-01-17 18:42 Fabian Groffen
2021-01-10 10:53 Fabian Groffen
2021-01-05 19:09 Fabian Groffen
2021-01-05 19:09 Fabian Groffen
2020-12-09 15:19 Fabian Groffen
2020-12-09 12:20 Fabian Groffen
2020-12-08 7:26 Fabian Groffen
2020-11-28 10:03 Fabian Groffen
2020-11-28 10:02 Fabian Groffen
2020-11-27 10:58 Fabian Groffen
2020-11-27 10:58 Fabian Groffen
2020-11-24 9:27 Fabian Groffen
2020-06-07 12:12 Fabian Groffen
2020-06-01 8:56 Fabian Groffen
2020-06-01 8:37 Fabian Groffen
2020-06-01 7:47 Fabian Groffen
2019-07-14 9:07 Fabian Groffen
2019-07-02 9:37 Fabian Groffen
2019-07-02 9:04 Fabian Groffen
2019-06-21 19:01 Fabian Groffen
2019-06-18 10:42 Fabian Groffen
2019-06-16 18:44 Fabian Groffen
2019-06-14 9:30 Fabian Groffen
2019-06-14 7:50 Fabian Groffen
2019-06-13 19:21 Fabian Groffen
2019-06-06 18:56 Fabian Groffen
2019-05-22 20:12 Fabian Groffen
2019-05-22 17:33 Fabian Groffen
2019-03-22 14:13 Fabian Groffen
2019-03-14 8:15 Fabian Groffen
2019-03-06 11:24 Fabian Groffen
2019-03-06 11:18 Fabian Groffen
2019-03-06 11:09 Fabian Groffen
2019-03-06 11:09 Fabian Groffen
2019-03-06 11:09 Fabian Groffen
2019-02-21 16:36 Fabian Groffen
2019-02-21 16:31 Fabian Groffen
2019-02-21 11:38 Fabian Groffen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1562060110.ad69711ccdffa7081597a063b1709c7abfcb9929.grobian@gentoo \
--to=grobian@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox