testrunner.cc revision faac2a5b491605d400d89cbe2054474c7aba6452
1// Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// based on pam_google_testrunner.cc 6 7#include <base/at_exit.h> 8#include <base/command_line.h> 9#include <dbus/dbus-glib.h> 10#include <dbus/dbus-glib-bindings.h> 11#include <dbus/dbus-glib-lowlevel.h> 12#include <glib.h> 13#include <glib-object.h> 14#include <gtest/gtest.h> 15 16#include "update_engine/subprocess.h" 17#include "update_engine/terminator.h" 18 19int main(int argc, char **argv) { 20 ::g_type_init(); 21 g_thread_init(NULL); 22 dbus_g_thread_init(); 23 base::AtExitManager exit_manager; 24 chromeos_update_engine::Terminator::Init(); 25 chromeos_update_engine::Subprocess::Init(); 26 CommandLine::Init(argc, argv); 27 ::testing::InitGoogleTest(&argc, argv); 28 int test_result = RUN_ALL_TESTS(); 29 LOG(INFO) << "unittest return value: " << test_result; 30 return test_result; 31} 32