Bug 1098529 - Properly handle devicemanager exceptions in jittests; r=terrence
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -698,19 +698,27 @@ def get_serial_results(tests, prefix, op
yield run_test(test, prefix, options)
def run_tests(tests, prefix, options):
gen = get_serial_results(tests, prefix, options)
ok = process_test_results(gen, len(tests) * options.repeat, options)
return ok
def get_remote_results(tests, device, prefix, options):
- for i in xrange(0, options.repeat):
- for test in tests:
- yield run_test_remote(test, device, prefix, options)
+ from mozdevice import devicemanager
+
+ try:
+ for i in xrange(0, options.repeat):
+ for test in tests:
+ yield run_test_remote(test, device, prefix, options)
+ except devicemanager.DMError as e:
+ # After a devicemanager error, the device is typically in a
+ # state where all further tests will fail so there is no point in
+ # continuing here.
+ sys.stderr.write("Error running remote tests: %s" % e.message)
def push_libs(options, device):
# This saves considerable time in pushing unnecessary libraries
# to the device but needs to be updated if the dependencies change.
required_libs = ['libnss3.so', 'libmozglue.so', 'libnspr4.so', 'libplc4.so', 'libplds4.so']
for file in os.listdir(options.local_lib):
if file in required_libs: