mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1533445 - Make android tests shutdown faster when device unresponsive; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D22610 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8327974474
commit
eea10fc31e
@ -15,7 +15,7 @@ import mozcrash
|
||||
import mozinfo
|
||||
import mozlog
|
||||
import moznetwork
|
||||
from mozdevice import ADBDevice, ADBError
|
||||
from mozdevice import ADBDevice, ADBError, ADBTimeoutError
|
||||
from mozprofile import Profile, DEFAULT_PORTS
|
||||
from mozprofile.permissions import ServerLocations
|
||||
from runtests import MochitestDesktop, update_mozinfo
|
||||
@ -441,17 +441,21 @@ def run_test_harness(parser, options):
|
||||
runner = JUnitTestRunner(log, options)
|
||||
result = -1
|
||||
try:
|
||||
device_exception = False
|
||||
result = runner.run_tests(options.test_filters)
|
||||
except KeyboardInterrupt:
|
||||
log.info("runjunit.py | Received keyboard interrupt")
|
||||
result = -1
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
log.error(
|
||||
"runjunit.py | Received unexpected exception while running tests")
|
||||
result = 1
|
||||
if isinstance(e, ADBTimeoutError):
|
||||
device_exception = True
|
||||
finally:
|
||||
runner.cleanup()
|
||||
if not device_exception:
|
||||
runner.cleanup()
|
||||
return result
|
||||
|
||||
|
||||
|
@ -599,8 +599,11 @@ class AndroidMixin(object):
|
||||
|
||||
for t in self.timers:
|
||||
t.cancel()
|
||||
self.check_for_ANRs()
|
||||
self.check_for_tombstones()
|
||||
if self.worst_status != TBPL_RETRY:
|
||||
self.check_for_ANRs()
|
||||
self.check_for_tombstones()
|
||||
else:
|
||||
self.info("ANR and tombstone checks skipped due to TBPL_RETRY")
|
||||
self.logcat_stop()
|
||||
if self.is_emulator:
|
||||
self.kill_processes(self.config["emulator_process_name"])
|
||||
|
Loading…
Reference in New Issue
Block a user