mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 18:38:28 -04:00
autotest: added some colour to passed/failed msgs
This commit is contained in:
parent
d69afc3945
commit
8eadc63bdb
@ -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))
|
||||||
|
@ -56,6 +56,14 @@ h2 {
|
|||||||
color:#D14836;
|
color:#D14836;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.passed-text {
|
||||||
|
color:green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.failed-text {
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#main {
|
#main {
|
||||||
padding-top:0px;
|
padding-top:0px;
|
||||||
|
Loading…
Reference in New Issue
Block a user