chromium/third_party/angle/src/tests/test_utils/runner/TestSuite_unittest.cpp

//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// TestSuite_unittest.cpp: Unit tests for ANGLE's test harness.
//

#include <gtest/gtest.h>

#include "../angle_test_instantiate.h"
#include "TestSuite.h"
#include "common/debug.h"
#include "common/system_utils.h"
#include "util/test_utils.h"
#include "util/test_utils_unittest_helper.h"

#include <rapidjson/document.h>

usingnamespaceangle;

js;

// This file is included in both angle_unittests and test_utils_unittest_helper. This variable is
// defined separately in each test target's main file.
extern bool gVerbose;

namespace
{
constexpr char kTestHelperExecutable[] =;
constexpr int kFlakyRetries            =;

class TestSuiteTest : public testing::Test
{};

// Tests the ANGLE standalone testing harness. Runs four tests with different ending conditions.
// Verifies that Pass, Fail, Crash and Timeout are all handled correctly.
TEST_F(TestSuiteTest, RunMockTests)
{}

// Verifies the flaky retry feature works as expected.
TEST_F(TestSuiteTest, RunFlakyTests)
{}

// Verifies that crashes are handled even without the crash handler.
TEST_F(TestSuiteTest, RunCrashingTests)
{}

// Normal passing test.
TEST(MockTestSuiteTest, DISABLED_Pass)
{}

// Normal failing test.
TEST(MockTestSuiteTest, DISABLED_Fail)
{}

// Trigger a test timeout.
TEST(MockTestSuiteTest, DISABLED_Timeout)
{}

// Trigger a test skip.
TEST(MockTestSuiteTest, DISABLED_Skip)
{}

// Trigger a flaky test failure.
TEST(MockFlakyTestSuiteTest, DISABLED_Flaky)
{}

// Trigger a test crash.
TEST(MockCrashTestSuiteTest, DISABLED_Crash)
{}

// This test runs after the crash test.
TEST(MockCrashTestSuiteTest, DISABLED_PassAfterCrash)
{}

// This test runs after the crash test.
TEST(MockCrashTestSuiteTest, DISABLED_SkipAfterCrash)
{}
}  // namespace