nightly testing: show source test results sorted by time
The Client::Source tests were sorted by name. This was confusing because it hides when a peer like a CalDAV server stops responding after a certain test. It is more intuitive to present the results in the order in which they were run. This is accomplished by sorting by the sub-second modification time of the corresponding .log files (in resultschecker.py) and keeping that order (in generate-html.xsl). A similar approach might also be useful for Client::Sync. Not done yet.
This commit is contained in:
parent
ae2735f2b8
commit
f438e5327c
|
@ -723,7 +723,8 @@
|
|||
<th>Value</th>
|
||||
</tr>
|
||||
<xsl:for-each select="$source/*">
|
||||
<xsl:sort select="name(.)" data-type="text"/>
|
||||
<!-- do not sort here: unit tests are run in a certain order which may matter -->
|
||||
<!-- xsl:sort select="name(.)" data-type="text"/ -->
|
||||
<tr>
|
||||
<td width="300"><xsl:value-of select="name(.)"/></td>
|
||||
<td width="20">
|
||||
|
|
|
@ -25,6 +25,9 @@ resultcheck.py: tranverse the test result directory, generate an XML
|
|||
based test report.
|
||||
"""
|
||||
|
||||
# sort more accurately on sub-second modification times
|
||||
os.stat_float_times(True)
|
||||
|
||||
space=" "
|
||||
def check (resultdir, serverlist,resulturi, srcdir, shellprefix, backenddir):
|
||||
'''Entrypoint, resutldir is the test result directory to be generated,
|
||||
|
@ -221,7 +224,11 @@ def step2(resultdir, result, servers, indents, srcdir, shellprefix, backenddir):
|
|||
if(params[server].find('return code ') !=-1):
|
||||
result.write('result="'+params[server].partition('return code ')[2].partition(')')[0]+'" ')
|
||||
result.write('>\n')
|
||||
logs = glob.glob(resultdir+'/'+rserver+'/*.log')
|
||||
# sort files by creation time, to preserve run order
|
||||
logs = map(lambda file: (os.stat(file).st_mtime, file),
|
||||
glob.glob(resultdir+'/'+rserver+'/*.log'))
|
||||
logs.sort()
|
||||
logs = map(lambda entry: entry[1], logs)
|
||||
logdic ={}
|
||||
logprefix ={}
|
||||
for log in logs:
|
||||
|
|
Loading…
Reference in New Issue