1/*------------------------------------------------------------------------- 2 * drawElements Quality Program OpenGL ES 3.0 Module 3 * ------------------------------------------------- 4 * 5 * Copyright 2014 The Android Open Source Project 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 *//*! 20 * \file 21 * \brief OpenGL ES 3.0 Test Package 22 *//*--------------------------------------------------------------------*/ 23 24#include "tes3TestPackage.hpp" 25#include "tes3InfoTests.hpp" 26#include "es3fFunctionalTests.hpp" 27#include "es3aAccuracyTests.hpp" 28#include "es3sStressTests.hpp" 29#include "es3pPerformanceTests.hpp" 30 31namespace deqp 32{ 33namespace gles3 34{ 35 36PackageContext::PackageContext (tcu::TestContext& testCtx) 37 : m_context (DE_NULL) 38 , m_caseWrapper (DE_NULL) 39{ 40 try 41 { 42 m_context = new Context(testCtx); 43 m_caseWrapper = new TestCaseWrapper(testCtx, m_context->getRenderContext()); 44 } 45 catch (...) 46 { 47 delete m_caseWrapper; 48 delete m_context; 49 50 throw; 51 } 52} 53 54PackageContext::~PackageContext (void) 55{ 56 delete m_caseWrapper; 57 delete m_context; 58} 59 60TestPackage::TestPackage (tcu::TestContext& testCtx) 61 : tcu::TestPackage (testCtx, "dEQP-GLES3", "dEQP OpenGL ES 3.0 Tests") 62 , m_packageCtx (DE_NULL) 63 , m_archive (testCtx.getRootArchive(), "gles3/") 64{ 65} 66 67TestPackage::~TestPackage (void) 68{ 69 // Destroy children first since destructors may access context. 70 TestNode::deinit(); 71 delete m_packageCtx; 72} 73 74void TestPackage::init (void) 75{ 76 try 77 { 78 // Create context 79 m_packageCtx = new PackageContext(m_testCtx); 80 81 // Add main test groups 82 addChild(new InfoTests (m_packageCtx->getContext())); 83 addChild(new Functional::FunctionalTests (m_packageCtx->getContext())); 84 addChild(new Accuracy::AccuracyTests (m_packageCtx->getContext())); 85 addChild(new Performance::PerformanceTests (m_packageCtx->getContext())); 86 addChild(new Stress::StressTests (m_packageCtx->getContext())); 87 } 88 catch (...) 89 { 90 delete m_packageCtx; 91 m_packageCtx = DE_NULL; 92 93 throw; 94 } 95} 96 97void TestPackage::deinit (void) 98{ 99 TestNode::deinit(); 100 delete m_packageCtx; 101 m_packageCtx = DE_NULL; 102} 103 104} // gles3 105} // deqp 106