Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: build/android/test_runner.py

Issue 22445005: Fixes exit code when there are no host-driven tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/base/test_dispatcher.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/test_runner.py
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 9632ed713872c99f737d08fb51d5f692079314aa..4113158fd38235779b852788867da6071b183cc3 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -436,19 +436,20 @@ def _RunInstrumentationTests(options, error_func):
options.python_test_root, options.official_build,
instrumentation_options)
- test_results, test_exit_code = test_dispatcher.RunTests(
- tests, runner_factory, False,
- options.test_device,
- shard=True,
- build_type=options.build_type,
- test_timeout=None,
- num_retries=options.num_retries)
-
- results.AddTestRunResults(test_results)
-
- # Only allow exit code escalation
- if test_exit_code and exit_code != constants.ERROR_EXIT_CODE:
- exit_code = test_exit_code
+ if tests:
+ test_results, test_exit_code = test_dispatcher.RunTests(
+ tests, runner_factory, False,
+ options.test_device,
+ shard=True,
+ build_type=options.build_type,
+ test_timeout=None,
+ num_retries=options.num_retries)
+
+ results.AddTestRunResults(test_results)
+
+ # Only allow exit code escalation
+ if test_exit_code and exit_code != constants.ERROR_EXIT_CODE:
+ exit_code = test_exit_code
report_results.LogFull(
results=results,
« no previous file with comments | « build/android/pylib/base/test_dispatcher.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698