Edit

kc3-lang/angle/src/tests/angle_unittest_main.cpp

Branch :

  • Show log

    Commit

  • Author : Jamie Madill
    Date : 2019-12-16 15:50:12
    Hash : 5407aaa0
    Message : Re-land "Add new test runner harness." (#2) Re-land #2 changes: * export labels are fixed for the CFI build * crash test disabled because of flakiness and issues with asan Re-land changes: * Unit test is suppressed in ASAN * --deqp-case is fixed * Debug layer errors should correctly work with failure expectations Original message: The ANGLE test harness is a harness around GoogleTest that provides functionality similar to the Chromium test harness. It supports: * splitting a test set into shards * catching and reporting crashes and timeouts * outputting to the Chromium JSON test results format * multi-process execution Unit tests are added in test_utils_unittest.cpp. Bug: angleproject:3162 Bug: chromium:1030192 Change-Id: I71d66a407ea0e53d73cbe75b5b4bfb9e73791534 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965091 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>

  • src/tests/angle_unittest_main.cpp
  • //
    // Copyright 2013 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.
    //
    
    #include "GLSLANG/ShaderLang.h"
    #include "gtest/gtest.h"
    #include "test_utils/runner/TestSuite.h"
    
    class CompilerTestEnvironment : public testing::Environment
    {
      public:
        void SetUp() override
        {
            if (!sh::Initialize())
            {
                FAIL() << "Failed to initialize the compiler.";
            }
        }
    
        void TearDown() override
        {
            if (!sh::Finalize())
            {
                FAIL() << "Failed to finalize the compiler.";
            }
        }
    };
    
    int main(int argc, char **argv)
    {
        angle::TestSuite testSuite(&argc, argv);
        testing::AddGlobalTestEnvironment(new CompilerTestEnvironment());
        return testSuite.run();
    }