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

Unified Diff: base/test/launcher/test_launcher.cc

Issue 485733002: Will no longer force jobs=1 with filters in bot mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index 9150e636c3c0b7c8984b1e146ea25ccfb0cdd0cd..78ff176265fa1bb83762ce8c9d33c1263381cf5e 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -629,10 +629,9 @@ bool TestLauncher::Init() {
return false;
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kTestLauncherRetryLimit)) {
+ if (command_line->HasSwitch(switches::kTestLauncherRetryLimit)) {
int retry_limit = -1;
- if (!StringToInt(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ if (!StringToInt(command_line->GetSwitchValueASCII(
switches::kTestLauncherRetryLimit), &retry_limit) ||
retry_limit < 0) {
LOG(ERROR) << "Invalid value for " << switches::kTestLauncherRetryLimit;
@@ -640,15 +639,15 @@ 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.
+ } else if (!command_line->HasSwitch(kGTestFilterFlag) || BotModeEnabled()) {
+ // Retry failures 3 times by default if we are running all of the tests or
+ // in bot mode.
retry_limit_ = 3;
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kTestLauncherJobs)) {
+ if (command_line->HasSwitch(switches::kTestLauncherJobs)) {
int jobs = -1;
- if (!StringToInt(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ if (!StringToInt(command_line->GetSwitchValueASCII(
switches::kTestLauncherJobs), &jobs) ||
jobs < 0) {
LOG(ERROR) << "Invalid value for " << switches::kTestLauncherJobs;
@@ -656,9 +655,9 @@ bool TestLauncher::Init() {
}
parallel_jobs_ = jobs;
- } else if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestFilterFlag)) {
+ } else if (command_line->HasSwitch(kGTestFilterFlag) && !BotModeEnabled()) {
// Do not run jobs in parallel by default if we are running a subset of
- // the tests.
+ // the tests and if bot mode is off.
parallel_jobs_ = 1;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698