blob: 4e427805ef0d4dad634ab008db17f7a3cc0bf2b8 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/syslog/cpp/log_settings.h>
#include <lib/syslog/cpp/macros.h>
#include <gtest/gtest.h>
#include "garnet/bin/trace/tests/component_context.h"
#include "src/lib/fxl/command_line.h"
#include "src/lib/fxl/log_settings_command_line.h"
#include "src/lib/fxl/test/test_settings.h"
syslog::LogSettings g_log_settings;
int main(int argc, char** argv) {
auto cl = fxl::CommandLineFromArgcArgv(argc, argv);
if (!fxl::SetTestSettings(cl)) {
FX_LOGS(ERROR) << "Failed to parse log settings from command-line";
return EXIT_FAILURE;
}
fxl::ParseLogSettings(cl, &g_log_settings);
testing::InitGoogleTest(&argc, argv);
tracing::test::InitComponentContext();
return RUN_ALL_TESTS();
}