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

Side by Side Diff: telemetry/telemetry/page/shared_page_state.py

Issue 2265423005: Updating telemetry logic to return success when a disabled test is run. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: Manually replaying changes after merge Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « telemetry/telemetry/internal/story_runner.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import sys 7 import sys
8 8
9 from telemetry.core import exceptions 9 from telemetry.core import exceptions
10 from telemetry.core import util 10 from telemetry.core import util
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 def _GetPossibleBrowser(self, test, finder_options): 122 def _GetPossibleBrowser(self, test, finder_options):
123 """Return a possible_browser with the given options for |test|. """ 123 """Return a possible_browser with the given options for |test|. """
124 possible_browser = self._FindBrowser(finder_options) 124 possible_browser = self._FindBrowser(finder_options)
125 finder_options.browser_options.browser_type = ( 125 finder_options.browser_options.browser_type = (
126 possible_browser.browser_type) 126 possible_browser.browser_type)
127 127
128 enabled, msg = decorators.IsEnabled(test, possible_browser) 128 enabled, msg = decorators.IsEnabled(test, possible_browser)
129 if not enabled and not finder_options.run_disabled_tests: 129 if not enabled and not finder_options.run_disabled_tests:
130 logging.warning(msg) 130 logging.warning(msg)
131 logging.warning('You are trying to run a disabled test.') 131 logging.warning('You are trying to run a disabled test.')
132 logging.warning(
133 'Pass --also-run-disabled-tests to squelch this message.')
134 sys.exit(0)
135 132
136 if possible_browser.IsRemote(): 133 if possible_browser.IsRemote():
137 possible_browser.RunRemote() 134 possible_browser.RunRemote()
138 sys.exit(0) 135 sys.exit(0)
139 return possible_browser 136 return possible_browser
140 137
141 def DumpStateUponFailure(self, page, results): 138 def DumpStateUponFailure(self, page, results):
142 # Dump browser standard output and log. 139 # Dump browser standard output and log.
143 if self._browser: 140 if self._browser:
144 self._browser.DumpStateUponFailure() 141 self._browser.DumpStateUponFailure()
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 class SharedDesktopPageState(SharedPageState): 351 class SharedDesktopPageState(SharedPageState):
355 _device_type = 'desktop' 352 _device_type = 'desktop'
356 353
357 354
358 class SharedTabletPageState(SharedPageState): 355 class SharedTabletPageState(SharedPageState):
359 _device_type = 'tablet' 356 _device_type = 'tablet'
360 357
361 358
362 class Shared10InchTabletPageState(SharedPageState): 359 class Shared10InchTabletPageState(SharedPageState):
363 _device_type = 'tablet_10_inch' 360 _device_type = 'tablet_10_inch'
OLDNEW
« no previous file with comments | « telemetry/telemetry/internal/story_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698