Mercurial > hg
diff tests/run-tests.py @ 27686:df142b77b4c2
run-tests: add 'diff' entry in json report
This patch adds to the json report the "diff" between expected and observed
result. This diff can be useful for automatically filing bug report on failing
tests.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Tue, 05 Jan 2016 13:33:09 -0800 |
parents | b502138f5faa |
children | 50e621fe0362 |
line wrap: on
line diff
--- a/tests/run-tests.py Tue Dec 01 13:08:05 2015 -0500 +++ b/tests/run-tests.py Tue Jan 05 13:33:09 2016 -0800 @@ -1731,7 +1731,9 @@ 'cuser': ('%0.3f' % timesd[tc.name][0]), 'csys': ('%0.3f' % timesd[tc.name][1]), 'start': ('%0.3f' % timesd[tc.name][3]), - 'end': ('%0.3f' % timesd[tc.name][4])} + 'end': ('%0.3f' % timesd[tc.name][4]), + 'diff': result.faildata.get(tc.name, ''), + } outcome[tc.name] = tres jsonout = json.dumps(outcome, sort_keys=True, indent=4) fp.writelines(("testreport =", jsonout))