OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/test/launcher/test_launcher.h" | 5 #include "base/test/launcher/test_launcher.h" |
6 | 6 |
7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 // Enable test retries by default for bots. This can be still overridden | 324 // Enable test retries by default for bots. This can be still overridden |
325 // from command line using --test-launcher-retry-limit flag. | 325 // from command line using --test-launcher-retry-limit flag. |
326 retry_limit_ = 3; | 326 retry_limit_ = 3; |
327 } else { | 327 } else { |
328 // Default to serial test execution if not running on a bot. This makes it | 328 // Default to serial test execution if not running on a bot. This makes it |
329 // possible to disable stdio redirection and can still be overridden with | 329 // possible to disable stdio redirection and can still be overridden with |
330 // --test-launcher-jobs flag. | 330 // --test-launcher-jobs flag. |
331 parallel_jobs_ = 1; | 331 parallel_jobs_ = 1; |
332 } | 332 } |
333 | |
334 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) | |
335 // TODO(erg): Trying to parallelize tests on linux_aura makes things flaky | |
336 // because all shards share X11 state. http://crbug.com/326701 | |
337 parallel_jobs_ = 1; | |
338 | |
339 fprintf(stdout, | |
340 "Disabling parallelization due to the linux_aura flake. " | |
341 "http://crbug.com/326701\n"); | |
342 fflush(stdout); | |
343 #endif | |
344 } | 333 } |
345 | 334 |
346 TestLauncher::~TestLauncher() { | 335 TestLauncher::~TestLauncher() { |
347 if (worker_pool_owner_) | 336 if (worker_pool_owner_) |
348 worker_pool_owner_->pool()->Shutdown(); | 337 worker_pool_owner_->pool()->Shutdown(); |
349 } | 338 } |
350 | 339 |
351 bool TestLauncher::Run(int argc, char** argv) { | 340 bool TestLauncher::Run(int argc, char** argv) { |
352 if (!Init()) | 341 if (!Init()) |
353 return false; | 342 return false; |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 | 993 |
1005 g_live_processes.Get().erase(process_handle); | 994 g_live_processes.Get().erase(process_handle); |
1006 } | 995 } |
1007 | 996 |
1008 base::CloseProcessHandle(process_handle); | 997 base::CloseProcessHandle(process_handle); |
1009 | 998 |
1010 return exit_code; | 999 return exit_code; |
1011 } | 1000 } |
1012 | 1001 |
1013 } // namespace base | 1002 } // namespace base |
OLD | NEW |