Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2488)

Unified Diff: base/test/launcher/unit_test_launcher.h

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/launcher/test_launcher_ios.cc ('k') | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/unit_test_launcher.h
diff --git a/base/test/launcher/unit_test_launcher.h b/base/test/launcher/unit_test_launcher.h
index e4997a026f7e3d2f9c9baa11a87956eb3380cad8..ca00f1048b2d18dd8566640a3d68d56ec3f70520 100644
--- a/base/test/launcher/unit_test_launcher.h
+++ b/base/test/launcher/unit_test_launcher.h
@@ -55,10 +55,27 @@ class UnitTestPlatformDelegate {
// no wrapper.
virtual std::string GetWrapperForChildGTestProcess() = 0;
+ // Relaunch tests, e.g. after a crash.
+ virtual void RelaunchTests(TestLauncher* test_launcher,
+ const std::vector<std::string>& test_names,
+ int launch_flags) = 0;
+
protected:
~UnitTestPlatformDelegate() {}
};
+// Runs tests serially, each in its own process.
+void RunUnitTestsSerially(TestLauncher* test_launcher,
+ UnitTestPlatformDelegate* platform_delegate,
+ const std::vector<std::string>& test_names,
+ int launch_flags);
+
+// Runs tests in batches (each batch in its own process).
+void RunUnitTestsBatch(TestLauncher* test_launcher,
+ UnitTestPlatformDelegate* platform_delegate,
+ const std::vector<std::string>& test_names,
+ int launch_flags);
+
// Test launcher delegate for unit tests (mostly to support batching).
class UnitTestLauncherDelegate : public TestLauncherDelegate {
public:
@@ -68,15 +85,6 @@ class UnitTestLauncherDelegate : public TestLauncherDelegate {
~UnitTestLauncherDelegate() override;
private:
- struct GTestCallbackState {
- GTestCallbackState();
- ~GTestCallbackState();
-
- TestLauncher* test_launcher;
- std::vector<std::string> test_names;
- FilePath output_file;
- };
-
// TestLauncherDelegate:
bool GetTests(std::vector<SplitTestName>* output) override;
bool ShouldRunTest(const std::string& test_case_name,
@@ -86,39 +94,6 @@ class UnitTestLauncherDelegate : public TestLauncherDelegate {
size_t RetryTests(TestLauncher* test_launcher,
const std::vector<std::string>& test_names) override;
- // Runs tests serially, each in its own process.
- void RunSerially(TestLauncher* test_launcher,
- const std::vector<std::string>& test_names);
-
- // Runs tests in batches (each batch in its own process).
- void RunBatch(TestLauncher* test_launcher,
- const std::vector<std::string>& test_names);
-
- // Callback for batched tests.
- void GTestCallback(const GTestCallbackState& callback_state,
- int exit_code,
- const TimeDelta& elapsed_time,
- bool was_timeout,
- const std::string& output);
-
- // Callback for serialized tests.
- void SerialGTestCallback(const GTestCallbackState& callback_state,
- const std::vector<std::string>& test_names,
- int exit_code,
- const TimeDelta& elapsed_time,
- bool was_timeout,
- const std::string& output);
-
- // Interprets test results and reports to the test launcher. Returns true
- // on success.
- static bool ProcessTestResults(TestLauncher* test_launcher,
- const std::vector<std::string>& test_names,
- const base::FilePath& output_file,
- const std::string& output,
- int exit_code,
- bool was_timeout,
- std::vector<std::string>* tests_to_relaunch);
-
ThreadChecker thread_checker_;
UnitTestPlatformDelegate* platform_delegate_;
« no previous file with comments | « base/test/launcher/test_launcher_ios.cc ('k') | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698