author | Henrik Skupin <mail@hskupin.info> |
Wed, 24 Apr 2019 09:31:52 +0000 | |
changeset 470743 | 34a50e2bcaebfe8beeef0ce2f09c14df1da2da6a |
parent 470742 | dbd92ad84948dd4e3b9b676a8c0d686ab06192b7 |
child 470744 | b2677f62c9d0a8a99860a18c7f400874db82e55e |
push id | 83949 |
push user | hskupin@mozilla.com |
push date | Wed, 24 Apr 2019 19:43:28 +0000 |
treeherder | autoland@b2677f62c9d0 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | davehunt |
bugs | 1506928 |
milestone | 68.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/testing/raptor/raptor/raptor.py +++ b/testing/raptor/raptor/raptor.py @@ -22,17 +22,17 @@ from mozdevice import ADBDevice from mozlog import commandline, get_default_logger from mozprofile import create_profile from mozproxy import get_playback from mozrunner import runners # need this so raptor imports work both from /raptor and via mach here = os.path.abspath(os.path.dirname(__file__)) paths = [here] -if os.environ.get('SCRIPTSPATH', None) is not None: +if os.environ.get('SCRIPTSPATH') is not None: # in production it is env SCRIPTS_PATH paths.append(os.environ['SCRIPTSPATH']) else: # locally it's in source tree paths.append(os.path.join(here, '..', '..', 'mozharness')) webext_dir = os.path.join(here, '..', 'webext') paths.append(webext_dir) @@ -148,21 +148,21 @@ class Raptor(object): host=self.config['host'], b_port=self.benchmark_port, debug_mode=1 if self.debug_mode else 0, browser_cycle=test.get('browser_cycle', 1), ) self.install_raptor_webext() - if test.get("preferences", None) is not None: + if test.get("preferences") is not None: self.set_browser_test_prefs(test['preferences']) # if 'alert_on' was provided in the test INI, add to our config for results/output - self.config['subtest_alert_on'] = test.get('alert_on', None) + self.config['subtest_alert_on'] = test.get('alert_on') def run_test_teardown(self): self.check_for_crashes() if self.playback is not None: self.playback.stop() self.remove_raptor_webext() @@ -416,17 +416,17 @@ class RaptorDesktop(Raptor): self.output_handler.proc = proc # give our control server the browser process so it can shut it down later self.control_server.browser_proc = proc def run_test(self, test, timeout=None): self.run_test_setup(test) - if test.get('playback', None) is not None: + if test.get('playback') is not None: self.start_playback(test) if self.config['host'] not in ('localhost', '127.0.0.1'): self.delete_proxy_settings_from_profile() # now start the browser/app under test self.launch_desktop_browser(test) @@ -479,17 +479,17 @@ class RaptorDesktopFirefox(RaptorDesktop self.disable_non_local_connections() # if running debug-mode, tell Firefox to open the browser console on startup if self.debug_mode: self.runner.cmdargs.extend(['-jsconsole']) self.start_runner_proc() - if self.config['is_release_build'] and test.get('playback', None) is not None: + if self.config['is_release_build'] and test.get('playback') is not None: self.enable_non_local_connections() # if geckoProfile is enabled, initialize it if self.config['gecko_profile'] is True: self._init_gecko_profiling(test) # tell the control server the gecko_profile dir; the control server will # receive the actual gecko profiles from the web ext and will write them # to disk; then profiles are picked up by gecko_profile.symbolicate @@ -521,17 +521,17 @@ class RaptorDesktopChrome(RaptorDesktop) self.log.info("starting %s" % self.config['app']) # some chromium-specfic cmd line opts required self.runner.cmdargs.extend(['--use-mock-keychain', '--no-default-browser-check']) # if running in debug-mode, open the devtools on the raptor test tab if self.debug_mode: self.runner.cmdargs.extend(['--auto-open-devtools-for-tabs']) - if test.get('playback', None) is not None: + if test.get('playback') is not None: self.setup_chrome_desktop_for_playback() self.start_runner_proc() class RaptorAndroid(Raptor): def __init__(self, app, binary, activity=None, intent=None, **kwargs): super(RaptorAndroid, self).__init__(app, binary, **kwargs) @@ -716,17 +716,17 @@ class RaptorAndroid(Raptor): self.log.info("begin browser cycle %d of %d for test %s" % (test['browser_cycle'], test['expected_browser_cycles'], test['name'])) self.run_test_setup(test) if test['browser_cycle'] == 1: self.create_raptor_sdcard_folder() - if test.get('playback', None) is not None: + if test.get('playback') is not None: self.start_playback(test) # an ssl cert db has now been created in the profile; copy it out so we # can use the same cert db in future test cycles / browser restarts local_cert_db_dir = tempfile.mkdtemp() self.log.info("backing up browser ssl cert db that was created via certutil") self.copy_cert_db(self.config['local_profile_dir'], local_cert_db_dir) @@ -747,17 +747,17 @@ class RaptorAndroid(Raptor): if test.get('playback') is not None: # get cert db from previous cycle profile and copy into new clean profile # this saves us from having to start playback again / recreate cert db etc. self.log.info("copying existing ssl cert db into new browser profile") self.copy_cert_db(local_cert_db_dir, self.config['local_profile_dir']) self.run_test_setup(test) - if test.get('playback', None) is not None: + if test.get('playback') is not None: self.turn_on_android_app_proxy() self.copy_profile_onto_device() # now start the browser/app under test self.launch_firefox_android_app(test['name']) # set our control server flag to indicate we are running the browser/app @@ -779,23 +779,23 @@ class RaptorAndroid(Raptor): self.log.info("test %s is running in warm mode; browser will NOT be restarted between " "page cycles" % test['name']) if self.config['power_test']: init_android_power_test(self) self.run_test_setup(test) self.create_raptor_sdcard_folder() - if test.get('playback', None) is not None: + if test.get('playback') is not None: self.start_playback(test) if self.config['host'] not in ('localhost', '127.0.0.1'): self.delete_proxy_settings_from_profile() - if test.get('playback', None) is not None: + if test.get('playback') is not None: self.turn_on_android_app_proxy() self.clear_app_data() self.copy_profile_onto_device() # now start the browser/app under test self.launch_firefox_android_app(test['name'])