1 /*-------------------------------------------------------------------------
2 * OpenGL Conformance Test Suite
3 * -----------------------------
5 * Copyright (c) 2016 Google Inc.
6 * Copyright (c) 2016 The Khronos Group Inc.
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 * \brief OpenGL Conformance Test Package Base Class
23 */ /*-------------------------------------------------------------------*/
25 #include "glcTestPackage.hpp"
30 PackageContext::PackageContext(tcu::TestContext& testCtx, glu::ContextType renderContextType)
31 : m_context(testCtx, renderContextType), m_caseWrapper(m_context)
35 PackageContext::~PackageContext(void)
39 TestPackage::TestPackage(tcu::TestContext& testCtx, const char* name, const char* description,
40 glu::ContextType renderContextType, const char* resourcesPath)
41 : tcu::TestPackage(testCtx, name, description)
42 , m_renderContextType(renderContextType)
43 , m_packageCtx(DE_NULL)
44 , m_archive(testCtx.getRootArchive(), resourcesPath)
48 TestPackage::~TestPackage(void)
50 // Destroy all children before destroying context since destructors may access context.
51 tcu::TestNode::deinit();
55 void TestPackage::init(void)
60 m_packageCtx = new PackageContext(m_testCtx, m_renderContextType);
65 m_packageCtx = DE_NULL;
71 void TestPackage::deinit(void)
73 tcu::TestNode::deinit();
75 m_packageCtx = DE_NULL;