File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ FetchContent_Declare(
9
9
GIT_REPOSITORY https://github.com/google/googletest.git
10
10
GIT_TAG release-1.12.1
11
11
)
12
+
13
+ set (UR_TEST_DEVICES_COUNT 1 CACHE STRING "Count of devices on which conformance and adapters tests will be run" )
14
+ set (UR_TEST_PLATFORMS_COUNT 1 CACHE STRING "Count of platforms on which conformance and adapters tests will be run" )
12
15
# For Windows: Prevent overriding the parent project's compiler/linker settings
13
16
set (gtest_force_shared_crt ON CACHE BOOL "" FORCE )
14
17
FetchContent_MakeAvailable (googletest )
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ function(add_adapter_test name)
31
31
${PROJECT_NAME} ::common
32
32
GTest::gtest )
33
33
34
- add_test (NAME ${target} COMMAND $< TARGET_FILE:${target} > )
34
+ add_test (NAME ${target} COMMAND $< TARGET_FILE:${target} >
35
+ --devices_count=${UR_TEST_DEVICES_COUNT}
36
+ --platforms_count=${UR_TEST_DEVICES_COUNT} )
35
37
set_tests_properties (${target} PROPERTIES
36
38
LABELS "adapter-specific;${name} "
37
39
ENVIRONMENT "${args_ENVIRONMENT} " )
Original file line number Diff line number Diff line change 4
4
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5
5
6
6
set (UR_CONFORMANCE_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
7
- option (UR_TEST_DEVICES_COUNT "Count of devices on which CTS will be run" 1 )
8
- option (UR_TEST_PLATFORMS_COUNT "Count of platforms on which CTS will be run" 1 )
9
7
10
8
function (add_test_adapter name adapter )
11
9
set (TEST_TARGET_NAME test -${name} )
Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ in a particular group for the corresponding adapter.
12
12
13
13
## How to set test device/platform name or limit the test devices/platforms count
14
14
15
- To limit how many devices/platforms you want to run the CTS on,
16
- use CMake option UR_TEST_DEVICES_COUNT or
15
+ To limit how many devices/platforms you want to run the conformance and
16
+ adapters tests on, use CMake option UR_TEST_DEVICES_COUNT or
17
17
UR_TEST_PLATFORMS_COUNT. If you want to run the tests on
18
18
all available devices/platforms, set 0. The default value is 1.
19
19
If you run binaries for the tests, you can use the parameter
20
20
` --platforms_count=COUNT ` or ` --devices_count=COUNT ` .
21
- To set test device/platform name you want to run the CTS on, use
21
+ To set test device/platform name you want to run the tests on, use
22
22
parameter ` --platform=NAME ` or ` --device=NAME ` .
You can’t perform that action at this time.
0 commit comments