Commit b2b1638c authored by Dylan Baker's avatar Dylan Baker

Save and restore platform for piglit

This patch adds support in piglit-run to save the -p platform
information if it was provided, and adds support in piglit-resume to
restore this information if it is stored.
Signed-off-by: Dylan Baker's avatarDylan Baker <>
parent d2445848
......@@ -48,6 +48,13 @@ def main():
# Change working directory to the piglit directory
# attempt to restore a saved platform, if there is no saved platform just
# go on
os.environ['PIGLIT_PLATFORM'] = results.options['platform']
except KeyError:
results_path = path.join(args.results_path, "main")
json_writer = core.JSONWriter(open(results_path, 'w+'))
......@@ -125,9 +125,12 @@ def main():
json_writer.write_dict_item('profile', args.test_profile)
for key, value in env:
json_writer.write_dict_item(key, value)
if args.platform:
json_writer.write_dict_item('platform', args.platform)
for (key, value) in env.collectData().items():
json_writer.write_dict_item(key, value)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment