| /* Copyright 2017 The Chromium OS Authors. All rights reserved. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| * Main entrypoint for gtest. |
| * Redirects logging to stderr to avoid syslog logspam. |
| class Environment : public ::testing::Environment { |
| ~Environment() override = default; |
| init_logging(LOG_TO_FD, STDERR_FILENO, LOG_INFO); |
| int main(int argc, char **argv) { |
| testing::InitGoogleTest(&argc, argv); |
| ::testing::AddGlobalTestEnvironment(new Environment()); |