Index: base/test/launcher/test_launcher.h |
diff --git a/base/test/launcher/test_launcher.h b/base/test/launcher/test_launcher.h |
index 600c4dec339f3fee2c83c591abd6212891f8490b..ecdbd1858c73e1ce7aedf0636324e30ee9e63333 100644 |
--- a/base/test/launcher/test_launcher.h |
+++ b/base/test/launcher/test_launcher.h |
@@ -77,6 +77,18 @@ class TestLauncher { |
// Runs the launcher. Must be called at most once. |
bool Run() WARN_UNUSED_RESULT; |
+ // Flags controlling behavior of LaunchChildGTestProcess. |
sky
2014/08/07 16:19:57
nit: style guide says enums are first in a section
Paweł Hajdan Jr.
2014/08/08 10:19:09
Done.
|
+ enum LaunchChildGTestProcessFlags { |
+ // Allows usage of job objects on Windows. Helps properly clean up child |
+ // processes. |
+ USE_JOB_OBJECTS = (1 << 0), |
+ |
+ // Allows breakaway from job on Windows. May result in some child processes |
+ // not being properly terminated after launcher dies if these processes |
+ // fail to cooperate. |
+ ALLOW_BREAKAWAY_FROM_JOB = (1 << 1), |
+ }; |
+ |
// Callback called after a child process finishes. First argument is the exit |
// 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 |
@@ -87,13 +99,12 @@ class TestLauncher { |
// Launches a child process (assumed to be gtest-based binary) using |
// |command_line|. If |wrapper| is not empty, it is prepended to the final |
// command line. If the child process is still running after |timeout|, it |
- // is terminated. |use_job_objects| determines whether job objects are used |
- // on Windows (if unsure pass true). After the child process finishes |
- // |callback| is called on the same thread this method was called. |
+ // is terminated. After the child process finishes |callback| is called |
+ // on the same thread this method was called. |
void LaunchChildGTestProcess(const CommandLine& command_line, |
const std::string& wrapper, |
base::TimeDelta timeout, |
- bool use_job_objects, |
+ int flags, |
const LaunchChildGTestProcessCallback& callback); |
// Called when a test has finished running. |