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 #ifndef BASE_TEST_LAUNCHER_TEST_LAUNCHER_H_ | 5 #ifndef BASE_TEST_LAUNCHER_TEST_LAUNCHER_H_ |
6 #define BASE_TEST_LAUNCHER_TEST_LAUNCHER_H_ | 6 #define BASE_TEST_LAUNCHER_TEST_LAUNCHER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 // Launches a child process (assumed to be gtest-based binary) using | 87 // Launches a child process (assumed to be gtest-based binary) using |
88 // |command_line|. If |wrapper| is not empty, it is prepended to the final | 88 // |command_line|. If |wrapper| is not empty, it is prepended to the final |
89 // command line. If the child process is still running after |timeout|, it | 89 // command line. If the child process is still running after |timeout|, it |
90 // is terminated. |use_job_objects| determines whether job objects are used | 90 // is terminated. |use_job_objects| determines whether job objects are used |
91 // on Windows (if unsure pass true). After the child process finishes | 91 // on Windows (if unsure pass true). After the child process finishes |
92 // |callback| is called on the same thread this method was called. | 92 // |callback| is called on the same thread this method was called. |
93 void LaunchChildGTestProcess(const CommandLine& command_line, | 93 void LaunchChildGTestProcess(const CommandLine& command_line, |
94 const std::string& wrapper, | 94 const std::string& wrapper, |
95 base::TimeDelta timeout, | 95 base::TimeDelta timeout, |
96 bool use_job_objects, | 96 bool use_job_objects, |
97 bool allow_breakaway, | |
sky
2014/08/06 17:58:49
How about a bitmask for these? Multiple boolean pa
Paweł Hajdan Jr.
2014/08/07 12:17:41
Done.
| |
97 const LaunchChildGTestProcessCallback& callback); | 98 const LaunchChildGTestProcessCallback& callback); |
98 | 99 |
99 // Called when a test has finished running. | 100 // Called when a test has finished running. |
100 void OnTestFinished(const TestResult& result); | 101 void OnTestFinished(const TestResult& result); |
101 | 102 |
102 private: | 103 private: |
103 bool Init() WARN_UNUSED_RESULT; | 104 bool Init() WARN_UNUSED_RESULT; |
104 | 105 |
105 // Runs all tests in current iteration. Uses callbacks to communicate success. | 106 // Runs all tests in current iteration. Uses callbacks to communicate success. |
106 void RunTests(); | 107 void RunTests(); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 const std::string& full_output); | 188 const std::string& full_output); |
188 | 189 |
189 // Returns command line command line after gtest-specific processing | 190 // Returns command line command line after gtest-specific processing |
190 // and applying |wrapper|. | 191 // and applying |wrapper|. |
191 CommandLine PrepareCommandLineForGTest(const CommandLine& command_line, | 192 CommandLine PrepareCommandLineForGTest(const CommandLine& command_line, |
192 const std::string& wrapper); | 193 const std::string& wrapper); |
193 | 194 |
194 } // namespace base | 195 } // namespace base |
195 | 196 |
196 #endif // BASE_TEST_LAUNCHER_TEST_LAUNCHER_H_ | 197 #endif // BASE_TEST_LAUNCHER_TEST_LAUNCHER_H_ |
OLD | NEW |