| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <inttypes.h> | 5 #include <inttypes.h> |
| 6 #include <stdio.h> | 6 #include <stdio.h> |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 return std::string(); | 106 return std::string(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 base::CommandLine GetCommandLineForChildGTestProcess( | 109 base::CommandLine GetCommandLineForChildGTestProcess( |
| 110 const std::vector<std::string>& test_names, | 110 const std::vector<std::string>& test_names, |
| 111 const base::FilePath& output_file) override { | 111 const base::FilePath& output_file) override { |
| 112 base::CommandLine cmd_line(test_path_); | 112 base::CommandLine cmd_line(test_path_); |
| 113 cmd_line.AppendSwitchPath( | 113 cmd_line.AppendSwitchPath( |
| 114 switches::kTestLauncherOutput, output_file); | 114 switches::kTestLauncherOutput, output_file); |
| 115 cmd_line.AppendSwitchASCII( | 115 cmd_line.AppendSwitchASCII( |
| 116 base::kGTestFilterFlag, JoinString(test_names, ":")); | 116 base::kGTestFilterFlag, base::JoinString(test_names, ":")); |
| 117 return cmd_line; | 117 return cmd_line; |
| 118 } | 118 } |
| 119 | 119 |
| 120 void RelaunchTests(base::TestLauncher* test_launcher, | 120 void RelaunchTests(base::TestLauncher* test_launcher, |
| 121 const std::vector<std::string>& test_names, | 121 const std::vector<std::string>& test_names, |
| 122 int launch_flags) override { | 122 int launch_flags) override { |
| 123 RunUnitTestsBatch(test_launcher, this, test_names, launch_flags); | 123 RunUnitTestsBatch(test_launcher, this, test_names, launch_flags); |
| 124 } | 124 } |
| 125 | 125 |
| 126 base::FilePath test_path_; | 126 base::FilePath test_path_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 151 base::TestLauncher launcher(&delegate, base::SysInfo::NumberOfProcessors()); | 151 base::TestLauncher launcher(&delegate, base::SysInfo::NumberOfProcessors()); |
| 152 bool success = launcher.Run(); | 152 bool success = launcher.Run(); |
| 153 | 153 |
| 154 fprintf(stdout, "Tests took %" PRId64 " seconds.\n", | 154 fprintf(stdout, "Tests took %" PRId64 " seconds.\n", |
| 155 (base::TimeTicks::Now() - start_time).InSeconds()); | 155 (base::TimeTicks::Now() - start_time).InSeconds()); |
| 156 fflush(stdout); | 156 fflush(stdout); |
| 157 return success ? 0 : 1; | 157 return success ? 0 : 1; |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace base | 160 } // namespace base |
| OLD | NEW |