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)
+
+ if (CMAKE_CONFIGURATION_TYPES)
+ set_property(TEST glslang-testsuite APPEND PROPERTY
+ ENVIRONMENT GLSLANG_TEST_RESULTS=${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
+ else(CMAKE_CONFIGURATION_TYPES)
+ set_property(TEST glslang-testsuite APPEND PROPERTY
+ ENVIRONMENT GLSLANG_TEST_RESULTS=${CMAKE_CURRENT_BINARY_DIR}/localResults)
+ endif(CMAKE_CONFIGURATION_TYPES)
endif(BUILD_TESTING)
#!/usr/bin/env bash
-TARGETDIR=localResults
+TARGETDIR=${GLSLANG_TEST_RESULTS:-localResults}
BASEDIR=baseResults
EXE=${GLSLANG_PATH:-../build/install/bin/glslangValidator}
REMAPEXE=${SPIRV_REMAP_PATH:-../build/install/bin/spirv-remap}
HASERROR=0
-mkdir -p localResults
+mkdir -p $TARGETDIR
if [ -a localtestlist ]
then
# multi-threaded test
#
echo Comparing single thread to multithread for all tests in current directory...
-$EXE -i -C *.vert *.geom *.frag *.tesc *.tese *.comp > singleThread.out
-$EXE -i -C *.vert *.geom *.frag *.tesc *.tese *.comp -t > multiThread.out
-diff singleThread.out multiThread.out || HASERROR=1
+$EXE -i -C *.vert *.geom *.frag *.tesc *.tese *.comp > $TARGETDIR/singleThread.out
+$EXE -i -C *.vert *.geom *.frag *.tesc *.tese *.comp -t > $TARGETDIR/multiThread.out
+diff $TARGETDIR/singleThread.out $TARGETDIR/multiThread.out || HASERROR=1
if [ $HASERROR -eq 0 ]
then
- rm singleThread.out
- rm multiThread.out
+ rm $TARGETDIR/singleThread.out
+ rm $TARGETDIR/multiThread.out
fi
#