Use vkt::createTestGroup() in all level 1 test groups
authorPyry Haulos <phaulos@google.com>
Thu, 21 Jan 2016 20:38:14 +0000 (12:38 -0800)
committerPyry Haulos <phaulos@google.com>
Thu, 21 Jan 2016 20:59:56 +0000 (12:59 -0800)
Change-Id: I5258f962ba986c8ba789dbb134fbcc4c5866e0ef

25 files changed:
external/vulkancts/modules/vulkan/api/CMakeLists.txt
external/vulkancts/modules/vulkan/api/vktApiTests.cpp
external/vulkancts/modules/vulkan/binding_model/CMakeLists.txt
external/vulkancts/modules/vulkan/binding_model/vktBindingModelTests.cpp
external/vulkancts/modules/vulkan/compute/CMakeLists.txt
external/vulkancts/modules/vulkan/compute/vktComputeTests.cpp
external/vulkancts/modules/vulkan/draw/CMakeLists.txt
external/vulkancts/modules/vulkan/draw/vktDrawTests.cpp
external/vulkancts/modules/vulkan/dynamic_state/CMakeLists.txt
external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateTests.cpp
external/vulkancts/modules/vulkan/image/CMakeLists.txt
external/vulkancts/modules/vulkan/image/vktImageTests.cpp
external/vulkancts/modules/vulkan/memory/CMakeLists.txt
external/vulkancts/modules/vulkan/memory/vktMemoryTests.cpp
external/vulkancts/modules/vulkan/pipeline/CMakeLists.txt
external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.cpp
external/vulkancts/modules/vulkan/query_pool/CMakeLists.txt
external/vulkancts/modules/vulkan/query_pool/vktQueryPoolTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/CMakeLists.txt
external/vulkancts/modules/vulkan/shaderrender/CMakeLists.txt
external/vulkancts/modules/vulkan/spirv_assembly/CMakeLists.txt
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmTests.cpp
external/vulkancts/modules/vulkan/ssbo/CMakeLists.txt
external/vulkancts/modules/vulkan/ubo/CMakeLists.txt
external/vulkancts/modules/vulkan/vktTestPackage.cpp

index 75e441b..b189675 100644 (file)
@@ -30,6 +30,7 @@ set(DEQP_VK_API_SRCS
        )
 
 set(DEQP_VK_API_LIBS
+       deqp-vk-common
        tcutil
        vkutil
        )
index 85acfb3..a786bbe 100644 (file)
@@ -34,8 +34,7 @@
 
 #include "vktApiTests.hpp"
 
-#include "deUniquePtr.hpp"
-
+#include "vktTestGroupUtil.hpp"
 #include "vktApiSmokeTests.hpp"
 #include "vktApiDeviceInitializationTests.hpp"
 #include "vktApiObjectManagementTests.hpp"
@@ -54,32 +53,33 @@ namespace api
 namespace
 {
 
-tcu::TestCaseGroup* createBufferViewTests (tcu::TestContext& testCtx)
+void createBufferViewTests (tcu::TestCaseGroup* bufferViewTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> bufferViewTests (new tcu::TestCaseGroup(testCtx, "buffer_view", "BufferView tests"));
+       tcu::TestContext&       testCtx         = bufferViewTests->getTestContext();
 
        bufferViewTests->addChild(createBufferViewCreateTests   (testCtx));
        bufferViewTests->addChild(createBufferViewAccessTests   (testCtx));
-
-       return bufferViewTests.release();
 }
 
-} // anonymous
-
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+void createApiTests (tcu::TestCaseGroup* apiTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> apiTests        (new tcu::TestCaseGroup(testCtx, "api", "API Tests"));
+       tcu::TestContext&       testCtx         = apiTests->getTestContext();
 
        apiTests->addChild(createSmokeTests                                     (testCtx));
        apiTests->addChild(api::createFeatureInfoTests          (testCtx));
        apiTests->addChild(createDeviceInitializationTests      (testCtx));
        apiTests->addChild(createObjectManagementTests          (testCtx));
        apiTests->addChild(createBufferTests                            (testCtx));
-       apiTests->addChild(createBufferViewTests                        (testCtx));
+       apiTests->addChild(createTestGroup                                      (testCtx, "buffer_view", "BufferView tests", createBufferViewTests));
        apiTests->addChild(createCommandBuffersTests            (testCtx));
        apiTests->addChild(createCopiesAndBlittingTests         (testCtx));
+}
+
+} // anonymous
 
