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

Unified Diff: content/test/test_launcher.cc

Issue 9662011: Don't run InProcessBrowserTest.Empty when gtest_filter is specified. There are two reasons for this: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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: content/test/test_launcher.cc
===================================================================
--- content/test/test_launcher.cc (revision 125849)
+++ content/test/test_launcher.cc (working copy)
@@ -635,17 +635,23 @@
testing::InitGoogleTest(&argc, argv);
TestTimeouts::Initialize();
+ int exit_code = 0;
// Make sure the entire browser code is loaded into memory. Reading it
// from disk may be slow on a busy bot, and can easily exceed the default
// timeout causing flaky test failures. Use an empty test that only starts
// and closes a browser with a long timeout to avoid those problems.
- int exit_code = RunTest(launcher_delegate,
- kEmptyTestName,
- TestTimeouts::large_test_timeout_ms(),
- NULL);
- if (exit_code != 0)
- return exit_code;
+ // NOTE: we don't do this when specifying a filter because this slows down the
+ // common case of running one test locally, and also on trybots when sharding
+ // as this one test runs ~200 times and wastes a few minutes.
+ if (!should_shard && !command_line->HasSwitch(kGTestFilterFlag)) {
+ exit_code = RunTest(launcher_delegate,
+ kEmptyTestName,
+ TestTimeouts::large_test_timeout_ms(),
+ NULL);
+ if (exit_code != 0)
+ return exit_code;
+ }
int cycles = 1;
if (command_line->HasSwitch(kGTestRepeatFlag)) {
« 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