From bb61b1900f148012cc3f24a85cf91f17a69ac7ff Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Tue, 23 Jul 2024 14:15:59 -0700 Subject: [PATCH] Add "test-type=lit-test" and "test-type=check-test" labels. --- build_tools/cmake/iree_check_test.cmake | 1 + build_tools/cmake/iree_lit_test.cmake | 5 +++-- build_tools/cmake/iree_run_module_test.cmake | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build_tools/cmake/iree_check_test.cmake b/build_tools/cmake/iree_check_test.cmake index fd89cafe77da..aa37760295aa 100644 --- a/build_tools/cmake/iree_check_test.cmake +++ b/build_tools/cmake/iree_check_test.cmake @@ -211,6 +211,7 @@ function(iree_check_test) "--module={{${_MODULE_FILE_NAME}}}" ${_RULE_RUNNER_ARGS} LABELS + "test-type=check-test" ${_RULE_LABELS} TIMEOUT ${_RULE_TIMEOUT} diff --git a/build_tools/cmake/iree_lit_test.cmake b/build_tools/cmake/iree_lit_test.cmake index f93d84d544f9..46f862202ab1 100644 --- a/build_tools/cmake/iree_lit_test.cmake +++ b/build_tools/cmake/iree_lit_test.cmake @@ -18,8 +18,8 @@ include(CMakeParseArguments) # TOOLS: Tools that should be included on the PATH # DATA: Additional data dependencies invoked by the test (e.g. binaries # called in the RUN line) -# LABELS: Additional labels to apply to the test. The package path is added -# automatically. +# LABELS: Additional labels to apply to the test. Package path and +# "test-type=lit-test" labels are added automatically. function(iree_lit_test) if(NOT IREE_BUILD_TESTS) return() @@ -75,6 +75,7 @@ function(iree_lit_test) ) list(APPEND _RULE_LABELS "${_PACKAGE_PATH}") + list(APPEND _RULE_LABELS "test-type=lit-test") set_property(TEST ${_NAME_PATH} PROPERTY LABELS "${_RULE_LABELS}") set_property(TEST ${_NAME_PATH} PROPERTY REQUIRED_FILES "${_TEST_FILE_PATH}") set_property(TEST ${_NAME_PATH} PROPERTY ENVIRONMENT diff --git a/build_tools/cmake/iree_run_module_test.cmake b/build_tools/cmake/iree_run_module_test.cmake index be1037d2d448..b16e2db1e080 100644 --- a/build_tools/cmake/iree_run_module_test.cmake +++ b/build_tools/cmake/iree_run_module_test.cmake @@ -27,8 +27,9 @@ endfunction() # EXPECTED_OUTPUT: A string representing the expected output from executing # the module in the format accepted by `iree-run-module` or a file # containing the same. Can also be an HTTPS URL to download large npy. -# LABELS: Additional labels to apply to the test. The package path and -# "driver=${DRIVER}" are added automatically. +# LABELS: Additional labels to apply to the test. The package path, +# "test-type=run-module-test", and "driver=${DRIVER}" labels are added +# automatically. # XFAIL_PLATFORMS: List of platforms (see iree_get_platform) for which the # test is expected to fail. The test pass/fail status is inverted. # UNSUPPORTED_PLATFORMS: List of platforms (see iree_get_platform) for which