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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // on the same thread this method was called. | 108 // on the same thread this method was called. |
109 void LaunchChildGTestProcess(const CommandLine& command_line, | 109 void LaunchChildGTestProcess(const CommandLine& command_line, |
110 const std::string& wrapper, | 110 const std::string& wrapper, |
111 base::TimeDelta timeout, | 111 base::TimeDelta timeout, |
112 int flags, | 112 int flags, |
113 const LaunchChildGTestProcessCallback& callback); | 113 const LaunchChildGTestProcessCallback& callback); |
114 | 114 |
115 // Called when a test has finished running. | 115 // Called when a test has finished running. |
116 void OnTestFinished(const TestResult& result); | 116 void OnTestFinished(const TestResult& result); |
117 | 117 |
118 // Constructs a full test name given a test case name and a test name. | |
119 static std::string FormatFullTestName(const std::string& test_case_name, | |
120 const std::string& test_name); | |
121 | |
122 private: | 118 private: |
123 bool Init() WARN_UNUSED_RESULT; | 119 bool Init() WARN_UNUSED_RESULT; |
124 | 120 |
125 // Runs all tests in current iteration. Uses callbacks to communicate success. | 121 // Runs all tests in current iteration. Uses callbacks to communicate success. |
126 void RunTests(); | 122 void RunTests(); |
127 | 123 |
128 void RunTestIteration(); | 124 void RunTestIteration(); |
129 | 125 |
130 // Saves test results summary as JSON if requested from command line. | 126 // Saves test results summary as JSON if requested from command line. |
131 void MaybeSaveSummaryAsJSON(); | 127 void MaybeSaveSummaryAsJSON(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 DISALLOW_COPY_AND_ASSIGN(TestLauncher); | 201 DISALLOW_COPY_AND_ASSIGN(TestLauncher); |
206 }; | 202 }; |
207 | 203 |
208 // Extract part from |full_output| that applies to |result|. | 204 // Extract part from |full_output| that applies to |result|. |
209 std::string GetTestOutputSnippet(const TestResult& result, | 205 std::string GetTestOutputSnippet(const TestResult& result, |
210 const std::string& full_output); | 206 const std::string& full_output); |
211 | 207 |
212 } // namespace base | 208 } // namespace base |
213 | 209 |
214 #endif // BASE_TEST_LAUNCHER_TEST_LAUNCHER_H_ | 210 #endif // BASE_TEST_LAUNCHER_TEST_LAUNCHER_H_ |
OLD | NEW |