forked from premiere/premiere-libtorrent
polish on generating test reports
This commit is contained in:
parent
70e3617cd6
commit
045b36f48e
|
@ -7,7 +7,6 @@ project:
|
||||||
features:
|
features:
|
||||||
- variant=release
|
- variant=release
|
||||||
- asserts=production
|
- asserts=production
|
||||||
- encryption=gcrypt
|
|
||||||
- statistics=on logging=verbose disk-stats=on bandwidth-limit-logging=on
|
- statistics=on logging=verbose disk-stats=on bandwidth-limit-logging=on
|
||||||
- ipv6=off
|
- ipv6=off
|
||||||
- deprecated-functions=off
|
- deprecated-functions=off
|
||||||
|
|
|
@ -46,7 +46,7 @@ def style_output(o):
|
||||||
ret += '<span class="test-error">%s</span>\n' % l
|
ret += '<span class="test-error">%s</span>\n' % l
|
||||||
elif '**passed**' in l:
|
elif '**passed**' in l:
|
||||||
ret += '<span class="test-pass">%s</span>\n' % l
|
ret += '<span class="test-pass">%s</span>\n' % l
|
||||||
elif ': error: ' in l:
|
elif ': error: ' in l or ': fatal error: ' in l:
|
||||||
ret += '<span class="compile-error">%s</span>\n' % l
|
ret += '<span class="compile-error">%s</span>\n' % l
|
||||||
elif ': warning: ' in l:
|
elif ': warning: ' in l:
|
||||||
ret += '<span class="compile-warning">%s</span>\n' % l
|
ret += '<span class="compile-warning">%s</span>\n' % l
|
||||||
|
@ -74,14 +74,11 @@ os.chdir('regression_tests')
|
||||||
def modification_time(file):
|
def modification_time(file):
|
||||||
mtime = 0
|
mtime = 0
|
||||||
try:
|
try:
|
||||||
st = os.stat(file)
|
mtime = os.stat(file).st_mtime
|
||||||
mtime = st.st_mtime
|
except: pass
|
||||||
except Exception, e:
|
|
||||||
print e
|
|
||||||
return mtime
|
return mtime
|
||||||
|
|
||||||
index_mtime = modification_time('index.html')
|
index_mtime = modification_time('index.html')
|
||||||
print 'index mtime: %d' % index_mtime
|
|
||||||
|
|
||||||
latest_rev = 0
|
latest_rev = 0
|
||||||
|
|
||||||
|
@ -147,12 +144,6 @@ for f in glob.glob(os.path.join(rev_dir, '*.json')):
|
||||||
platform = platform_toolset[0]
|
platform = platform_toolset[0]
|
||||||
toolset = platform_toolset[1]
|
toolset = platform_toolset[1]
|
||||||
|
|
||||||
if not platform in platforms:
|
|
||||||
platforms[platform] = {}
|
|
||||||
|
|
||||||
if not toolset in platforms[platform]:
|
|
||||||
platforms[platform][toolset] = {}
|
|
||||||
|
|
||||||
for cfg in j:
|
for cfg in j:
|
||||||
test_name = cfg.split('|')[0]
|
test_name = cfg.split('|')[0]
|
||||||
features = cfg.split('|')[1]
|
features = cfg.split('|')[1]
|
||||||
|
@ -162,18 +153,26 @@ for f in glob.glob(os.path.join(rev_dir, '*.json')):
|
||||||
|
|
||||||
tests[features].add(test_name)
|
tests[features].add(test_name)
|
||||||
|
|
||||||
|
if not platform in platforms:
|
||||||
|
platforms[platform] = {}
|
||||||
|
|
||||||
|
if not toolset in platforms[platform]:
|
||||||
|
platforms[platform][toolset] = {}
|
||||||
|
|
||||||
if not features in platforms[platform][toolset]:
|
if not features in platforms[platform][toolset]:
|
||||||
platforms[platform][toolset][features] = {}
|
platforms[platform][toolset][features] = {}
|
||||||
|
|
||||||
platforms[platform][toolset][features][test_name] = j[cfg]
|
platforms[platform][toolset][features][test_name] = j[cfg]
|
||||||
|
|
||||||
|
|
||||||
html = open('index.html', 'w')
|
html = open('index.html', 'w')
|
||||||
|
|
||||||
print >>html, '''<html><head><title>regression tests, %s revision %d</title><style type="text/css">
|
print >>html, '''<html><head><title>regression tests, %s revision %d</title><style type="text/css">
|
||||||
.passed { display: block; width: 8px; height: 1em; background-color: #6f8 }
|
.passed { display: block; width: 5px; height: 1em; background-color: #6f8 }
|
||||||
.failed { display: block; width: 8px; height: 1em; background-color: #f68 }
|
.failed { display: block; width: 5px; height: 1em; background-color: #f68 }
|
||||||
table { border: 0; }
|
table { border: 0; }
|
||||||
td { border: 0; border-spacing: 0px; padding: 0px 0px 0px 0px; }
|
td { border: 0; border-spacing: 0px; padding: 0px 0px 0px 0px; }
|
||||||
|
th { white-space: nowrap; }
|
||||||
.compile-error { color: #f13; font-weight: bold; }
|
.compile-error { color: #f13; font-weight: bold; }
|
||||||
.compile-warning { color: #cb0; }
|
.compile-warning { color: #cb0; }
|
||||||
.test-error { color: #f13; font-weight: bold; }
|
.test-error { color: #f13; font-weight: bold; }
|
||||||
|
|
Loading…
Reference in New Issue