autotest: added some colour to passed/failed msgs

This commit is contained in:
Andrew Tridgell 2011-11-10 14:37:52 +11:00
parent d69afc3945
commit 8eadc63bdb
2 changed files with 135 additions and 127 deletions

View File

@ -222,16 +222,16 @@ def run_tests(steps):
print(">>>> FAILED STEP: %s at %s" % (step, time.asctime())) print(">>>> FAILED STEP: %s at %s" % (step, time.asctime()))
passed = False passed = False
failed.append(step) failed.append(step)
results.add(step, "FAILED", time.time() - t1) results.add(step, '<span class="failed-text">FAILED</span>', time.time() - t1)
continue continue
except Exception, msg: except Exception, msg:
passed = False passed = False
failed.append(step) failed.append(step)
print(">>>> FAILED STEP: %s at %s (%s)" % (step, time.asctime(), msg)) print(">>>> FAILED STEP: %s at %s (%s)" % (step, time.asctime(), msg))
traceback.print_exc(file=sys.stdout) traceback.print_exc(file=sys.stdout)
results.add(step, "FAILED", time.time() - t1) results.add(step, '<span class="failed-text">FAILED</span>', time.time() - t1)
pass pass
results.add(step, "PASSED", time.time() - t1) results.add(step, '<span class="passed-text">PASSED</span>', time.time() - t1)
print(">>>> PASSED STEP: %s at %s" % (step, time.asctime())) print(">>>> PASSED STEP: %s at %s" % (step, time.asctime()))
if not passed: if not passed:
print("FAILED %u tests: %s" % (len(failed), failed)) print("FAILED %u tests: %s" % (len(failed), failed))

View File

@ -1,124 +1,132 @@
@charset "utf-8"; @charset "utf-8";
/* CSS Document */ /* CSS Document */
/* Background-Styles */ /* Background-Styles */
html { html {
overflow-y: scroll; overflow-y: scroll;
} }
body { body {
font-family:Helvetica; font-family:Helvetica;
margin:0px; margin:0px;
padding:0px; padding:0px;
background-color: #fff; background-color: #fff;
background-image: url(images/bg.png); background-image: url(images/bg.png);
} }
#logo { #logo {
background-image:url(images/logo.png); background-image:url(images/logo.png);
background-repeat:no-repeat; background-repeat:no-repeat;
height: 120px; height: 120px;
width: 420px; width: 420px;
-moz-box-shadow: 2px 2px 5px #888; -moz-box-shadow: 2px 2px 5px #888;
-webkit-box-shadow: 2px 2px 5px #888; -webkit-box-shadow: 2px 2px 5px #888;
box-shadow: 2px 2px 5px #888; box-shadow: 2px 2px 5px #888;
background-color: #000; background-color: #000;
} }
h2 { h2 {
text-shadow: #ccc 0px 1px 0px; text-shadow: #ccc 0px 1px 0px;
text-decoration:none; text-decoration:none;
color:#D14836; color:#D14836;
padding-top: 0px; padding-top: 0px;
padding-right: 5px; padding-right: 5px;
padding-bottom: 5px; padding-bottom: 5px;
padding-left: 5px; padding-left: 5px;
} }
#git { #git {
background-color: #FFF; background-color: #FFF;
font-size: 15px; font-size: 15px;
display: auto; display: auto;
padding: 10px; padding: 10px;
border: 1px solid #CCC; border: 1px solid #CCC;
position: relative; position: relative;
-moz-box-shadow: 2px 2px 5px #888; -moz-box-shadow: 2px 2px 5px #888;
-webkit-box-shadow: 2px 2px 5px #888; -webkit-box-shadow: 2px 2px 5px #888;
box-shadow: 2px 2px 5px #888; box-shadow: 2px 2px 5px #888;
} }
#git a { #git a {
color:#00F; color:#00F;
font-weight: normal; font-weight: normal;
} }
#git a:hover { #git a:hover {
color:#D14836; color:#D14836;
} }
.passed-text {
#main { color:green;
padding-top:0px; }
min-width: 420px;
margin-top: 0; .failed-text {
margin-right: auto; color:red;
margin-bottom: 0; }
margin-left: auto;
padding-right: 20px;
padding-bottom: 50px; #main {
padding-left: 20px; padding-top:0px;
} min-width: 420px;
margin-top: 0;
ul#testresults { margin-right: auto;
background-color: #FFF; margin-bottom: 0;
display: block; margin-left: auto;
padding: 10px; padding-right: 20px;
border: 1px solid #CCC; padding-bottom: 50px;
list-style-type: none; padding-left: 20px;
position: relative; }
-moz-box-shadow: 2px 2px 5px #888;
-webkit-box-shadow: 2px 2px 5px #888; ul#testresults {
box-shadow: 2px 2px 5px #888; background-color: #FFF;
} display: block;
padding: 10px;
ul#testresults li { border: 1px solid #CCC;
list-style-type: none; list-style-type: none;
display: block; position: relative;
background-color: #eef1f1; -moz-box-shadow: 2px 2px 5px #888;
margin: 5px; -webkit-box-shadow: 2px 2px 5px #888;
padding: 5px; box-shadow: 2px 2px 5px #888;
} }
ul#testlogs { ul#testresults li {
background-color: #FFF; list-style-type: none;
display: block; display: block;
padding: 10px; background-color: #eef1f1;
border: 1px solid #CCC; margin: 5px;
list-style-type: none; padding: 5px;
position: relative; }
-moz-box-shadow: 2px 2px 5px #888;
-webkit-box-shadow: 2px 2px 5px #888; ul#testlogs {
box-shadow: 2px 2px 5px #888; background-color: #FFF;
} display: block;
padding: 10px;
ul#testlogs li { border: 1px solid #CCC;
text-decoration:none; list-style-type: none;
list-style-type: none; position: relative;
display: block; -moz-box-shadow: 2px 2px 5px #888;
background-color: #eef1f1; -webkit-box-shadow: 2px 2px 5px #888;
margin: 5px; box-shadow: 2px 2px 5px #888;
padding: 5px; }
font-size: 15px;
} ul#testlogs li {
text-decoration:none;
list-style-type: none;
ul#testlogs li a { display: block;
text-decoration:none; background-color: #eef1f1;
color:#8aa19c; margin: 5px;
font-weight: bold; padding: 5px;
font-size: 12px; font-size: 15px;
} }
ul#testlogs li a:hover {
color:#D14836; ul#testlogs li a {
} text-decoration:none;
color:#8aa19c;
font-weight: bold;
font-size: 12px;
}
ul#testlogs li a:hover {
color:#D14836;
}