/* Copyright 2017 The ChromiumOS Authors
 * 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.
 */

#include <stdio.h>

#include <gtest/gtest.h>

#include "util.h"

namespace {

class Environment : public ::testing::Environment {
 public:
  ~Environment() override = default;

  void SetUp() override {
    init_logging(LOG_TO_FD, STDERR_FILENO, LOG_INFO);
  }
};

}  // namespace

int main(int argc, char **argv) {
  testing::InitGoogleTest(&argc, argv);
  ::testing::AddGlobalTestEnvironment(new Environment());
  return RUN_ALL_TESTS();
}
