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

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

Issue 60983004: GTTF: Make test launcher unset GTEST_ env variables since it handles all of sharding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 f7f967958c5f6028a36496a109c8eaffa2748802..a9bebf2ccea03ed5f3bb2c6788598a485a2d4a74 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -616,6 +616,12 @@ bool TestLauncher::Init() {
return false;
}
+ // Make sure we don't pass any sharding-related environment to the child
+ // processes. This test launcher implements the sharding completely.
+ scoped_ptr<Environment> env(Environment::Create());
+ CHECK(env->UnSetVar("GTEST_TOTAL_SHARDS"));
+ CHECK(env->UnSetVar("GTEST_SHARD_INDEX"));
+
if (command_line->HasSwitch(kGTestRepeatFlag) &&
!StringToInt(command_line->GetSwitchValueASCII(kGTestRepeatFlag),
&cycles_)) {
« 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