summaryrefslogtreecommitdiff
path: root/piglit-run.py
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-02-16 17:29:04 -0800
committerKenneth Graunke <kenneth@whitecape.org>2012-03-02 15:45:27 -0800
commit506ab46926c7069681adce0eb24e3c2b83417865 (patch)
treecbc1f411c343e9c72cc75b5860e0c10d71a6bf90 /piglit-run.py
parent133528b1e532550cbab2251fa46263f18045b5aa (diff)
Move writing of JSON 'tests' dictionary section out of TestProfile.run.
When resuming an interrupted piglit run, we'll want to output both existing and new results into the same 'tests' section. Since TestProfile.run only handles newly run tests, it can't open/close the JSON dictionary. So, move it to the caller in piglit-run.py. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'piglit-run.py')
-rwxr-xr-xpiglit-run.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/piglit-run.py b/piglit-run.py
index b6f8bf5f..2867a733 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -132,11 +132,16 @@ def main():
json_writer.write_dict_item(key, value)
profile = core.loadTestProfile(profileFilename, resultsDir)
- time_start = time.time()
- profile.run(env, json_writer)
+ json_writer.write_dict_key('tests')
+ json_writer.open_dict()
+ time_start = time.time()
+ profile.run(env, json_writer)
time_end = time.time()
+
+ json_writer.close_dict()
+
results.time_elapsed = time_end - time_start
json_writer.write_dict_item('time_elapsed', results.time_elapsed)