-       return apiTests.release();
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "api", "API Tests", createApiTests);
 }
 
 } // api
index fe3e727..348b363 100644 (file)
@@ -10,6 +10,7 @@ set(DEQP_VK_BINDING_MODEL_SRCS
        )
 
 set(DEQP_VK_BINDING_MODEL_LIBS
+       deqp-vk-common
        tcutil
        vkutil
        )
index fbc6049..571a636 100644 (file)
 #include "vktBindingModelTests.hpp"
 
 #include "vktBindingShaderAccessTests.hpp"
-
-#include "deUniquePtr.hpp"
+#include "vktTestGroupUtil.hpp"
 
 namespace vkt
 {
 namespace BindingModel
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* group)
 {
-       de::MovePtr<tcu::TestCaseGroup> group(new tcu::TestCaseGroup(testCtx, "binding_model", "Resource binding tests"));
+       tcu::TestContext&       testCtx         = group->getTestContext();
 
        group->addChild(createShaderAccessTests(testCtx));
 
        // \todo [2015-07-30 jarkko] .change_binding.{between_renderpasses, within_pass}
        // \todo [2015-07-30 jarkko] .descriptor_set_chain
        // \todo [2015-07-30 jarkko] .update_descriptor_set
+}
+
+} // anonymous
 
-       return group.release();
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "binding_model", "Resource binding tests", createChildren);
 }
 
 } // BindingModel
index 9f0b84e..6460db3 100644 (file)
@@ -14,6 +14,7 @@ set(DEQP_VK_COMPUTE_SRCS
        )
 
 set(DEQP_VK_COMPUTE_LIBS
+       deqp-vk-common
        tcutil
        vkutil
        )
index de2959f..5e10f89 100644 (file)
 #include "vktComputeBasicComputeShaderTests.hpp"
 #include "vktComputeIndirectComputeDispatchTests.hpp"
 #include "vktComputeShaderBuiltinVarTests.hpp"
-#include "deUniquePtr.hpp"
+#include "vktTestGroupUtil.hpp"
 
 namespace vkt
 {
 namespace compute
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* computeTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> computeTests (new tcu::TestCaseGroup(testCtx, "compute", "Compute shader tests"));
+       tcu::TestContext&       testCtx         = computeTests->getTestContext();
 
        computeTests->addChild(createBasicComputeShaderTests(testCtx));
        computeTests->addChild(createIndirectComputeDispatchTests(testCtx));
        computeTests->addChild(createComputeShaderBuiltinVarTests(testCtx));
+}
 
-       return computeTests.release();
+} // anonymous
+
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "compute", "Compute shader tests", createChildren);
 }
 
 } // compute
index 5d7901b..57a223e 100644 (file)
@@ -21,6 +21,7 @@ set(DEQP_VK_DRAW_SRCS
 )
 
 set(DEQP_VK_DRAW_LIBS
+       deqp-vk-common
        tcutil
        vkutil
 )
index a6a9f62..5dbfa9a 100644 (file)
 #include "vktDrawSimpleTest.hpp"
 #include "vktDrawIndexedTest.hpp"
 #include "vktDrawIndirectTest.hpp"
