Skip to content

Commit 5aefcd9

Browse files
sbutnaripereanub
andauthored
[NPU][IE-MDK] Load testing skip config at runtime (#29056)
### Details: - Adds a mechanism to load and parse an xml file containing all test skips - Defines skip enabling "rules": a user can select if a skip is applied depending on OS, Platform number or Backend type - Rules are optional. Users can negate a rule by using "!" and they can add as many rules as needed - Skip filters and rules are grouped in the following format: ``` <skip_config> <message> Provide reason why these tests are skipped </message> <enable_rules> <-- rules section starts here --> <backend>LEVEL0</backend> <backend>IMD</backend> <backend></backend> (empty backend) <device>3720</device> <device>4000</device> <operating_system>windows</operating_system> <operating_system>linux</operating_system> </enable_rules> <filters> <-- skip filters section starts here --> <filter>skip this test 1</filter> <filter>skip this test 2</filter> <filter>skip this test 3</filter> </filters> </skip_config> ``` Functionality is enabled by setting OV_NPU_TESTS_SKIP_CONFIG_FILE environment variable with the correct path, the file will be loaded and parsed. However, if the path is left empty the application will use the legacy skip filters as configured in skip_tests_config.cpp ### Tickets: - EISW-142588 --------- Signed-off-by: Sorin Butnariu <sorin.butnariu@intel.com> Co-authored-by: Bogdan Pereanu <bogdan.pereanu@intel.com>
1 parent 5b6c8cd commit 5aefcd9

File tree

5 files changed

+1042
-5
lines changed

5 files changed

+1042
-5
lines changed

src/plugins/intel_npu/tests/functional/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ set(EXCLUDED_FUNC_TESTS_DIR "")
1414
set(OPTIONAL_FUNC_TESTS_INCLUDES "")
1515
set(OPTIONAL_FUNC_TESTS_LIBS "")
1616

17+
set(SKIP_CONFIG "skip_tests.xml")
18+
set(SKIP_CONFIG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instances/${SKIP_CONFIG})
19+
1720
list(APPEND OPTIONAL_FUNC_TESTS_INCLUDES
1821
"${OpenVINO_SOURCE_DIR}/src/plugins/intel_npu/src/compiler_adapter/include")
1922

@@ -66,3 +69,9 @@ install(
6669
RUNTIME DESTINATION tests
6770
COMPONENT tests
6871
EXCLUDE_FROM_ALL)
72+
73+
install(
74+
FILES ${SKIP_CONFIG_PATH}
75+
DESTINATION tests
76+
COMPONENT tests
77+
EXCLUDE_FROM_ALL)

src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ NpuTestEnvConfig::NpuTestEnvConfig() {
134134
if (auto var = std::getenv("IE_NPU_TESTS_PLATFORM")) {
135135
IE_NPU_TESTS_PLATFORM = var;
136136
}
137+
138+
if (auto var = std::getenv("OV_NPU_TESTS_SKIP_CONFIG_FILE")) {
139+
OV_NPU_TESTS_SKIP_CONFIG_FILE = var;
140+
}
137141
}
138142

139143
const NpuTestEnvConfig& NpuTestEnvConfig::getInstance() {

src/plugins/intel_npu/tests/functional/common/npu_test_env_cfg.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class NpuTestEnvConfig {
2626
std::string IE_NPU_TESTS_DUMP_PATH;
2727
std::string IE_NPU_TESTS_LOG_LEVEL;
2828
std::string IE_NPU_TESTS_PLATFORM;
29+
std::string OV_NPU_TESTS_SKIP_CONFIG_FILE;
2930

3031
bool IE_NPU_TESTS_RUN_COMPILER = true;
3132
bool IE_NPU_TESTS_RUN_EXPORT = false;

0 commit comments

Comments
 (0)