diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/android/pylib/base/test_dispatcher.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/build/android/pylib/base/test_dispatcher.py b/build/android/pylib/base/test_dispatcher.py index 8ddd7ac..10b0b4b 100644 --- a/build/android/pylib/base/test_dispatcher.py +++ b/build/android/pylib/base/test_dispatcher.py @@ -360,9 +360,8 @@ def RunTests(tests, runner_factory, wait_for_debugger, test_device, A tuple of (base_test_result.TestRunResults object, exit code). """ if not tests: - logging.error('No tests to run.') + logging.critical('No tests to run.') return (base_test_result.TestRunResults(), constants.ERROR_EXIT_CODE) - if shard: # Generate a shared _TestCollection object for all test runners, so they # draw from a common pool of tests. @@ -378,6 +377,9 @@ def RunTests(tests, runner_factory, wait_for_debugger, test_device, log_string = 'replicated on each device' devices = _GetAttachedDevices(wait_for_debugger, test_device) + if not devices: + logging.critical('No attached devices.') + return (base_test_result.TestRunResults(), constants.ERROR_EXIT_CODE) logging.info('Will run %d tests (%s): %s', len(tests), log_string, str(tests)) runners = _CreateRunners(runner_factory, devices, setup_timeout) |