Skip to content

Commit 98af36b

Browse files
committed
[CTS] Ensure GoogleTest does not output color
The match files depend on the output from our GoogleTest test suites to not include ANSI color escape sequences but this setting can be controlled via environment variable `GTEST_COLOR=yes`. This can cause tests to fail even though they should not. This patch explicitly disabled color output by setting `GTEST_COLOR=no` in the test environment.
1 parent 3eda0d5 commit 98af36b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/conformance/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ function(add_test_adapter name adapter)
2020
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
2121
)
2222

23+
set(testEnv
24+
UR_ADAPTERS_FORCE_LOAD="$<TARGET_FILE:ur_${adapter}>"
25+
GTEST_COLOR=no
26+
)
2327
set_tests_properties(${TEST_NAME} PROPERTIES
24-
ENVIRONMENT "UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_${adapter}>\""
28+
ENVIRONMENT "${testEnv}"
2529
LABELS "conformance;${adapter}")
2630
endfunction()
2731

0 commit comments

Comments
 (0)