-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildreport
executable file
·209 lines (167 loc) · 3.88 KB
/
buildreport
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#!/bin/bash
# Expecting the following variables to be passed in:
# TO
# REMOTE
# REMOTEURL
# BRANCH
# BUILDID
# TOPCOMMITS
# BUILDTIME
# Works on logs passed in by name
warn_grep() {
fgrep -i warning: $* |
fgrep -v "TODO: return_address should use unwind tables" |
fgrep -v "NPTL on non MMU needs fixing" |
fgrep -v "Wunused-const-variable=" |
egrep -v "Warning: ignoring incorrect section type for \.(init|fini)_array" |
egrep -v "syscall .* not implemented" |
sed "s@.*/build/@@g" |
sed "s@.*\.\./\.\./@@g"
}
warn_count() {
warn_grep $* | wc -l
}
warn_stats() {
warn_grep $* | sort | uniq -c | sort -n
}
dts_grep() {
fgrep -h /dts/ $* | sort -u
}
dts_count() {
dts_grep $* | wc -l
}
dts_stats() {
dts_grep $* | sort -n
}
sect_grep() {
fgrep "Section mismatch" $* |
sed "s@.*buildall.arm.@@g" |
sed "[email protected].*WARNING:@ WARNING:@g"
}
sect_count() {
sect_grep $* | wc -l
}
sect_stats() {
sect_grep $* | sort | uniq -c | sort -n
}
err_grep() {
egrep -i 'undefined|error:|No rule to make target' $* |
sed "s@.*/build/@@g" |
sed "s@.*\.\./\.\./@@g"
}
err_count() {
err_grep $* | wc -l
}
syscall_stats() {
fgrep "#warning syscall" $* |
sed 's/buildall.\([a-z0-9]*\).*: #warning syscall/\1\t/g' |
sed 's/ not implemented.*//g' |
sort -u
}
PASSED=$(ls -l buildall.*passed |wc -l)
FAILED=$(ls -l buildall.*failed |wc -l)
WARNS=$(warn_count buildall.*)
SECTS=$(sect_count buildall.*)
ERRS=$(err_count buildall.*)
DTS=$(dts_count buildall.*)
sed -e "s/%%FAILED%%/${FAILED}/g" \
-e "s/%%WARNS%%/${WARNS}/g" \
-e "s/%%REMOTE%%/${REMOTE}/g" \
-e "s/%%TO%%/${TO}/g" \
-e "s@%%BUILD%%@${REMOTE}/${BUILDID}@g" \
<< EOF
From: Olof's autobuilder <[email protected]>
To: %%TO%%
Subject: %%REMOTE%% build: %%WARNS%% warnings %%FAILED%% failures (%%BUILD%%)
Here are the build results from automated periodic testing.
The tree being built was %%REMOTE%%, found at:
EOF
echo "URL: ${REMOTEURL}"
echo ""
echo "Branch: ${BRANCH}"
echo ""
echo "Topmost commits: "
echo "${TOPCOMMITS}"
cat << EOF
Build logs (stderr only) can be found at the following link (experimental):
EOF
echo http://arm-soc.lixom.net/buildlogs/${REMOTE}/${BUILDID}/
echo ""
sed -e "s/%%PASSED%%/${PASSED}/g" \
-e "s/%%FAILED%%/${FAILED}/g" \
-e "s/%%SECTS%%/${SECTS}/g" \
-e "s/%%WARNS%%/${WARNS}/g" \
-e "s/%%DTS%%/${DTS}/g" \
-e "s/%%TIME%%/$((BUILDTIME/60%120))m $((BUILDTIME%60))s/g" \
<< EOF
Runtime: %%TIME%%
Passed: %%PASSED%%
Failed: %%FAILED%%
Warnings: %%WARNS%%
DTS warnings: %%DTS%%
Section mismatches: %%SECTS%%
-------------------------------------------------------------------------------
Failed defconfigs:
EOF
ls -1 buildall.*failed | sed -e 's/buildall./ /g' -e 's/.log.failed//g'
cat << EOF
-------------------------------------------------------------------------------
EOF
if egrep -qi undefined\|error: buildall.*log.failed ; then
echo ""
echo "Errors:"
echo ""
for board in $(ls -1 buildall.*failed | sed -e 's/buildall.//g' -e 's/.log.failed//g') ; do
echo " ${board}:"
err_grep buildall.${board}.log.failed
echo ""
done
else
echo ""
echo "No errors"
echo ""
fi
if egrep -qi 'warning:.[^#][^w]' buildall.*.* ; then
echo ""
echo "Warnings:"
echo ""
for board in $(egrep -li 'warning:.[^#][^w]' buildall.* | sed -e 's/buildall.//g' -e 's/.log.*//g') ; do
echo " ${board}:"
warn_grep buildall.${board}.log.*
echo ""
done
else
echo ""
echo "No warnings"
echo ""
fi
if [ "${DTS}" != "0" ] ; then
echo ""
echo "DTS Warnings:"
echo ""
dts_grep buildall.*
else
echo ""
echo "No DTS warnings"
echo ""
fi
if fgrep -q "warning syscall" buildall.* ; then
echo ""
echo "New syscalls:"
echo ""
syscall_stats buildall*
else
echo ""
echo "No new syscalls"
echo ""
fi
if fgrep -q "Section mismatch" buildall.* ; then
echo ""
echo "Section mismatches:"
echo ""
sect_stats buildall.*.*
else
echo ""
echo "No section mismatches"
echo ""
fi