determine test category (Public vs Extra) based on module location
This commit is contained in:
@@ -764,8 +764,16 @@ function(ocv_add_perf_tests)
|
||||
if(CMAKE_VERSION VERSION_GREATER "2.8" AND OPENCV_TEST_DATA_PATH)
|
||||
add_test(NAME ${the_target} COMMAND ${the_target} --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity)
|
||||
|
||||
get_filename_component(cur_modules_loc "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
|
||||
get_filename_component(default_modules_loc "${CMAKE_SOURCE_DIR}/modules" ABSOLUTE)
|
||||
if("${cur_modules_loc}" STREQUAL "${default_modules_loc}")
|
||||
set(test_category "Public")
|
||||
else()
|
||||
set(test_category "Extra")
|
||||
endif()
|
||||
|
||||
set_tests_properties(${the_target} PROPERTIES
|
||||
LABELS "Sanity"
|
||||
LABELS "${test_category};Sanity"
|
||||
ENVIRONMENT "OPENCV_TEST_DATA_PATH=${OPENCV_TEST_DATA_PATH}")
|
||||
endif()
|
||||
|
||||
@@ -825,8 +833,16 @@ function(ocv_add_accuracy_tests)
|
||||
if(CMAKE_VERSION VERSION_GREATER "2.8" AND OPENCV_TEST_DATA_PATH AND NOT "${the_target}" MATCHES "opencv_test_viz")
|
||||
add_test(NAME ${the_target} COMMAND ${the_target})
|
||||
|
||||
get_filename_component(cur_modules_loc "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
|
||||
get_filename_component(default_modules_loc "${CMAKE_SOURCE_DIR}/modules" ABSOLUTE)
|
||||
if("${cur_modules_loc}" STREQUAL "${default_modules_loc}")
|
||||
set(test_category "Public")
|
||||
else()
|
||||
set(test_category "Extra")
|
||||
endif()
|
||||
|
||||
set_tests_properties(${the_target} PROPERTIES
|
||||
LABELS "Accuracy"
|
||||
LABELS "${test_category};Accuracy"
|
||||
ENVIRONMENT "OPENCV_TEST_DATA_PATH=${OPENCV_TEST_DATA_PATH}")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user