-
-#include "deUniquePtr.hpp"
+#include "vktTestGroupUtil.hpp"
 
 namespace vkt
 {
 namespace Draw
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* group)
 {
-       de::MovePtr<tcu::TestCaseGroup> group(new tcu::TestCaseGroup(testCtx, "draw", "Spimple Draw tests"));
+       tcu::TestContext&       testCtx         = group->getTestContext();
 
        group->addChild(new SimpleDrawTests(testCtx));
        group->addChild(new DrawIndexedTests(testCtx));
        group->addChild(new IndirectDrawTests(testCtx));
+}
+
+} // anonymous
 
-       return group.release();
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "draw", "Spimple Draw tests", createChildren);
 }
 
 } // Draw
index 6870be1..b4493d1 100644 (file)
@@ -25,6 +25,7 @@ set(DEQP_VK_DYNAMIC_STATE_SRCS
 )
 
 set(DEQP_VK_DYNAMIC_STATE_LIBS
+       deqp-vk-common
        tcutil
        vkutil
 )
index 23f5bdf..0b1556f 100644 (file)
 #include "vktDynamicStateCBTests.hpp"
 #include "vktDynamicStateDSTests.hpp"
 #include "vktDynamicStateGeneralTests.hpp"
-
-#include "deUniquePtr.hpp"
+#include "vktTestGroupUtil.hpp"
 
 namespace vkt
 {
 namespace DynamicState
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* group)
 {
-       de::MovePtr<tcu::TestCaseGroup> group(new tcu::TestCaseGroup(testCtx, "dynamic_state", "Dynamic State Tests"));
+       tcu::TestContext&       testCtx         = group->getTestContext();
 
        group->addChild(new DynamicStateVPTests(testCtx));
        group->addChild(new DynamicStateRSTests(testCtx));
        group->addChild(new DynamicStateCBTests(testCtx));
        group->addChild(new DynamicStateDSTests(testCtx));
        group->addChild(new DynamicStateGeneralTests(testCtx));
+}
+
+} // anonymous
 
-       return group.release();
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "dynamic_state", "Dynamic State Tests", createChildren);
 }
 
 } // DynamicState
index 90d2d91..475182a 100644 (file)
@@ -16,6 +16,7 @@ set(DEQP_VK_IMAGE_SRCS
        )
 
 set(DEQP_VK_IMAGE_LIBS
+       deqp-vk-common
        tcutil
        vkutil
        )
index 2adb0d1..1c364de 100644 (file)
 #include "vktImageLoadStoreTests.hpp"
 #include "vktImageQualifiersTests.hpp"
 #include "vktImageSizeTests.hpp"
-#include "deUniquePtr.hpp"
+#include "vktTestGroupUtil.hpp"
 
 namespace vkt
 {
 namespace image
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* imageTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> imageTests (new tcu::TestCaseGroup(testCtx, "image", "Image tests"));
+       tcu::TestContext&       testCtx         = imageTests->getTestContext();
 
        imageTests->addChild(createImageStoreTests(testCtx));
        imageTests->addChild(createImageLoadStoreTests(testCtx));
        imageTests->addChild(createImageFormatReinterpretTests(testCtx));
        imageTests->addChild(createImageQualifiersTests(testCtx));
        imageTests->addChild(createImageSizeTests(testCtx));
+}
 
-       return imageTests.release();
+} // anonymous
+
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "image", "Image tests", createChildren);
 }
 
 } // image
index 9b5bb75..941fbfc 100644 (file)
@@ -14,6 +14,7 @@ set(DEQP_VK_MEMORY_SRCS
        )
 
 set(DEQP_VK_MEMORY_LIBS
+       deqp-vk-common
        tcutil
        vkutil
        )
index ad42913..af5d2bc 100644 (file)
 #include "vktMemoryAllocationTests.hpp"
 #include "vktMemoryMappingTests.hpp"
 #include "vktMemoryPipelineBarrierTests.hpp"
-
-#include "deUniquePtr.hpp"
+#include "vktTestGroupUtil.hpp"
 
 namespace vkt
 {
 namespace memory
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* memoryTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> memoryTests (new tcu::TestCaseGroup(testCtx, "memory", "Memory Tests"));
+       tcu::TestContext&       testCtx         = memoryTests->getTestContext();
 
        memoryTests->addChild(createAllocationTests                     (testCtx));
        memoryTests->addChild(createMappingTests                        (testCtx));
        memoryTests->addChild(createPipelineBarrierTests        (testCtx));
+}
+
+} // anonymous
 
