Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: tools/telemetry/telemetry/record_wpr.py

Issue 12088107: Revert 180117, it broke all telemetry tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/page_unittest.py ('k') | tools/telemetry/telemetry/scrolling_action_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/record_wpr.py
===================================================================
--- tools/telemetry/telemetry/record_wpr.py (revision 180130)
+++ tools/telemetry/telemetry/record_wpr.py (working copy)
@@ -3,9 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
-import os
import sys
-import tempfile
import time
from telemetry import all_page_actions # pylint: disable=W0611
@@ -79,11 +77,6 @@
ps = page_set.PageSet.FromFile(args[0])
- # Set the archive path to something temporary.
- temp_target_wpr_file_path = tempfile.mkstemp()[1]
- ps.wpr_archive_info.AddNewTemporaryRecording(temp_target_wpr_file_path)
-
- # Do the actual recording.
options.wpr_mode = wpr_modes.WPR_RECORD
recorder.CustomizeBrowserOptions(options)
possible_browser = browser_finder.FindBrowser(options)
@@ -95,23 +88,11 @@
with page_runner.PageRunner(ps) as runner:
runner.Run(options, possible_browser, recorder, results)
- if results.page_failures:
- logging.warning('Some pages failed. The recording has not been updated for '
- 'these pages.')
+ if len(results.page_failures):
logging.warning('Failed pages: %s', '\n'.join(
[failure['page'].url for failure in results.page_failures]))
- if results.skipped_pages:
- logging.warning('Some pages were skipped. The recording has not been '
- 'updated for these pages.')
+ if len(results.skipped_pages):
logging.warning('Skipped pages: %s', '\n'.join(
[skipped['page'].url for skipped in results.skipped_pages]))
-
- if results.page_successes:
- # Update the metadata for the pages which were recorded.
- ps.wpr_archive_info.AddRecordedPages(
- [page['page'] for page in results.page_successes])
- else:
- os.remove(temp_target_wpr_file_path)
-
return min(255, len(results.page_failures))
« no previous file with comments | « tools/telemetry/telemetry/page_unittest.py ('k') | tools/telemetry/telemetry/scrolling_action_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698