[IE TESTS] CoreThreadingTestsWithIterations.smoke_LoadNetworkAccuracy disabled &...
authorIrina Efode <irina.efode@intel.com>
Wed, 24 Jun 2020 13:10:39 +0000 (16:10 +0300)
committerGitHub <noreply@github.com>
Wed, 24 Jun 2020 13:10:39 +0000 (16:10 +0300)
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/core_threading_tests.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp
inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp
inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/core_threading_tests.cpp
inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp

index 2b831ab..dd283c4 100644 (file)
@@ -7,26 +7,26 @@
 namespace {
 
 const Params params[] = {
-    std::tuple<Device, Config> { CommonTestUtils::DEVICE_CPU, { { CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(YES) } } },
-    std::tuple<Device, Config> { CommonTestUtils::DEVICE_HETERO, { { "TARGET_FALLBACK", "CPU" } } },
-    std::tuple<Device, Config> { CommonTestUtils::DEVICE_MULTI, { { MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , "CPU" } } }
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_CPU, {{ CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(YES) }}},
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_HETERO, {{ "TARGET_FALLBACK", CommonTestUtils::DEVICE_CPU }}},
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_MULTI, {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU }}},
 };
 
 const Params paramsStreams[] = {
-    std::tuple<Device, Config> { "CPU", { { CONFIG_KEY(CPU_THROUGHPUT_STREAMS), CONFIG_VALUE(CPU_THROUGHPUT_AUTO) } } }
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_CPU, {{ CONFIG_KEY(CPU_THROUGHPUT_STREAMS), CONFIG_VALUE(CPU_THROUGHPUT_AUTO) }}},
 };
-
-
 }  // namespace
 
-INSTANTIATE_TEST_CASE_P(CPU, CoreThreadingTests, testing::ValuesIn(params));
+INSTANTIATE_TEST_CASE_P(CPU, CoreThreadingTests, testing::ValuesIn(params), CoreThreadingTests::getTestCaseName);
 
 INSTANTIATE_TEST_CASE_P(CPU, CoreThreadingTestsWithIterations,
     testing::Combine(testing::ValuesIn(params),
                      testing::Values(4),
-                     testing::Values(50)));
+                     testing::Values(50)),
+    CoreThreadingTestsWithIterations::getTestCaseName);
 
 INSTANTIATE_TEST_CASE_P(CPU_Streams, CoreThreadingTestsWithIterations,
     testing::Combine(testing::ValuesIn(paramsStreams),
                      testing::Values(4),
-                     testing::Values(10)));
+                     testing::Values(10)),
+    CoreThreadingTestsWithIterations::getTestCaseName);
index 4bdd219..ad59299 100644 (file)
@@ -33,5 +33,8 @@ std::vector<std::string> disabledTestPatterns() {
         R"(.*Reduce.*axes=\(0\.3\)_type=Prod.*)",
         // TODO: Issue 34055
         R"(.*RangeLayerTest.*)",
+#if (defined(_WIN32) || defined(_WIN64))
+        R"(.*(CoreThreadingTestsWithIterations).*(smoke_LoadNetworkAccuracy).*(targetDevice=HETERO).*)",
+#endif
     };
 }
\ No newline at end of file
index 69748a0..2f9d708 100644 (file)
@@ -11,8 +11,8 @@ using namespace InferenceEngine::gpu;
 namespace {
 
 Params params[] = {
-    std::tuple<Device, Config> { CommonTestUtils::DEVICE_GPU, { { CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(YES) } } },
-    std::tuple<Device, Config> { CommonTestUtils::DEVICE_GPU, { { CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(NO) } } },
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_GPU, { { CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(YES) }}},
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_GPU, { { CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(NO) }}},
 };
 
 }  // namespace
@@ -47,9 +47,10 @@ TEST_P(CoreThreadingTestsWithIterations, smoke_LoadNetwork_RemoteContext) {
     }, numIterations, numThreads);
 }
 
