aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skp
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2015-03-29 22:33:16 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-29 22:33:16 -0700
commitf9310fe2be460e2cefd844cd0f53f3e2b9f3488b (patch)
treec9c0ee06dc3978daf81f51d394a947d86d41a7d3 /tools/skp
parent7da19014fda527a52381d85cc50b951031fa4754 (diff)
webpages_playback.py: Avoid crash when retrying to capture skp
Move the .wpr files after recording, in the recording retry loop. Previously they were moved in the skp capture retry loop. Review URL: https://codereview.chromium.org/1033223005
Diffstat (limited to 'tools/skp')
-rw-r--r--tools/skp/webpages_playback.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/skp/webpages_playback.py b/tools/skp/webpages_playback.py
index 422edbcc36..d9635b6960 100644
--- a/tools/skp/webpages_playback.py
+++ b/tools/skp/webpages_playback.py
@@ -222,6 +222,17 @@ class SkPicturePlayback(object):
for _ in range(RETRY_RECORD_WPR_COUNT):
try:
shell_utils.run(' '.join(record_wpr_cmd), shell=True)
+
+ # Move over the created archive into the local webpages archive
+ # directory.
+ shutil.move(
+ os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, wpr_data_file),
+ self._local_record_webpages_archive_dir)
+ shutil.move(
+ os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR,
+ page_set_json_name),
+ self._local_record_webpages_archive_dir)
+
# Break out of the retry loop since there were no errors.
break
except Exception:
@@ -261,17 +272,6 @@ class SkPicturePlayback(object):
# captured SKP is still valid. This is a known issue.
pass
- if self._record:
- # Move over the created archive into the local webpages archive
- # directory.
- shutil.move(
- os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, wpr_data_file),
- self._local_record_webpages_archive_dir)
- shutil.move(
- os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR,
- page_set_json_name),
- self._local_record_webpages_archive_dir)
-
# Rename generated SKP files into more descriptive names.
try:
self._RenameSkpFiles(page_set)