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

Unified Diff: base/test/parallel_test_launcher.h

Issue 23757033: GTTF: Support running browser tests in parallel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 | « no previous file | base/test/parallel_test_launcher.cc » ('j') | content/public/test/test_launcher.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/parallel_test_launcher.h
diff --git a/base/test/parallel_test_launcher.h b/base/test/parallel_test_launcher.h
index e7b07df9552c013189bb7b6e847c6326de7b417c..ed22180d2ce2958d5bdbcca298568d6e93ada120 100644
--- a/base/test/parallel_test_launcher.h
+++ b/base/test/parallel_test_launcher.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/callback.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
@@ -29,10 +30,10 @@ class ParallelTestLauncher {
~ParallelTestLauncher();
// Callback called after a child process finishes. First argument is the exit
- // code, second one is true if the child process was terminated because of
- // a timeout, and third one contains output of the child (stdout and stderr
- // together).
- typedef Callback<void(int, bool, const std::string&)>
+ // code, second one is child process elapsed time, third one is true if
+ // the child process was terminated because of a timeout, and fourth one
+ // contains output of the child (stdout and stderr together).
+ typedef Callback<void(int, const TimeDelta&, bool, const std::string&)>
LaunchChildGTestProcessCallback;
// Launches a child process (assumed to be gtest-based binary) using
@@ -45,17 +46,34 @@ class ParallelTestLauncher {
base::TimeDelta timeout,
const LaunchChildGTestProcessCallback& callback);
+ // Similar to above, but with processes sharing the same value of |token_name|
+ // being serialized, with order matching order of calls of this method.
+ void LaunchNamedSequencedChildGTestProcess(
+ const std::string& token_name,
+ const CommandLine& command_line,
+ const std::string& wrapper,
+ base::TimeDelta timeout,
+ const LaunchChildGTestProcessCallback& callback);
+
// Resets the output watchdog, indicating some test results have been printed
// out. If a pause between the calls exceeds an internal treshold, a message
// will be printed listing all child processes we're still waiting for.
void ResetOutputWatchdog();
private:
+ void LaunchSequencedChildGTestProcess(
+ SequencedWorkerPool::SequenceToken sequence_token,
+ const CommandLine& command_line,
+ const std::string& wrapper,
+ base::TimeDelta timeout,
+ const LaunchChildGTestProcessCallback& callback);
+
// Called on a worker thread after a child process finishes.
void OnLaunchTestProcessFinished(
size_t sequence_number,
const LaunchChildGTestProcessCallback& callback,
int exit_code,
+ const TimeDelta& elapsed_time,
bool was_timeout,
const std::string& output);
« no previous file with comments | « no previous file | base/test/parallel_test_launcher.cc » ('j') | content/public/test/test_launcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698