Index: build/android/pylib/base/shard.py |
diff --git a/build/android/pylib/base/shard.py b/build/android/pylib/base/shard.py |
index e95355010537a8a9e3f08a92503b12d59138cd3e..89b84f6f92bbc692a664389ded150ac5b60b39c4 100644 |
--- a/build/android/pylib/base/shard.py |
+++ b/build/android/pylib/base/shard.py |
@@ -282,6 +282,10 @@ def ShardAndRunTests(runner_factory, devices, tests, build_type='Debug', |
Returns: |
A base_test_result.TestRunResults object. |
""" |
+ if not tests: |
+ logging.warning('No tests to run.') |
+ return base_test_result.TestRunResults() |
+ |
logging.info('Will run %d tests: %s', len(tests), str(tests)) |
forwarder.Forwarder.KillHost(build_type) |
runners = _CreateRunners(runner_factory, devices, setup_timeout) |