Commit 16720143 by Dan Sinclair

Make runtests configurable.

This CL allows setting the location of glslangValidator and spirv-remap when calling the runtests script. A test target is added to CMake to execute runtests and sets the location to the build folder for the two applications.
parent b03e4fc4
...@@ -180,3 +180,21 @@ if(ENABLE_HLSL) ...@@ -180,3 +180,21 @@ if(ENABLE_HLSL)
add_subdirectory(hlsl) add_subdirectory(hlsl)
endif(ENABLE_HLSL) endif(ENABLE_HLSL)
add_subdirectory(gtests) add_subdirectory(gtests)
if(BUILD_TESTING)
# glslang-testsuite runs a bash script on Windows.
# Make sure to use '-o igncr' flag to ignore carriage returns (\r).
set(IGNORE_CR_FLAG "")
if(WIN32)
set(IGNORE_CR_FLAG -o igncr)
endif()
add_test(NAME glslang-testsuite
COMMAND bash ${IGNORE_CR_FLAG} runtests
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Test/)
set_property(TEST glslang-testsuite APPEND PROPERTY
ENVIRONMENT GLSLANG_PATH=${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
set_property(TEST glslang-testsuite APPEND PROPERTY
ENVIRONMENT SPIRV_REMAP_PATH=${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
endif(BUILD_TESTING)
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
TARGETDIR=localResults TARGETDIR=localResults
BASEDIR=baseResults BASEDIR=baseResults
EXE=../build/install/bin/glslangValidator EXE=${GLSLANG_PATH:-../build/install/bin/glslangValidator}
REMAPEXE=../build/install/bin/spirv-remap REMAPEXE=${SPIRV_REMAP_PATH:-../build/install/bin/spirv-remap}
HASERROR=0 HASERROR=0
mkdir -p localResults mkdir -p localResults
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment