From 219f0cc13c44e175cdda86a7aa65de59a933dd69 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 7 Sep 2016 17:43:15 -0400 Subject: [PATCH] Create separate binaries for validation tests. --- test/CMakeLists.txt | 9 +---- test/val/CMakeLists.txt | 64 ++++++++++++++++++++++++++++++++++ test/{ => val}/Validate.CFG.cpp | 0 test/{ => val}/Validate.Capability.cpp | 0 test/{ => val}/Validate.Layout.cpp | 0 test/{ => val}/Validate.SSA.cpp | 0 test/{ => val}/Validate.Storage.cpp | 0 test/{ => val}/ValidateFixtures.cpp | 0 test/{ => val}/ValidateFixtures.h | 0 test/{ => val}/ValidateID.cpp | 0 test/{ => val}/ValidationState.cpp | 0 11 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 test/val/CMakeLists.txt rename test/{ => val}/Validate.CFG.cpp (100%) rename test/{ => val}/Validate.Capability.cpp (100%) rename test/{ => val}/Validate.Layout.cpp (100%) rename test/{ => val}/Validate.SSA.cpp (100%) rename test/{ => val}/Validate.Storage.cpp (100%) rename test/{ => val}/ValidateFixtures.cpp (100%) rename test/{ => val}/ValidateFixtures.h (100%) rename test/{ => val}/ValidateID.cpp (100%) rename test/{ => val}/ValidationState.cpp (100%) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b4d8811..5321574 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -120,14 +120,6 @@ set(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/TextToBinary.SubgroupDispatch.cpp ${CMAKE_CURRENT_SOURCE_DIR}/TextWordGet.cpp ${CMAKE_CURRENT_SOURCE_DIR}/UnitSPIRV.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ValidateFixtures.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Capability.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Validate.CFG.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Layout.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Storage.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Validate.SSA.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ValidateID.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ValidationState.cpp ) add_spvtools_unittest( TARGET spirv_unit_tests @@ -140,3 +132,4 @@ add_spvtools_unittest( LIBS SPIRV-Tools-opt ${SPIRV_TOOLS}) add_subdirectory(opt) +add_subdirectory(val) diff --git a/test/val/CMakeLists.txt b/test/val/CMakeLists.txt new file mode 100644 index 0000000..6518fca --- /dev/null +++ b/test/val/CMakeLists.txt @@ -0,0 +1,64 @@ +# Copyright (c) 2016 The Khronos Group Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(VAL_TEST_COMMON_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/../TestFixture.h + ${CMAKE_CURRENT_SOURCE_DIR}/../UnitSPIRV.h + ${CMAKE_CURRENT_SOURCE_DIR}/../UnitSPIRV.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ValidateFixtures.h + ${CMAKE_CURRENT_SOURCE_DIR}/ValidateFixtures.cpp +) + + +add_spvtools_unittest(TARGET val_capability + SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Capability.cpp + ${VAL_TEST_COMMON_SRCS} + LIBS ${SPIRV_TOOLS} +) + +add_spvtools_unittest(TARGET val_cfg + SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.CFG.cpp + ${VAL_TEST_COMMON_SRCS} + LIBS ${SPIRV_TOOLS} +) + +add_spvtools_unittest(TARGET val_id + SRCS ${CMAKE_CURRENT_SOURCE_DIR}/ValidateID.cpp + ${VAL_TEST_COMMON_SRCS} + LIBS ${SPIRV_TOOLS} +) + +add_spvtools_unittest(TARGET val_layout + SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Layout.cpp + ${VAL_TEST_COMMON_SRCS} + LIBS ${SPIRV_TOOLS} +) + +add_spvtools_unittest(TARGET val_ssa + SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.SSA.cpp + ${VAL_TEST_COMMON_SRCS} + LIBS ${SPIRV_TOOLS} +) + +add_spvtools_unittest(TARGET val_storage + SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Storage.cpp + ${VAL_TEST_COMMON_SRCS} + LIBS ${SPIRV_TOOLS} +) + +add_spvtools_unittest(TARGET val_state + SRCS ${CMAKE_CURRENT_SOURCE_DIR}/ValidationState.cpp + ${VAL_TEST_COMMON_SRCS} + LIBS ${SPIRV_TOOLS} +) diff --git a/test/Validate.CFG.cpp b/test/val/Validate.CFG.cpp similarity index 100% rename from test/Validate.CFG.cpp rename to test/val/Validate.CFG.cpp diff --git a/test/Validate.Capability.cpp b/test/val/Validate.Capability.cpp similarity index 100% rename from test/Validate.Capability.cpp rename to test/val/Validate.Capability.cpp diff --git a/test/Validate.Layout.cpp b/test/val/Validate.Layout.cpp similarity index 100% rename from test/Validate.Layout.cpp rename to test/val/Validate.Layout.cpp diff --git a/test/Validate.SSA.cpp b/test/val/Validate.SSA.cpp similarity index 100% rename from test/Validate.SSA.cpp rename to test/val/Validate.SSA.cpp diff --git a/test/Validate.Storage.cpp b/test/val/Validate.Storage.cpp similarity index 100% rename from test/Validate.Storage.cpp rename to test/val/Validate.Storage.cpp diff --git a/test/ValidateFixtures.cpp b/test/val/ValidateFixtures.cpp similarity index 100% rename from test/ValidateFixtures.cpp rename to test/val/ValidateFixtures.cpp diff --git a/test/ValidateFixtures.h b/test/val/ValidateFixtures.h similarity index 100% rename from test/ValidateFixtures.h rename to test/val/ValidateFixtures.h diff --git a/test/ValidateID.cpp b/test/val/ValidateID.cpp similarity index 100% rename from test/ValidateID.cpp rename to test/val/ValidateID.cpp diff --git a/test/ValidationState.cpp b/test/val/ValidationState.cpp similarity index 100% rename from test/ValidationState.cpp rename to test/val/ValidationState.cpp -- 2.7.4