@@ -41,6 +41,18 @@ function echo_and_run_timed {
4141 time ${@: 2}
4242}
4343
44+ # join_delimit <delimiter> [value [value [...]]]
45+ # Combine all values into a single string, separating each by a single character
46+ # delimiter. Eg:
47+ # foo=(bar baz kramble)
48+ # joined_foo=$(join_delimit "|" "${foo[@]}")
49+ # echo joined_foo # "bar|baz|kramble"
50+ function join_delimit {
51+ local IFS=" ${1} "
52+ shift
53+ echo " ${* } "
54+ }
55+
4456# ###############################################################################
4557# VARIABLES - Set up bash and environmental variables.
4658# ###############################################################################
178190
179191append CTEST_FLAGS " --output-on-failure"
180192
193+ CTEST_EXCLUSION_REGEXES=()
194+
181195if [[ " ${BUILD_TYPE} " == " cpu" ]]; then
182- append CTEST_FLAGS " -E ^cub|^thrust.*cuda"
196+ CTEST_EXCLUSION_REGEXES+=(" ^cub" " ^thrust.*cuda" )
197+ fi
198+
199+ if [[ " ${CXX_TYPE} " == " icc" ]]; then
200+ # The free version of icpc used in gpuCI seems to have a compiler bug that
201+ # causes a scan test to produce incorrect output.
202+ CTEST_EXCLUSION_REGEXES+=(" thrust\\ .cpp\\ .tbb\\ .cpp..\\ .test\\ .scan$" )
203+ fi
204+
205+ if [[ -n " ${CTEST_EXCLUSION_REGEXES[@]} " ]]; then
206+ CTEST_EXCLUSION_REGEX=$( join_delimit " |" " ${CTEST_EXCLUSION_REGEXES[@]} " )
207+ append CTEST_FLAGS " -E ${CTEST_EXCLUSION_REGEX} "
183208fi
184209
185210if [[ -n " ${@ } " ]]; then
186- for arg in " ${@ } "
187- do
188- append CTEST_FLAGS " -R ^${arg} $"
189- done
211+ CTEST_INCLUSION_REGEX=$( join_delimit " |" " ${@ } " )
212+ append CTEST_FLAGS " -R ${CTEST_INCLUSION_REGEX[@]} "
190213fi
191214
192215# Export variables so they'll show up in the logs when we report the environment.
0 commit comments