1 |
commit: 4b38da959964050bb8a9160123b6ebe563a845fa |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 2 09:04:07 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 2 09:04:36 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=4b38da95 |
7 |
|
8 |
scripts/auto-bootstraps/analyse_result: print snapshot tree in use |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
scripts/auto-bootstraps/analyse_result.py | 42 +++++++++++++++++++++++-------- |
13 |
1 file changed, 31 insertions(+), 11 deletions(-) |
14 |
|
15 |
diff --git a/scripts/auto-bootstraps/analyse_result.py b/scripts/auto-bootstraps/analyse_result.py |
16 |
index dbe0d4c729..b67e494bd7 100755 |
17 |
--- a/scripts/auto-bootstraps/analyse_result.py |
18 |
+++ b/scripts/auto-bootstraps/analyse_result.py |
19 |
@@ -118,6 +118,7 @@ with os.scandir(resultsdir) as it: |
20 |
|
21 |
elapsedtime = None |
22 |
haslssl = False |
23 |
+ snapshot = None |
24 |
if suc: |
25 |
elapsedf = os.path.join(resultsdir, arch, "%s" % suc, "elapsedtime") |
26 |
if os.path.exists(elapsedf): |
27 |
@@ -125,16 +126,30 @@ with os.scandir(resultsdir) as it: |
28 |
l = f.readline() |
29 |
if l is not '': |
30 |
elapsedtime = int(l) |
31 |
- mconf = os.path.join(resultsdir, arch, "%s" % suc, "make.conf") |
32 |
- if os.path.exists(mconf): |
33 |
- with open(mconf, 'rb') as f: |
34 |
- l = [x.decode('utf-8', 'ignore') for x in f.readlines()] |
35 |
- l = list(filter(lambda x: 'USE=' in x, l)) |
36 |
- for x in l: |
37 |
- if 'libressl' in x: |
38 |
- haslssl = True |
39 |
- |
40 |
- archs[arch] = (fail, state, suc, elapsedtime, haslssl) |
41 |
+ |
42 |
+ mconf = os.path.join(resultsdir, arch, "%s" % suc, "make.conf") |
43 |
+ if os.path.exists(mconf): |
44 |
+ with open(mconf, 'rb') as f: |
45 |
+ l = [x.decode('utf-8', 'ignore') for x in f.readlines()] |
46 |
+ l = list(filter(lambda x: 'USE=' in x, l)) |
47 |
+ for x in l: |
48 |
+ if 'libressl' in x: |
49 |
+ haslssl = True |
50 |
+ |
51 |
+ mconf = os.path.join(resultsdir, arch, "%s" % suc, "stage1.log") |
52 |
+ if os.path.exists(mconf): |
53 |
+ with open(mconf, 'rb') as f: |
54 |
+ l = [x.decode('utf-8', 'ignore') for x in f.readlines()] |
55 |
+ for x in l: |
56 |
+ if 'Fetching ' in x: |
57 |
+ if 'portage-latest.tar.bz2' in x: |
58 |
+ snapshot = 'latest' |
59 |
+ elif 'prefix-overlay-' in x: |
60 |
+ snapshot = re.split('[-.]', x)[2] |
61 |
+ elif 'total size is' in x: |
62 |
+ snapshot = 'rsync' |
63 |
+ |
64 |
+ archs[arch] = (fail, state, suc, elapsedtime, haslssl, snapshot) |
65 |
if not suc: |
66 |
color = '\033[1;31m' # red |
67 |
elif fail and suc < fail: |
68 |
@@ -157,7 +172,7 @@ with open(os.path.join(resultsdir, 'index.html'), "w") as h: |
69 |
h.write("<th>last successful run</th><th>last failed run</th>") |
70 |
h.write("<th>failure</th>") |
71 |
for arch in sarchs: |
72 |
- fail, errcode, suc, et, lssl = archs[arch] |
73 |
+ fail, errcode, suc, et, lssl, snap = archs[arch] |
74 |
if not suc: |
75 |
state = 'red' |
76 |
elif fail and suc < fail: |
77 |
@@ -170,6 +185,11 @@ with open(os.path.join(resultsdir, 'index.html'), "w") as h: |
78 |
tags = tags + ''' |
79 |
<span style="border-radius: 5px; background-color: purple; color: white; |
80 |
display: inline-block; font-size: x-small; padding: 3px 4px; text-transform: uppercase !important;">libressl</span> |
81 |
+''' |
82 |
+ if snap: |
83 |
+ tags = tags + ''' |
84 |
+<span style="border-radius: 5px; background-color: darkblue; color: white; |
85 |
+display: inline-block; font-size: x-small; padding: 3px 4px; text-transform: uppercase !important;">''' + snap + '''</span> |
86 |
''' |
87 |
|
88 |
h.write('<tr>') |