mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 20:10:06 +00:00
Use commandline options instead of ENV variables
This commit is contained in:
parent
7d623e1c90
commit
3290d38011
@ -189,24 +189,17 @@ if(BUILD_TESTING)
|
||||
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/)
|
||||
|
||||
|
||||
if (CMAKE_CONFIGURATION_TYPES)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT GLSLANG_PATH=${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT SPIRV_REMAP_PATH=${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT GLSLANG_TEST_RESULTS=${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
|
||||
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
|
||||
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
|
||||
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
|
||||
else(CMAKE_CONFIGURATION_TYPES)
|
||||
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)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT GLSLANG_TEST_RESULTS=${CMAKE_CURRENT_BINARY_DIR}/localResults)
|
||||
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults)
|
||||
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
|
||||
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
|
||||
endif(CMAKE_CONFIGURATION_TYPES)
|
||||
|
||||
add_test(NAME glslang-testsuite
|
||||
COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Test/)
|
||||
endif(BUILD_TESTING)
|
||||
|
@ -1,9 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TARGETDIR=${GLSLANG_TEST_RESULTS:-localResults}
|
||||
# Arguments:
|
||||
# 1- TargetDirectory, where to write test results and intermediary files
|
||||
# 2- Path to glslangValidator
|
||||
# 3- Path to spirv-remap
|
||||
|
||||
TARGETDIR=${1:-localResults}
|
||||
BASEDIR=baseResults
|
||||
EXE=${GLSLANG_PATH:-../build/install/bin/glslangValidator}
|
||||
REMAPEXE=${SPIRV_REMAP_PATH:-../build/install/bin/spirv-remap}
|
||||
EXE=${2:-../build/install/bin/glslangValidator}
|
||||
REMAPEXE=${3:-../build/install/bin/spirv-remap}
|
||||
HASERROR=0
|
||||
mkdir -p $TARGETDIR
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user