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

Side by Side Diff: base/test/launcher/unit_test_launcher.h

Issue 1218843002: Revert "Support disabling unit test batching. Use it for angle_end2end_tests" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_UNIT_TEST_LAUNCHER_H_ 5 #ifndef BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_
6 #define BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_ 6 #define BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/test/launcher/test_launcher.h" 10 #include "base/test/launcher/test_launcher.h"
11 11
12 namespace base { 12 namespace base {
13 13
14 // Callback that runs a test suite and returns exit code. 14 // Callback that runs a test suite and returns exit code.
15 typedef base::Callback<int(void)> RunTestSuiteCallback; 15 typedef base::Callback<int(void)> RunTestSuiteCallback;
16 16
17 // Launches unit tests in given test suite. Returns exit code. 17 // Launches unit tests in given test suite. Returns exit code.
18 int LaunchUnitTests(int argc, 18 int LaunchUnitTests(int argc,
19 char** argv, 19 char** argv,
20 const RunTestSuiteCallback& run_test_suite); 20 const RunTestSuiteCallback& run_test_suite);
21 21
22 // Same as above, but always runs tests serially. 22 // Same as above, but always runs tests serially.
23 int LaunchUnitTestsSerially(int argc, 23 int LaunchUnitTestsSerially(int argc,
24 char** argv, 24 char** argv,
25 const RunTestSuiteCallback& run_test_suite); 25 const RunTestSuiteCallback& run_test_suite);
26 26
27 // Launches unit tests in given test suite. Returns exit code.
28 // |default_jobs| is the default number of parallel test jobs.
29 // |default_batch_limit| is the default size of test batch
30 // (use 0 to disable batching).
31 // |use_job_objects| determines whether to use job objects.
32 int LaunchUnitTestsWithOptions(
33 int argc,
34 char** argv,
35 int default_jobs,
36 int default_batch_limit,
37 bool use_job_objects,
38 const RunTestSuiteCallback& run_test_suite);
39
40 #if defined(OS_WIN) 27 #if defined(OS_WIN)
41 // Launches unit tests in given test suite. Returns exit code. 28 // Launches unit tests in given test suite. Returns exit code.
42 // |use_job_objects| determines whether to use job objects. 29 // |use_job_objects| determines whether to use job objects.
43 int LaunchUnitTests(int argc, 30 int LaunchUnitTests(int argc,
44 wchar_t** argv, 31 wchar_t** argv,
45 bool use_job_objects, 32 bool use_job_objects,
46 const RunTestSuiteCallback& run_test_suite); 33 const RunTestSuiteCallback& run_test_suite);
47 #endif // defined(OS_WIN) 34 #endif // defined(OS_WIN)
48 35
49 // Delegate to abstract away platform differences for unit tests. 36 // Delegate to abstract away platform differences for unit tests.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 103
117 // Determines whether we use job objects on Windows. 104 // Determines whether we use job objects on Windows.
118 bool use_job_objects_; 105 bool use_job_objects_;
119 106
120 DISALLOW_COPY_AND_ASSIGN(UnitTestLauncherDelegate); 107 DISALLOW_COPY_AND_ASSIGN(UnitTestLauncherDelegate);
121 }; 108 };
122 109
123 } // namespace base 110 } // namespace base
124 111
125 #endif // BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_ 112 #endif // BASE_TEST_LAUNCHER_UNIT_TEST_LAUNCHER_H_
OLDNEW
« no previous file with comments | « no previous file | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698