Index: base/test/launcher/test_launcher.cc |
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc |
index e6c1507250d14eb90ac80b770e75e0060f8f269e..697c8c72144fcb6f5c855a3bb5f5be9ed72d751c 100644 |
--- a/base/test/launcher/test_launcher.cc |
+++ b/base/test/launcher/test_launcher.cc |
@@ -336,20 +336,6 @@ TestLauncher::TestLauncher(TestLauncherDelegate* launcher_delegate, |
this, |
&TestLauncher::OnOutputTimeout), |
parallel_jobs_(parallel_jobs) { |
- if (BotModeEnabled()) { |
- fprintf(stdout, |
- "Enabling defaults optimized for continuous integration bots.\n"); |
- fflush(stdout); |
- |
- // Enable test retries by default for bots. This can be still overridden |
- // from command line using --test-launcher-retry-limit flag. |
- retry_limit_ = 3; |
- } else { |
- // Default to serial test execution if not running on a bot. This makes it |
- // possible to disable stdio redirection and can still be overridden with |
- // --test-launcher-jobs flag. |
- parallel_jobs_ = 1; |
- } |
} |
TestLauncher::~TestLauncher() { |
@@ -650,6 +636,9 @@ bool TestLauncher::Init() { |
} |
retry_limit_ = retry_limit; |
+ } else if (!CommandLine::ForCurrentProcess()->HasSwitch(kGTestFilterFlag)) { |
+ // Retry failures 3 times by default if we are running all of the tests. |
+ retry_limit_ = 3; |
} |
if (CommandLine::ForCurrentProcess()->HasSwitch( |
@@ -663,7 +652,12 @@ bool TestLauncher::Init() { |
} |
parallel_jobs_ = jobs; |
+ } else if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestFilterFlag)) { |
+ // Do not run jobs in parallel by default if we are running a subset of |
+ // the tests. |
+ parallel_jobs_ = 1; |
} |
+ |
fprintf(stdout, "Using %" PRIuS " parallel jobs.\n", parallel_jobs_); |
fflush(stdout); |
worker_pool_owner_.reset( |