ctf-tools/bin/travis-ci-status/make_build_status_md.py

21 lines
691 B
Python
Raw Normal View History

2017-03-10 12:30:13 +00:00
#!/usr/bin/env python
from make_binpacked_travis_ci_conf import *
if __name__ == "__main__":
timingdata = parseOutput(sys.argv[1])
distros = sorted(timingdata.keys()) # all distros seen during previous build
tools = sorted(getToolsFromTimingdata(timingdata)) # all tools seen during previous build
print(" | ".join([""] + distros))
print(" | ".join(["-----"] * (1+len(distros))))
for tool in tools:
parts = []
for distro in distros:
val = "unknown"
if tool in timingdata[distro]:
val = "success" if timingdata[distro][tool]["success"] else "fail"
parts += [val]
print(" | ".join([tool] + ["![{0}]({0}.png)".format(x) for x in parts]))