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

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

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/test/launcher/unit_test_launcher.h"
6
7 #include "base/command_line.h"
8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h"
10 #include "base/logging.h"
11 #include "base/mac/foundation_util.h"
12 #include "base/test/gtest_util.h"
13 #include "base/test/test_switches.h"
14
15 namespace base {
16
17 int LaunchUnitTests(int argc,
18 char** argv,
19 const RunTestSuiteCallback& run_test_suite) {
20 CHECK(CommandLine::InitializedForCurrentProcess() ||
21 CommandLine::Init(argc, argv));
22 const CommandLine* command_line = CommandLine::ForCurrentProcess();
23 if (command_line->HasSwitch(switches::kTestLauncherListTests)) {
24 FilePath list_path(command_line->GetSwitchValuePath(
25 switches::kTestLauncherListTests));
26 if (WriteCompiledInTestsToFile(list_path)) {
27 return 0;
28 } else {
29 LOG(ERROR) << "Failed to write list of tests.";
30 return 1;
31 }
32 } else if (command_line->HasSwitch(
33 switches::kTestLauncherPrintWritablePath)) {
34 fprintf(stdout, "%s", mac::GetUserLibraryPath().value().c_str());
35 fflush(stdout);
36 return 0;
37 }
38
39 return run_test_suite.Run();
40 }
41
42 } // namespace base
OLDNEW
« no previous file with comments | « base/test/launcher/unit_test_launcher.cc ('k') | base/test/launcher/unit_test_launcher_nacl_nonsfi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698