run-tests: when building json, use result.failures instead of result.faildata
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 07 May 2015 23:20:24 -0700
changeset 24980 2dadd81c68fb
parent 24979 f44db7343be9
child 24981 012b79d549d8
run-tests: when building json, use result.failures instead of result.faildata It is unclear to me why 'faildata' was used. Let's use the same kind of attribute as for the other groups.
tests/run-tests.py
--- a/tests/run-tests.py	Fri May 08 19:32:11 2015 -0700
+++ b/tests/run-tests.py	Thu May 07 23:20:24 2015 -0700
@@ -1542,12 +1542,12 @@
                                   'csys': ('%0.3f' % timesd[tc.name][2])}
                     outcome[tc.name] = testresult
 
-                for tc, err in sorted(result.faildata.iteritems()):
+                for tc, error in result.failures:
                     testresult = {'result': 'failure',
-                                  'time': ('%0.3f' % timesd[tc][0]),
-                                  'cuser': ('%0.3f' % timesd[tc][1]),
-                                  'csys': ('%0.3f' % timesd[tc][2])}
-                    outcome[tc] = testresult
+                                  'time': ('%0.3f' % timesd[tc.name][0]),
+                                  'cuser': ('%0.3f' % timesd[tc.name][1]),
+                                  'csys': ('%0.3f' % timesd[tc.name][2])}
+                    outcome[tc.name] = testresult
 
                 for tc, reason in result.skipped:
                     testresult = {'result': 'skip',