2014-02-14 23:21:05 +00:00
|
|
|
// Copyright 2014 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
2013-09-24 04:17:12 +00:00
|
|
|
|
2014-08-21 22:40:44 +00:00
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
2014-10-01 22:10:21 +00:00
|
|
|
#include "packager/base/at_exit.h"
|
|
|
|
#include "packager/base/command_line.h"
|
2016-08-14 22:28:21 +00:00
|
|
|
#include "packager/base/files/file_path.h"
|
2014-10-01 22:10:21 +00:00
|
|
|
#include "packager/base/logging.h"
|
2016-08-14 22:28:21 +00:00
|
|
|
#include "packager/base/path_service.h"
|
2013-09-24 04:17:12 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
2016-08-14 22:28:21 +00:00
|
|
|
base::AtExitManager exit;
|
2013-10-11 21:44:55 +00:00
|
|
|
|
|
|
|
// Needed to enable VLOG/DVLOG through --vmodule or --v.
|
2015-07-22 23:40:45 +00:00
|
|
|
base::CommandLine::Init(argc, argv);
|
2013-10-11 21:44:55 +00:00
|
|
|
|
2016-08-14 22:28:21 +00:00
|
|
|
// Set up logging.
|
|
|
|
logging::LoggingSettings log_settings;
|
|
|
|
base::FilePath log_filename;
|
|
|
|
PathService::Get(base::DIR_EXE, &log_filename);
|
|
|
|
log_filename = log_filename.AppendASCII("test.log");
|
|
|
|
log_settings.logging_dest = logging::LOG_TO_ALL;
|
|
|
|
log_settings.log_file = log_filename.value().c_str();
|
|
|
|
log_settings.delete_old = logging::DELETE_OLD_LOG_FILE;
|
|
|
|
CHECK(logging::InitLogging(log_settings));
|
|
|
|
|
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
|
|
|
2013-09-24 04:17:12 +00:00
|
|
|
return RUN_ALL_TESTS();
|
|
|
|
}
|