blob: e24193c698fbec7d90b2b00180fd49f8ba42117a [file] [log] [blame]
Austin Eng23341ba2019-08-22 01:08:411// Copyright 2019 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/bind.h"
6#include "base/command_line.h"
7#include "base/message_loop/message_pump_type.h"
8#include "base/task/single_thread_task_executor.h"
9#include "base/test/launcher/unit_test_launcher.h"
10#include "base/test/test_suite.h"
11
12namespace {
13
14int RunHelper(base::TestSuite* test_suite) {
15 base::SingleThreadTaskExecutor io_task_executor(base::MessagePumpType::IO);
16 return test_suite->Run();
17}
18
19} // namespace
20
21// Definition located in third_party/dawn/src/tests/perf_tests/DawnPerfTest.h
22// Forward declared here to avoid pulling in the Dawn headers.
23void InitDawnPerfTestEnvironment(int argc, char** argv);
24
25int main(int argc, char** argv) {
26 base::CommandLine::Init(argc, argv);
27 InitDawnPerfTestEnvironment(argc, argv);
28
29 base::TestSuite test_suite(argc, argv);
30 int rt = base::LaunchUnitTestsSerially(
31 argc, argv, base::BindOnce(&RunHelper, base::Unretained(&test_suite)));
32 return rt;
33}