-INSTANTIATE_TEST_CASE_P(GPU, CoreThreadingTests, testing::ValuesIn(params));
+INSTANTIATE_TEST_CASE_P(GPU, CoreThreadingTests, testing::ValuesIn(params), CoreThreadingTests::getTestCaseName);
 
 INSTANTIATE_TEST_CASE_P(GPU, CoreThreadingTestsWithIterations,
     testing::Combine(testing::ValuesIn(params),
                      testing::Values(4),
-                     testing::Values(20)));
+                     testing::Values(20)),
+    CoreThreadingTestsWithIterations::getTestCaseName);
index fd694f5..579146c 100644 (file)
@@ -7,16 +7,17 @@
 namespace {
 
 Params params[] = {
-    std::tuple<Device, Config> { "MYRIAD", { { CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(YES) } } },
-    std::tuple<Device, Config> { "HETERO", { { "TARGET_FALLBACK", "MYRIAD" } } },
-    std::tuple<Device, Config> { "MULTI", { { MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , "MYRIAD" } } }
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_MYRIAD, {{ CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(YES) }}},
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_HETERO, {{ "TARGET_FALLBACK", CommonTestUtils::DEVICE_MYRIAD }}},
+    std::tuple<Device, Config>{ CommonTestUtils::DEVICE_MULTI, {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES), CommonTestUtils::DEVICE_MYRIAD }}},
 };
 
 }  // namespace
 
-INSTANTIATE_TEST_CASE_P(MYRIAD, CoreThreadingTests, testing::ValuesIn(params));
+INSTANTIATE_TEST_CASE_P(MYRIAD, CoreThreadingTests, testing::ValuesIn(params), CoreThreadingTests::getTestCaseName);
 
 INSTANTIATE_TEST_CASE_P(DISABLED_MYRIAD, CoreThreadingTestsWithIterations,
     testing::Combine(testing::ValuesIn(params),
                      testing::Values(2),
-                     testing::Values(2)));
+                     testing::Values(2)),
+    CoreThreadingTestsWithIterations::getTestCaseName);
index 063eba8..035dd59 100644 (file)
@@ -24,6 +24,7 @@
 #include <mutex>
 #include <chrono>
 #include <fstream>
+#include <functional_test_utils/skip_tests_config.hpp>
 
 using Device = std::string;
 using Config = std::map<std::string, std::string>;
@@ -82,8 +83,24 @@ class CoreThreadingTests : public CoreThreadingTestsBase,
                            public ::testing::TestWithParam<Params> {
 public:
     void SetUp() override {
+        SKIP_IF_CURRENT_TEST_IS_DISABLED()
         std::tie(deviceName, config) = GetParam();
     }
+
+    static std::string getTestCaseName(testing::TestParamInfo<Params> obj) {
+        unsigned int numThreads, numIterations;
+        std::string deviceName;
+        Config config;
+        std::tie(deviceName, config) = obj.param;
+        char separator('_');
+        std::ostringstream result;
+        result << "targetDevice=" << deviceName << separator;
+        result << "config=";
+        for (auto& confItem : config) {
+            result << confItem.first << ":" << confItem.second << separator;
+        }
+        return result.str();
+    }
 };
 
 // tested function: GetVersions, UnregisterPlugin
@@ -159,16 +176,37 @@ TEST_P(CoreThreadingTests, smoke_QueryNetwork) {
 
 using Threads = unsigned int;
 using Iterations = unsigned int;
+using CoreThreadingParams = std::tuple<Params, Threads, Iterations>;
 
-class CoreThreadingTestsWithIterations : public ::testing::TestWithParam<std::tuple<Params, Threads, Iterations> >,
+class CoreThreadingTestsWithIterations : public ::testing::TestWithParam<CoreThreadingParams>,
                                          public CoreThreadingTestsBase {
 public:
     void SetUp() override {
+        SKIP_IF_CURRENT_TEST_IS_DISABLED()
         std::tie(deviceName, config) = std::get<0>(GetParam());
         numThreads =  std::get<1>(GetParam());
         numIterations =  std::get<2>(GetParam());
     }
 
+    static std::string getTestCaseName(testing::TestParamInfo<std::tuple<Params, Threads, Iterations>> obj) {
+        unsigned int numThreads, numIterations;
+        std::string deviceName;
+        Config config;
+        std::tie(deviceName, config) = std::get<0>(obj.param);
+        numThreads =  std::get<1>(obj.param);
+        numIterations =  std::get<2>(obj.param);
+        char separator('_');
+        std::ostringstream result;
+        result << "targetDevice=" << deviceName << separator;
+        result << "config=";
+        for (auto& confItem : config) {
+            result << confItem.first << ":" << confItem.second << separator;
+        }
+        result << "numThreads=" << numThreads << separator;
+        result << "numIter=" << numIterations;
+        return result.str();
+    }
+
     unsigned int numIterations;
     unsigned int numThreads;
 };