Commit 7796da94 authored by Tomi Sarvela's avatar Tomi Sarvela
parents 1e997206 c98f7f87
......@@ -2,4 +2,5 @@ __pycache__/
*.pyc
*.pyo
*~
hostaliases.rx
^shard-(.*?)-?\d+$ shard-\1
^test1$ test2
......@@ -15,6 +15,7 @@ if 'run' in test:
filelist.append(("dmesg%d.txt" % test['run'],))
filelist.append(("hostdmesg%d.txt" % test['run'],))
filelist.append(("runtimes%d.txt" % test['run'],))
filelist.append(("results%d.json.bz2" % test['run'],))
%>
<?xml version="1.0" encoding="UTF-8"?>
......@@ -82,7 +83,7 @@ if 'run' in test:
<td>
% if var == 'dmesg':
% for idx, dmesg in enumerate(test[var]):
<div><span id="${dmesg.style}${idx}" class="${dmesg.style}">${dmesg.message | h}</span></div>
<div><span id="${dmesg.style}${idx}" class="dmesg ${dmesg.style}">${dmesg.message | h}</span></div>
% endfor
% else:
<pre>${test[var] | h}</pre>
......@@ -95,7 +96,7 @@ if 'run' in test:
## Highlighting logs with [IGT] in them
<script>
document.querySelectorAll("[id*='dmesg-normal']").forEach(x =>
document.querySelectorAll("span.dmesg").forEach(x =>
x.textContent.includes("[IGT]") && (x.classList.add("dmesg-igt"))
);
</script>
......
......@@ -24,9 +24,9 @@
% endif
% if build == new:
<th class="x"><span class="v"><a href="${path}${build}/">${build}</a></th>
<th class="x"><span class="v"><a href="${path}${build}/filelist.html">${build}</a></th>
% else:
<th><span class="v"><a href="${path}${build}/">${build}</a></th>
<th><span class="v"><a href="${path}${build}/filelist.html">${build}</a></th>
% endif
% endfor
</tr>
......
......@@ -18,7 +18,7 @@ if __name__ == "__main__":
ap.add_argument('-o','--output', help="Output html prefix", type=str, default='')
ap.add_argument('--heatmap', help="Create heatmap", default=False, action='store_true')
ap.add_argument('--combine', type=str, default=None,
help="Combine results for similar hosts")
help="Deprecated| Combine results for similar hosts")
ap.add_argument('--testsort', default=False, action='store_true',
help="Sort tests in alphabetical order")
ap.add_argument('-d', '--depth', type=int, default=0,
......@@ -26,6 +26,8 @@ if __name__ == "__main__":
ap.add_argument('--buildorder', type=str, default=None,
help="Filename for build order information")
ap.add_argument('files', help="Files to be visualized", metavar='files', nargs='+', type=str)
ap.add_argument('-a','--hostalias-file', type=str, default=None,
help="Combine results for similiar hosts based on RegEx file")
args = ap.parse_args()
......@@ -33,6 +35,17 @@ if __name__ == "__main__":
if args.buildorder: readbuildorder(args.buildorder)
if args.hostalias_file:
try:
read_hostalias_file(args.hostalias_file)
except Exception as e:
print("Err:",e)
exit(1)
else:
try:
read_hostalias_file(os.path.join(os.path.dirname(os.path.realpath(__file__)), "hostaliases.rx"))
except: pass
try: jsons = readfiles(args.files, combine=args.combine) # arranged by [(build,host)]
except (KeyboardInterrupt) as e:
print("ERROR: Keyboard interrupt while reading files")
......
......@@ -50,7 +50,7 @@ def writehtml(q):
realhost = host
path = os.path.join(args.output, build, realhost)
try: os.mkdir(path)
try: os.makedirs(path)
except FileExistsError: pass
filepath = os.path.join(path, htmlname(testname))
title = testname+" on "+host+"@"+build
......
......@@ -30,7 +30,7 @@ def parse_args():
ap.add_argument('-c','--collate', type=str, default=None,
help="Collate these results, example: -c notrun,pass")
ap.add_argument('--combine', type=str, default=None,
help="Combine results for similar hosts")
help="Deprecated| Combine results for similar hosts")
ap.add_argument('--buildorder', type=str, default=None,
help="Filename for build order information")
ap.add_argument('--builddesc', type=str, default=None,
......@@ -39,7 +39,8 @@ def parse_args():
help="Create html page with only changed results within test/host")
ap.add_argument('files', metavar='files', nargs='+', type=str,
help="Piglit json files to be visualized")
ap.add_argument('-a','--hostalias-file', type=str, default=None,
help="Combine results for similiar hosts based on RegEx file")
return ap.parse_args()
# Truncate and remove single test result as much as we can for size
......@@ -70,6 +71,17 @@ def main():
if args.buildorder:
readbuildorder(args.buildorder)
if args.hostalias_file:
try:
read_hostalias_file(args.hostalias_file)
except Exception as e:
print("Err:",e)
exit(1)
else:
try:
read_hostalias_file(os.path.join(os.path.dirname(os.path.realpath(__file__)), "hostaliases.rx"))
except: pass
# Build a dict for extra information in html
# builddesc file format:
# build<space>description
......
......@@ -53,7 +53,34 @@ intel_gpu_gens = [
( "cl-", 4.2 ) # Crestline Gen4 GMAX3100
]
def readfiles_parallel(q, files=[], combine='shard'):
hostaliases = {}
def read_hostalias_file(filename):
'''Read in regex-replace pairs for hostname aliasing'''
global hostaliases
try:
with open(filename, 'r') as fp:
for line in fp.readlines():
r,s = line.strip().split(' ', 1)
hostaliases[re.compile(r)]=s
print(f'Host alias file loaded from: {filename}')
except (OSError, IOError, UnicodeDecodeError, EOFError) as e:
raise e
return hostaliases
def hostalias(hostname):
'''Go through ordered dict of regex matches.
Use first matching or return None (no matches)'''
global hostaliases
for r in hostaliases.keys():
if r.match(hostname):
return re.sub(r, hostaliases[r],hostname,count=1)
return None
def readfiles_parallel(q,files=[], combine='shard'):
for filename in files:
j = None
try:
......@@ -122,14 +149,15 @@ def readfiles_parallel(q, files=[], combine='shard'):
if j['tests'][test]['result'] == 'incomplete':
incompleted = True
# Workaround: combine shards
# This is needed for sensible comparison and more concise html
if combine and combine in host:
alias = hostalias(host)
# combine will be deprecated
if not alias and combine and combine in host:
alias=re.match("(.*?)-?[0-9]{1,3}$", host).group(1)
if alias:
for test in j['tests']:
j['tests'][test]['hostname']=host
# need number in the end of hostname
host=re.match("(.*?)?[0-9]{1,3}$", host).group(1)
host=alias
q.put((build, host, j))
......
......@@ -38,16 +38,16 @@ tr:nth-child(odd) > td:first-child {
visibility: hidden;
}
.dmesg-warnings {
span.dmesg-warnings {
color: orangered;
font-weight: bold;
}
.dmesg-igt {
span.dmesg-igt {
background-color: #ffffba;
}
.dmesg-warnings, .dmesg-normal {
span.dmesg {
white-space: pre;
font-family: monospace;
word-wrap: normal;
......
......@@ -124,8 +124,7 @@ module HardwareList
content += "&nbsp;"
end
raw_name = host.start_with?('shard-') ? "#{host}1" : host
content += "<span style=\"float: right;\">[raw data](/hardware/#{raw_name}/filelist.html)</span>\n"
content += "<span style=\"float: right;\">[raw data](/hardware/#{host}/filelist.html)</span>\n"
content += "<pre>#{hw_description_to_pretty_yaml(data)}</pre>\n\n"
end
end
......
......@@ -79,7 +79,7 @@ end
module I915DisplayInfo
def self.is_connector_line?(line)
line =~ /^connector \d+:/
line =~ /^\[?connector:? ?\d+/i
end
......@@ -102,7 +102,7 @@ module I915DisplayInfo
def self.get_status_and_name(line)
connector = line.scan(/connector \d+: type (\S+), status: (connected|disconnected)/)
connector = line.scan(/\[?connector(?: |:)\d+:(?: type )?(\S+)?(?:]:|,) status: (connected|disconnected)/i)
connector.flatten!
end
......
......@@ -240,6 +240,12 @@ pre-merge/post-merge).
[kasan]: https://www.kernel.org/doc/html/latest/dev-tools/kasan.html
### Other Runs
**Resume runs** are using the same test list as Full IGT but are done on a
single machine. In case of hangs/incompletes the run is resumed. They are not
a part of regular CI and are tiggered on demand.
## Contacts
* **IRC:** #intel-gfx-ci @ freenode
......
......@@ -91,6 +91,20 @@ Each test state change (e.g. pass→fail) has few things listed:
* **numer of occurences of same transition across multiple machines:** `+3 similar issues`
## How Serious Are Incompletes And Aborts?
**Incomplete** means that the machine haven't been able to complete execution
of a test (most often because of a kernel panic or a hard hang). Incompletes
signal very serious issues with stability. Any tests that were supposed to
follow, that are on the same testlist (shard, fast-feedback), are not going to
be executed.
**Aborts** are as serious as incompletes but the abnormal state was detected
either by IGT Runner or the test itself. They signal that no further testing
is going to be done because the results would not be trustworthy do to the
machine's / kernel condition.
## I've Got Some False Positives, What Now?
Reply to the e-mail with the results and explain why do those results are
......
......@@ -21,6 +21,10 @@ cover letter and all the patches (e.g. `[PATCH 0/1]`). Older versions of git
do not add those for series with just a single patch. Patchwork uses "patch
number 0" to tell that the mail is a cover letter.
**Warning:** Don't test-with old series. The historical builds artifact are
being removed aggressively. As of now if you test-with anything older than a
day the behavior is undefined.
## Results
If the `Test-with:` has been picked up correctly you should see, near the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment