mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 06:49:15 +00:00
Implementing Test Filters for Smoke and Regression Tests (#1819)
* smoke and regression targets working with tests * test filters work for both examples and test * removed uneccesary comments * added a missing comment * added a missing comment * fixed typo in the comments * updated README * Update PULL_REQUEST_TEMPLATE.md updating the template for future addition of test cases * Update PULL_REQUEST_TEMPLATE.md
This commit is contained in:
@@ -5,6 +5,14 @@ include_directories(BEFORE
|
||||
|
||||
add_custom_target(examples)
|
||||
|
||||
|
||||
# list of examples that are labelled as REGRESSION_EXAMPLE for make regression (runtime more than 30 seconds)
|
||||
# all other tests are labelled as SMOKE_EXAMPLE
|
||||
set(REGRESSION_EXAMPLES
|
||||
example_sparse_embedding3_forward_layernorm
|
||||
)
|
||||
|
||||
|
||||
function(add_example_dependencies EXAMPLE_NAME FILE_NAME)
|
||||
if(FILE_NAME)
|
||||
add_dependencies(EXAMPLE_NAME FILE_NAME)
|
||||
@@ -107,6 +115,15 @@ function(add_example_executable EXAMPLE_NAME FILE_NAME)
|
||||
set(result 0)
|
||||
endif()
|
||||
#message("add_example returns ${result}")
|
||||
if(result EQUAL 0 AND NOT "${EXAMPLE_NAME}" IN_LIST REGRESSION_EXAMPLES)
|
||||
#message("adding to SMOKE EXAMPLE FILTER ${EXAMPLE_NAME}")
|
||||
set_tests_properties(${EXAMPLE_NAME} PROPERTIES LABELS "SMOKE_TEST")
|
||||
add_dependencies(smoke ${EXAMPLE_NAME})
|
||||
elseif(result EQUAL 0 AND "${EXAMPLE_NAME}" IN_LIST REGRESSION_EXAMPLES)
|
||||
#message("Adding to REGRESSION EXAMPLE FILTER ${EXAMPLE_NAME}")
|
||||
set_tests_properties(${EXAMPLE_NAME} PROPERTIES LABELS "REGRESSION_TEST")
|
||||
add_dependencies(regression ${EXAMPLE_NAME})
|
||||
endif()
|
||||
set(result ${result} PARENT_SCOPE)
|
||||
endfunction(add_example_executable EXAMPLE_NAME)
|
||||
|
||||
@@ -188,8 +205,10 @@ function(add_example_executable_no_testing EXAMPLE_NAME FILE_NAME)
|
||||
rocm_install(TARGETS ${EXAMPLE_NAME} COMPONENT examples)
|
||||
set(result 0)
|
||||
endif()
|
||||
|
||||
#message("add_example returns ${result}")
|
||||
set(result ${result} PARENT_SCOPE)
|
||||
|
||||
endfunction(add_example_executable_no_testing EXAMPLE_NAME)
|
||||
|
||||
# add all example subdir
|
||||
|
||||
Reference in New Issue
Block a user