-       return memoryTests.release();
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "memory", "Memory Tests", createChildren);
 }
 
 } // memory
index afb8f68..fc3c099 100644 (file)
@@ -43,6 +43,7 @@ set(DEQP_VK_PIPELINE_SRCS
        )
 
 set(DEQP_VK_PIPELINE_LIBS
+       deqp-vk-common
        tcutil
        vkutil
        referencerenderer
index b85408a..abd4978 100644 (file)
 #include "vktPipelineMultisampleTests.hpp"
 #include "vktPipelineVertexInputTests.hpp"
 #include "vktPipelineTimestampTests.hpp"
-#include "deUniquePtr.hpp"
+#include "vktTestGroupUtil.hpp"
 
 namespace vkt
 {
 namespace pipeline
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* pipelineTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> pipelineTests (new tcu::TestCaseGroup(testCtx, "pipeline", "Pipeline Tests"));
+       tcu::TestContext&       testCtx = pipelineTests->getTestContext();
 
        pipelineTests->addChild(createStencilTests              (testCtx));
        pipelineTests->addChild(createBlendTests                (testCtx));
@@ -67,8 +70,13 @@ tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
        pipelineTests->addChild(createVertexInputTests  (testCtx));
        pipelineTests->addChild(createInputAssemblyTests(testCtx));
        pipelineTests->addChild(createTimestampTests    (testCtx));
+}
 
-       return pipelineTests.release();
+} // anonymous
+
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "pipeline", "Pipeline Tests", createChildren);
 }
 
 } // pipeline
index bbdaeb6..e9a68a1 100644 (file)
@@ -14,6 +14,7 @@ set(DEQP_VK_QUERY_POOL_SRCS
 )
 
 set(DEQP_VK_QUERY_POOL_LIBS
+       deqp-vk-common
        tcutil
        vkutil
 )
index 5e490cb..b480b08 100644 (file)
  *//*!
  * \file
  * \brief Vulkan Query Pool Tests
- *//*--------------------------------------------------------------------*/\r
-\r
-#include "vktQueryPoolTests.hpp"
+ *//*--------------------------------------------------------------------*/
 
-#include "deUniquePtr.hpp"
+#include "vktQueryPoolTests.hpp"
 
+#include "vktTestGroupUtil.hpp"
 #include "vktQueryPoolOcclusionTests.hpp"
 
 namespace vkt
@@ -44,13 +43,21 @@ namespace vkt
 namespace QueryPool
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* queryPoolTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> queryPoolTests (new tcu::TestCaseGroup(testCtx, "query_pool", "query pool tests"));
+       tcu::TestContext&       testCtx         = queryPoolTests->getTestContext();
 
        queryPoolTests->addChild(new QueryPoolOcclusionTests(testCtx));
+}
+
+} // anonymous
 
-       return queryPoolTests.release();
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "query_pool", "query pool tests", createChildren);
 }
 
 } // QueryPool
index 76d5709..6f79231 100644 (file)
@@ -18,6 +18,7 @@ set(DEQP_VK_SHADEREXECUTOR_SRCS
 )
 
 set(DEQP_VK_SHADEREXECUTOR_LIBS
+   deqp-vk-common
    tcutil
    vkutil
 )
index cbf2cb9..2a697a1 100644 (file)
@@ -24,6 +24,7 @@ set(DEQP_VK_SHADERRENDER_SRCS
        )
 
 set(DEQP_VK_SHADERRENDER_LIBS
+       deqp-vk-common
        tcutil
        vkutil
        )
