branch, master, updated. 3ede42090115fb6eb8f6538e386e005b08333444
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "". The branch, master has been updated via 3ede42090115fb6eb8f6538e386e005b08333444 (commit) from d294a6d04798e557a1a8357d543358ef9b65a255 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3ede42090115fb6eb8f6538e386e005b08333444 Author: Kevin Harms <[email protected]> Date: Thu Aug 28 17:56:48 2014 -0500 Add script to convert automake tests to tap result file ----------------------------------------------------------------------- Summary of changes: code/scripts/jenkins/convert-trs-to-tap.py | 46 ++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) create mode 100644 code/scripts/jenkins/convert-trs-to-tap.py Diff of changes: diff --git a/code/scripts/jenkins/convert-trs-to-tap.py b/code/scripts/jenkins/convert-trs-to-tap.py new file mode 100644 index 0000000..b982d86 --- /dev/null +++ b/code/scripts/jenkins/convert-trs-to-tap.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# +# Convert the .trs files generated by automake into a .tap file +# for use by Jenkins test reporting. +# + +import os +import re + +def parse_trs(root, fname): + result = "not ok" + ro = re.compile(":test-result: (\w+)") + f = open(root+"/"+fname) + for line in f: + mo = ro.match(line) + if mo: + result = mo.group(1) + f.close() + return (fname, result) + +def gen_tap(f, outs): + count = 1 + print >>f, "1..%d"%(len(outs)) + for out in outs: + if out[1] == "PASS": + print >>f, "ok ", count, " - ", out[0] + elif out[1] == "XFAIL": + print >>f, "not ok ", count, " - ", out[0], "# expected failure" + else: + print >>f, "not ok ", count, " - ", out[0] + count += 1 + return + +def main(): + outs = [] + for root, dirs, files in os.walk("build/tritonbuild/tests"): + for file in files: + if file.endswith('.trs'): + outs.append(parse_trs(root, file)) + f = open("build/tritonbuild/tests/results.tap", "w") + gen_tap(f, outs) + f.close() + return + +if __name__ == '__main__': + main() hooks/post-receive --
participants (1)
-
noreply@mcs.anl.gov