summaryrefslogtreecommitdiff
path: root/piglit-resume.py
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2013-12-19 16:25:00 -0800
committerDylan Baker <baker.dylan.c@gmail.com>2014-01-09 14:24:09 -0800
commitb2b1638cb5458a64a4f67416fa7777cca8a2b25a (patch)
treebf8d40faa5984b77811aa667ce6a3f25ddca9077 /piglit-resume.py
parentd2445848345a672e07357376c37c7dbb999fcb2e (diff)
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 <baker.dylan.c@gmail.com>
Diffstat (limited to 'piglit-resume.py')
-rwxr-xr-xpiglit-resume.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/piglit-resume.py b/piglit-resume.py
index 9b3144aa7..7e456b5af 100755
--- a/piglit-resume.py
+++ b/piglit-resume.py
@@ -48,6 +48,13 @@ def main():
# Change working directory to the piglit directory
os.chdir(path.dirname(path.realpath(sys.argv[0])))
+ # attempt to restore a saved platform, if there is no saved platform just
+ # go on
+ try:
+ os.environ['PIGLIT_PLATFORM'] = results.options['platform']
+ except KeyError:
+ pass
+
results_path = path.join(args.results_path, "main")
json_writer = core.JSONWriter(open(results_path, 'w+'))
json_writer.open_dict()