| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/test/test_launcher.h" | 5 #include "content/test/test_launcher.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 | 547 |
| 548 if (command_line->HasSwitch(kHelpFlag)) { | 548 if (command_line->HasSwitch(kHelpFlag)) { |
| 549 PrintUsage(); | 549 PrintUsage(); |
| 550 return 0; | 550 return 0; |
| 551 } | 551 } |
| 552 | 552 |
| 553 int return_code = 0; | 553 int return_code = 0; |
| 554 if (launcher_delegate->Run(argc, argv, &return_code)) | 554 if (launcher_delegate->Run(argc, argv, &return_code)) |
| 555 return return_code; | 555 return return_code; |
| 556 | 556 |
| 557 base::AtExitManager at_exit; |
| 558 |
| 557 int32 total_shards; | 559 int32 total_shards; |
| 558 int32 shard_index; | 560 int32 shard_index; |
| 559 bool should_shard = ShouldShard(&total_shards, &shard_index); | 561 bool should_shard = ShouldShard(&total_shards, &shard_index); |
| 560 | 562 |
| 561 fprintf(stdout, | 563 fprintf(stdout, |
| 562 "Starting tests...\n" | 564 "Starting tests...\n" |
| 563 "IMPORTANT DEBUGGING NOTE: each test is run inside its own process.\n" | 565 "IMPORTANT DEBUGGING NOTE: each test is run inside its own process.\n" |
| 564 "For debugging a test inside a debugger, use the\n" | 566 "For debugging a test inside a debugger, use the\n" |
| 565 "--gtest_filter=<your_test_name> flag along with either\n" | 567 "--gtest_filter=<your_test_name> flag along with either\n" |
| 566 "--single_process (to run all tests in one launcher/browser process) or\n" | 568 "--single_process (to run all tests in one launcher/browser process) or\n" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 595 } | 597 } |
| 596 | 598 |
| 597 // Special value "-1" means "repeat indefinitely". | 599 // Special value "-1" means "repeat indefinitely". |
| 598 if (cycles != -1) | 600 if (cycles != -1) |
| 599 cycles--; | 601 cycles--; |
| 600 } | 602 } |
| 601 return exit_code; | 603 return exit_code; |
| 602 } | 604 } |
| 603 | 605 |
| 604 } // namespace test_launcher | 606 } // namespace test_launcher |
| OLD | NEW |