Index: build/android/run_instrumentation_tests.py |
diff --git a/build/android/run_instrumentation_tests.py b/build/android/run_instrumentation_tests.py |
index 94bdfaa8125480b5354f3e233dfb34db238502cd..6cb75fe43831fb99f40a0b04e5e9e61c5564ac97 100755 |
--- a/build/android/run_instrumentation_tests.py |
+++ b/build/android/run_instrumentation_tests.py |
@@ -57,10 +57,12 @@ def DispatchInstrumentationTests(options): |
Returns: |
An integer representing the number of failing tests. |
""" |
- # Reset the test port allocation. It's important to do it before starting |
- # to dispatch any tests. |
- if not ports.ResetTestServerPortAllocation(): |
- raise Exception('Failed to reset test server port.') |
+ if not options.keep_test_server_ports: |
+ # Reset the test port allocation. It's important to do it before starting |
+ # to dispatch any tests. |
+ if not ports.ResetTestServerPortAllocation(): |
+ raise Exception('Failed to reset test server port.') |
+ |
start_date = int(time.time() * 1000) |
java_results = TestResults() |
python_results = TestResults() |