author | Andrew Halberstadt <ahalberstadt@mozilla.com> |
Fri, 02 Sep 2016 14:22:23 -0400 | |
changeset 312851 | f72acbecdf93c31585d35ac4bb10f96b017479f7 |
parent 312850 | 5ee0ea599ba3a80cc14da0dc80a235d767c8e7c3 |
child 312852 | 1b40346919cc81301f39ba13f75633f508aee717 |
push id | 30663 |
push user | cbook@mozilla.com |
push date | Wed, 07 Sep 2016 15:12:31 +0000 |
treeherder | mozilla-central@3d0b41fdd93b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | gbrown |
bugs | 1300163 |
milestone | 51.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/mozharness/configs/android/androidarm.py +++ b/testing/mozharness/configs/android/androidarm.py @@ -38,17 +38,16 @@ config = { 'read-buildbot-config', 'setup-avds', 'start-emulator', 'download-and-extract', 'create-virtualenv', 'verify-emulator', 'install', 'run-tests', - 'stop-emulator', ], "emulator": { "name": "test-1", "device_id": "emulator-5554", "http_port": "8854", # starting http port to use for the mochitest server "ssl_port": "4454", # starting ssl port to use for the server "emulator_port": 5554, "sut_port1": 20701,
--- a/testing/mozharness/configs/android/androidarm_4_3.py +++ b/testing/mozharness/configs/android/androidarm_4_3.py @@ -48,17 +48,16 @@ config = { 'read-buildbot-config', 'setup-avds', 'start-emulator', 'download-and-extract', 'create-virtualenv', 'verify-emulator', 'install', 'run-tests', - 'stop-emulator', ], "emulator": { "name": "test-1", "device_id": "emulator-5554", "http_port": "8854", # starting http port to use for the mochitest server "ssl_port": "4454", # starting ssl port to use for the server "emulator_port": 5554, },
--- a/testing/mozharness/configs/android/androidx86-tc.py +++ b/testing/mozharness/configs/android/androidx86-tc.py @@ -33,17 +33,16 @@ config = { 'clobber', 'read-buildbot-config', 'setup-avds', 'start-emulator', 'download-and-extract', 'create-virtualenv', 'verify-emulator', 'run-tests', - 'stop-emulator', ], "emulator": { "name": "test-1", "device_id": "emulator-5554", "http_port": "8854", # starting http port to use for the mochitest server "ssl_port": "4454", # starting ssl port to use for the server "emulator_port": 5554, },
--- a/testing/mozharness/scripts/android_emulator_unittest.py +++ b/testing/mozharness/scripts/android_emulator_unittest.py @@ -19,17 +19,17 @@ import time import tempfile # load modules from parent dir sys.path.insert(1, os.path.dirname(sys.path[0])) from mozprocess import ProcessHandler from mozharness.base.log import FATAL -from mozharness.base.script import BaseScript, PreScriptAction +from mozharness.base.script import BaseScript, PreScriptAction, PostScriptAction from mozharness.base.vcs.vcsbase import VCSMixin from mozharness.mozilla.blob_upload import BlobUploadMixin, blobupload_config_options from mozharness.mozilla.mozbase import MozbaseMixin from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options from mozharness.mozilla.testing.unittest import EmulatorMixin class AndroidEmulatorTest(BlobUploadMixin, TestingMixin, EmulatorMixin, VCSMixin, BaseScript, MozbaseMixin): @@ -80,25 +80,25 @@ class AndroidEmulatorTest(BlobUploadMixi 'read-buildbot-config', 'setup-avds', 'start-emulator', 'download-and-extract', 'create-virtualenv', 'verify-emulator', 'install', 'run-tests', - 'stop-emulator'], + ], default_actions=['clobber', 'start-emulator', 'download-and-extract', 'create-virtualenv', 'verify-emulator', 'install', 'run-tests', - 'stop-emulator'], + ], require_config_file=require_config_file, config={ 'virtualenv_modules': self.virtualenv_modules, 'virtualenv_requirements': self.virtualenv_requirements, 'require_test_zip': True, # IP address of the host as seen from the emulator 'remote_webserver': '10.0.2.2', } @@ -719,27 +719,32 @@ class AndroidEmulatorTest(BlobUploadMixi self.run_command(cmd, cwd=cwd, env=env, output_parser=parser) tbpl_status, log_level = parser.evaluate_parser(0) parser.append_tinderboxprint_line(self.test_suite) self.info("##### %s log ends" % self.test_suite) self._dump_emulator_log() self.buildbot_status(tbpl_status, level=log_level) - def stop_emulator(self): + @PostScriptAction('run-tests') + def stop_emulator(self, action, success=None): ''' Report emulator health, then make sure that the emulator has been stopped ''' self._verify_emulator() self._kill_processes(self.config["emulator_process_name"]) def upload_blobber_files(self): ''' Override BlobUploadMixin.upload_blobber_files to ensure emulator is killed first (if the emulator is still running, logcat may still be running, which may lock the blob upload directory, causing a hang). ''' - self._kill_processes(self.config["emulator_process_name"]) + if self.config.get('blob_upload_branch'): + # Except on interactive workers, we want the emulator to keep running + # after the script is finished. So only kill it if blobber would otherwise + # have run anyway (it doesn't get run on interactive workers). + self._kill_processes(self.config["emulator_process_name"]) super(AndroidEmulatorTest, self).upload_blobber_files() if __name__ == '__main__': emulatorTest = AndroidEmulatorTest() emulatorTest.run_and_exit()
--- a/testing/mozharness/scripts/androidx86_emulator_unittest.py +++ b/testing/mozharness/scripts/androidx86_emulator_unittest.py @@ -17,17 +17,17 @@ import time import tempfile # load modules from parent dir sys.path.insert(1, os.path.dirname(sys.path[0])) from mozprocess import ProcessHandler from mozharness.base.log import FATAL -from mozharness.base.script import BaseScript, PostScriptRun, PreScriptAction +from mozharness.base.script import BaseScript, PostScriptRun, PreScriptAction, PostScriptAction from mozharness.base.vcs.vcsbase import VCSMixin from mozharness.mozilla.blob_upload import BlobUploadMixin, blobupload_config_options from mozharness.mozilla.mozbase import MozbaseMixin from mozharness.mozilla.buildbot import TBPL_WORST_LEVEL_TUPLE from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options from mozharness.mozilla.testing.unittest import EmulatorMixin @@ -71,24 +71,24 @@ class AndroidEmulatorTest(BlobUploadMixi all_actions=['clobber', 'read-buildbot-config', 'setup-avds', 'start-emulators', 'download-and-extract', 'create-virtualenv', 'install', 'run-tests', - 'stop-emulators'], + ], default_actions=['clobber', 'start-emulators', 'download-and-extract', 'create-virtualenv', 'install', 'run-tests', - 'stop-emulators'], + ], require_config_file=require_config_file, config={ 'virtualenv_modules': self.virtualenv_modules, 'virtualenv_requirements': self.virtualenv_requirements, 'require_test_zip': True, # IP address of the host as seen from the emulator 'remote_webserver': '10.0.2.2', } @@ -817,17 +817,18 @@ class AndroidEmulatorTest(BlobUploadMixi # so buildbot won't kill the process due to lack of output if int(time.time()) - start_time > 5 * 60: self.info('#') start_time = int(time.time()) time.sleep(30) self.buildbot_status(joint_tbpl_status, level=joint_log_level) - def stop_emulators(self): + @PostScriptAction('run-tests') + def stop_emulators(self, action, success=None): ''' Report emulator health, then make sure that every emulator has been stopped ''' emulator_index = 0 for test in self.test_suites: emulator = self.emulators[emulator_index] emulator_index += 1 self._check_emulator(emulator)