commit: 4b38da959964050bb8a9160123b6ebe563a845fa
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 2 09:04:07 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jul 2 09:04:36 2019 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=4b38da95
scripts/auto-bootstraps/analyse_result: print snapshot tree in use
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
scripts/auto-bootstraps/analyse_result.py | 42 +++++++++++++++++++++++--------
1 file changed, 31 insertions(+), 11 deletions(-)
diff --git a/scripts/auto-bootstraps/analyse_result.py
b/scripts/auto-bootstraps/analyse_result.py
index dbe0d4c729..b67e494bd7 100755
--- a/scripts/auto-bootstraps/analyse_result.py
+++ b/scripts/auto-bootstraps/analyse_result.py
@@ -118,6 +118,7 @@ with os.scandir(resultsdir) as it:
elapsedtime = None
haslssl = False
+ snapshot = None
if suc:
elapsedf = os.path.join(resultsdir, arch, "%s" % suc,
"elapsedtime")
if os.path.exists(elapsedf):
@@ -125,16 +126,30 @@ with os.scandir(resultsdir) as it:
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
-
- archs[arch] = (fail, state, suc, elapsedtime, haslssl)
+
+ 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)
if not suc:
color = '\033[1;31m' # red
elif fail and suc < fail:
@@ -157,7 +172,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 = archs[arch]
+ fail, errcode, suc, et, lssl, snap = archs[arch]
if not suc:
state = 'red'
elif fail and suc < fail:
@@ -170,6 +185,11 @@ with open(os.path.join(resultsdir, 'index.html'), "w") as
h:
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>')