Chromium Code Reviews

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

Issue 1208603002: content: implement unittests backend for Ozone GBM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: force single process Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 #include "base/test/launcher/unit_test_launcher.h" 5 #include "base/test/launcher/unit_test_launcher.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 173 matching lines...)
184 if (base::debug::BeingDebugged()) { 184 if (base::debug::BeingDebugged()) {
185 fprintf(stdout, 185 fprintf(stdout,
186 "Debugger detected, switching to single process mode.\n" 186 "Debugger detected, switching to single process mode.\n"
187 "Pass --test-launcher-debug-launcher to debug the launcher " 187 "Pass --test-launcher-debug-launcher to debug the launcher "
188 "itself.\n"); 188 "itself.\n");
189 fflush(stdout); 189 fflush(stdout);
190 force_single_process = true; 190 force_single_process = true;
191 } 191 }
192 } 192 }
193 193
194 #if defined(USE_OZONE)
195 // It's prohibited multi-processes from taking card0. Only DRM master
196 // can take it. crbug.com/475633
197 force_single_process = true;
spang 2015/12/02 17:00:03 I don't think this is worth losing parallelism ove
dshwang 2015/12/08 01:12:38 I agree. do you have good idea? My idea is - thi
dshwang 2015/12/08 22:19:33 What I really want is that content_unittests and g
dshwang 2015/12/08 23:04:34 Interesting. I assume that we will make test bots
198 #endif
199
194 if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestHelpFlag) || 200 if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestHelpFlag) ||
195 CommandLine::ForCurrentProcess()->HasSwitch(kGTestListTestsFlag) || 201 CommandLine::ForCurrentProcess()->HasSwitch(kGTestListTestsFlag) ||
196 CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessTestsFlag) || 202 CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessTestsFlag) ||
197 CommandLine::ForCurrentProcess()->HasSwitch( 203 CommandLine::ForCurrentProcess()->HasSwitch(
198 switches::kTestChildProcess) || 204 switches::kTestChildProcess) ||
199 force_single_process) { 205 force_single_process) {
200 return run_test_suite.Run(); 206 return run_test_suite.Run();
201 } 207 }
202 #endif 208 #endif
203 209
(...skipping 416 matching lines...)
620 TestLauncher* test_launcher, 626 TestLauncher* test_launcher,
621 const std::vector<std::string>& test_names) { 627 const std::vector<std::string>& test_names) {
622 ThreadTaskRunnerHandle::Get()->PostTask( 628 ThreadTaskRunnerHandle::Get()->PostTask(
623 FROM_HERE, 629 FROM_HERE,
624 Bind(&RunUnitTestsSerially, test_launcher, platform_delegate_, test_names, 630 Bind(&RunUnitTestsSerially, test_launcher, platform_delegate_, test_names,
625 use_job_objects_ ? TestLauncher::USE_JOB_OBJECTS : 0)); 631 use_job_objects_ ? TestLauncher::USE_JOB_OBJECTS : 0));
626 return test_names.size(); 632 return test_names.size();
627 } 633 }
628 634
629 } // namespace base 635 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | content/test/content_test_suite.h » ('j') | ui/ozone/public/ozone_gpu_test_helper.cc » ('J')

Powered by Google App Engine