index 1dbd6d6..22eff93 100644 (file)
@@ -14,6 +14,7 @@ set(DEQP_VK_SPIRV_ASSEMBLY_SRCS
        )
 
 set(DEQP_VK_SPIRV_ASSEMBLY_LIBS
+       deqp-vk-common
        tcutil
        vkutil
        )
index 52c78d6..8870d49 100644 (file)
 
 #include "vktSpvAsmTests.hpp"
 
-#include "deUniquePtr.hpp"
-
 #include "vktSpvAsmInstructionTests.hpp"
+#include "vktTestGroupUtil.hpp"
 
 namespace vkt
 {
 namespace SpirVAssembly
 {
 
-tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+namespace
+{
+
+void createChildren (tcu::TestCaseGroup* spirVAssemblyTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> spirVAssemblyTests (new tcu::TestCaseGroup(testCtx, "spirv_assembly", "SPIR-V Assembly tests"));
+       tcu::TestContext&       testCtx         = spirVAssemblyTests->getTestContext();
 
        spirVAssemblyTests->addChild(createInstructionTests(testCtx));
        // \todo [2015-09-28 antiagainst] control flow
        // \todo [2015-09-28 antiagainst] multiple entry points for the same shader stage
        // \todo [2015-09-28 antiagainst] multiple shaders in the same module
+}
+
+} // anonymous
 
-       return spirVAssemblyTests.release();
+tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
+{
+       return createTestGroup(testCtx, "spirv_assembly", "SPIR-V Assembly tests", createChildren);
 }
 
 } // SpirVAssembly
index 2c8e966..357590f 100644 (file)
@@ -10,6 +10,7 @@ set(DEQP_VK_SSBO_SRCS
 )
 
 set(DEQP_VK_SSBO_LIBS
+       deqp-vk-common
        tcutil
        vkutil
 )
index 38322db..7976f6d 100644 (file)
@@ -12,6 +12,7 @@ set(DEQP_VK_UBO_SRCS
 )
 
 set(DEQP_VK_UBO_LIBS
+       deqp-vk-common
        tcutil
        vkutil
 )
index 3c0b4ca..3a8c692 100644 (file)
@@ -46,6 +46,7 @@
 
 #include "deUniquePtr.hpp"
 
+#include "vktTestGroupUtil.hpp"
 #include "vktApiTests.hpp"
 #include "vktPipelineTests.hpp"
 #include "vktBindingModelTests.hpp"
@@ -248,9 +249,9 @@ tcu::TestNode::IterateResult TestCaseExecutor::iterate (tcu::TestCase*)
 
 // GLSL shader tests
 
-tcu::TestCaseGroup* createGlslTests (tcu::TestContext& testCtx)
+void createGlslTests (tcu::TestCaseGroup* glslTests)
 {
-       de::MovePtr<tcu::TestCaseGroup> glslTests       (new tcu::TestCaseGroup(testCtx, "glsl", "GLSL shader execution tests"));
+       tcu::TestContext&       testCtx         = glslTests->getTestContext();
 
        // ShaderLibrary-based tests
        static const struct
@@ -289,8 +290,6 @@ tcu::TestCaseGroup* createGlslTests (tcu::TestContext& testCtx)
        // ShaderExecutor-based tests
        glslTests->addChild(shaderexecutor::createBuiltinTests                          (testCtx));
        glslTests->addChild(shaderexecutor::createOpaqueTypeIndexingTests       (testCtx));
-
-       return glslTests.release();
 }
 
 // TestPackage
@@ -315,7 +314,7 @@ void TestPackage::init (void)
        addChild(pipeline::createTests          (m_testCtx));
        addChild(BindingModel::createTests      (m_testCtx));
        addChild(SpirVAssembly::createTests     (m_testCtx));
-       addChild(createGlslTests                        (m_testCtx));
+       addChild(createTestGroup                        (m_testCtx, "glsl", "GLSL shader execution tests", createGlslTests));
        addChild(createRenderPassTests          (m_testCtx));
        addChild(memory::createTests            (m_testCtx));
        addChild(ubo::createTests                       (m_testCtx));