1 : // Copyright 2012 Google Inc. All Rights Reserved.
2 : //
3 : // Licensed under the Apache License, Version 2.0 (the "License");
4 : // you may not use this file except in compliance with the License.
5 : // You may obtain a copy of the License at
6 : //
7 : // http://www.apache.org/licenses/LICENSE-2.0
8 : //
9 : // Unless required by applicable law or agreed to in writing, software
10 : // distributed under the License is distributed on an "AS IS" BASIS,
11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 : // See the License for the specific language governing permissions and
13 : // limitations under the License.
14 :
15 : #include <objbase.h>
16 :
17 : #include "base/at_exit.h"
18 : #include "base/command_line.h"
19 : #include "base/logging.h"
20 : #include "base/files/file_path.h"
21 : #include "gtest/gtest.h"
22 :
23 m : int main(int argc, char** argv) {
24 m : ::CoInitialize(NULL);
25 :
26 m : testing::InitGoogleTest(&argc, argv);
27 m : CommandLine::Init(argc, argv);
28 m : base::AtExitManager at_exit;
29 :
30 m : logging::LoggingSettings settings;
31 m : settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
32 m : settings.lock_log = logging::DONT_LOCK_LOG_FILE;
33 m : settings.delete_old = logging::APPEND_TO_OLD_LOG_FILE;
34 m : if (!logging::InitLogging(settings))
35 m : return 1;
36 :
37 m : logging::SetMinLogLevel(logging::LOG_ERROR);
38 :
39 m : int ret = RUN_ALL_TESTS();
40 :
41 m : ::CoUninitialize();
42 :
43 m : return ret;
44 m : }
|