Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
a959deb0
Unverified
Commit
a959deb0
authored
Oct 16, 2019
by
John Kessenich
Committed by
GitHub
Oct 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1933 from dj2/runtest
Make runtests configurable.
parents
9e4f6d03
3290d380
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
10 deletions
+38
-10
CMakeLists.txt
CMakeLists.txt
+24
-1
runtests
Test/runtests
+14
-9
No files found.
CMakeLists.txt
View file @
a959deb0
...
@@ -152,7 +152,7 @@ endfunction(glslang_set_link_args)
...
@@ -152,7 +152,7 @@ endfunction(glslang_set_link_args)
# otherwise, it will find the wrong version and fail later
# otherwise, it will find the wrong version and fail later
if
(
BUILD_EXTERNAL AND IS_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/External
)
if
(
BUILD_EXTERNAL AND IS_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/External
)
find_package
(
PythonInterp 3 REQUIRED
)
find_package
(
PythonInterp 3 REQUIRED
)
# We depend on these for later projects, so they should come first.
# We depend on these for later projects, so they should come first.
add_subdirectory
(
External
)
add_subdirectory
(
External
)
endif
()
endif
()
...
@@ -181,3 +181,26 @@ if(ENABLE_HLSL)
...
@@ -181,3 +181,26 @@ 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
()
if
(
CMAKE_CONFIGURATION_TYPES
)
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
(
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
)
Test/runtests
View file @
a959deb0
#!/usr/bin/env bash
#!/usr/bin/env bash
TARGETDIR
=
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
BASEDIR
=
baseResults
EXE
=
../build/install/bin/glslangValidator
EXE
=
${
2
:-
../build/install/bin/glslangValidator
}
REMAPEXE
=
../build/install/bin/spirv-remap
REMAPEXE
=
${
3
:-
../build/install/bin/spirv-remap
}
HASERROR
=
0
HASERROR
=
0
mkdir
-p
localResults
mkdir
-p
$TARGETDIR
if
[
-a
localtestlist
]
if
[
-a
localtestlist
]
then
then
...
@@ -55,13 +60,13 @@ diff -b $BASEDIR/hlsl.automap.frag.out $TARGETDIR/hlsl.automap.frag.out || HASER
...
@@ -55,13 +60,13 @@ diff -b $BASEDIR/hlsl.automap.frag.out $TARGETDIR/hlsl.automap.frag.out || HASER
# multi-threaded test
# multi-threaded test
#
#
echo
Comparing single thread to multithread
for
all tests
in
current directory...
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
>
$TARGETDIR
/
singleThread.out
$EXE
-i
-C
*
.vert
*
.geom
*
.frag
*
.tesc
*
.tese
*
.comp
-t
>
multiThread.out
$EXE
-i
-C
*
.vert
*
.geom
*
.frag
*
.tesc
*
.tese
*
.comp
-t
>
$TARGETDIR
/
multiThread.out
diff
singleThread.out
multiThread.out
||
HASERROR
=
1
diff
$TARGETDIR
/singleThread.out
$TARGETDIR
/
multiThread.out
||
HASERROR
=
1
if
[
$HASERROR
-eq
0
]
if
[
$HASERROR
-eq
0
]
then
then
rm
singleThread.out
rm
$TARGETDIR
/
singleThread.out
rm
multiThread.out
rm
$TARGETDIR
/
multiThread.out
fi
fi
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment