blob: daad62a413bb53302697e8ed41c4eff559300205 [file] [log] [blame]
jmadill7094c3562015-07-07 18:34:431// Copyright 2015 The Chromium 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#include "base/at_exit.h"
6#include "base/bind.h"
7#include "base/command_line.h"
8#include "base/message_loop/message_loop.h"
9#include "base/test/launcher/unit_test_launcher.h"
10#include "base/test/test_suite.h"
11#include "testing/gtest/include/gtest/gtest.h"
12
13namespace {
14
15int RunHelper(base::TestSuite* test_suite) {
16 base::MessageLoop message_loop;
17 return test_suite->Run();
18}
19
20} // namespace
21
geofflang366f3af12016-12-01 18:08:1122// Defined in angle_deqp_gtest.cpp. Declared here so we don't need to make a
23// header that we import in Chromium.
24namespace angle {
25void InitTestHarness(int* argc, char** argv);
26}
27
jmadill7094c3562015-07-07 18:34:4328int main(int argc, char** argv) {
geofflang366f3af12016-12-01 18:08:1129 angle::InitTestHarness(&argc, argv);
jmadill7094c3562015-07-07 18:34:4330 base::CommandLine::Init(argc, argv);
31 base::TestSuite test_suite(argc, argv);
32 int rt = base::LaunchUnitTestsSerially(
33 argc,
34 argv,
35 base::Bind(&RunHelper, base::Unretained(&test_suite)));
36 return rt;
37}