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.
This commit is contained in:
parent
b03e4fc4e0
commit
167201430d
@ -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 @@
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user