Skip to content

Commit

Permalink
Rename CommonTestUtils namespace to ov::test::utils
Browse files Browse the repository at this point in the history
  • Loading branch information
olpipi committed Jul 27, 2023
1 parent 5193413 commit e3d0808
Show file tree
Hide file tree
Showing 93 changed files with 1,212 additions and 1,208 deletions.
4 changes: 2 additions & 2 deletions modules/nvidia_plugin/tests/functional/core_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) {
}
// Set inference_precision hint to run fp32 model in fp32 runtime precision as default plugin execution precision may vary
std::map<std::string, std::string> config = {{ov::hint::inference_precision.name(), hint.get_type_name()}};
core->SetConfig(config, CommonTestUtils::DEVICE_NVIDIA);
core->SetConfig(config, ov::test::utils::DEVICE_NVIDIA);
}

namespace ov {
Expand All @@ -33,7 +33,7 @@ void core_configuration(ov::test::SubgraphBaseTest* test) {
}
}
// Set inference_precision hint to run fp32 model in fp32 runtime precision as default plugin execution precision may vary
test->core->set_property(CommonTestUtils::DEVICE_NVIDIA, {{ov::hint::inference_precision.name(), hint.get_type_name()}});
test->core->set_property(ov::test::utils::DEVICE_NVIDIA, {{ov::hint::inference_precision.name(), hint.get_type_name()}});
}

} // namespace test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ const std::vector<std::vector<int>> orders = {

INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests,
HoldersTest,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_NVIDIA),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NVIDIA),
::testing::ValuesIn(orders)),
HoldersTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests,
HoldersTestImportNetwork,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_NVIDIA, "HETERO:NVIDIA"),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NVIDIA, "HETERO:NVIDIA"),
::testing::ValuesIn(orders)),
HoldersTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests,
HoldersTestOnImportedNetwork,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA, "HETERO:NVIDIA"),
::testing::Values(ov::test::utils::DEVICE_NVIDIA, "HETERO:NVIDIA"),
HoldersTestOnImportedNetwork::getTestCaseName);

} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const std::vector<std::map<std::string, std::string>> configs = {{}};

INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
ExecutableNetworkBaseTest,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_NVIDIA),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NVIDIA),
::testing::ValuesIn(configs)),
ExecutableNetworkBaseTest::getTestCaseName);

Expand All @@ -24,7 +24,7 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {InferenceEngine::
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
ExecNetSetPrecision,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_NVIDIA),
::testing::Values(ov::test::utils::DEVICE_NVIDIA),
::testing::ValuesIn(configs)),
ExecNetSetPrecision::getTestCaseName);
} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@ namespace {

INSTANTIATE_TEST_SUITE_P(smoke_IEClassExecutableNetworkGetMetricTest,
IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA, /*"MULTI:NVIDIA", */"HETERO:NVIDIA"));
::testing::Values(ov::test::utils::DEVICE_NVIDIA, /*"MULTI:NVIDIA", */"HETERO:NVIDIA"));

INSTANTIATE_TEST_SUITE_P(smoke_IEClassExecutableNetworkGetMetricTest,
IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA, /*"MULTI:NVIDIA", */"HETERO:NVIDIA"));
::testing::Values(ov::test::utils::DEVICE_NVIDIA, /*"MULTI:NVIDIA", */"HETERO:NVIDIA"));

INSTANTIATE_TEST_SUITE_P(smoke_IEClassExecutableNetworkGetMetricTest,
IEClassExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA, /*""MULTI:NVIDIA", */"HETERO:NVIDIA"));
::testing::Values(ov::test::utils::DEVICE_NVIDIA, /*""MULTI:NVIDIA", */"HETERO:NVIDIA"));

INSTANTIATE_TEST_SUITE_P(smoke_IEClassExecutableNetworkGetMetricTest,
IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA, /*"MULTI:NVIDIA", */"HETERO:NVIDIA"));
::testing::Values(ov::test::utils::DEVICE_NVIDIA, /*"MULTI:NVIDIA", */"HETERO:NVIDIA"));

INSTANTIATE_TEST_SUITE_P(smoke_IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported,
IEClassExecutableNetworkGetMetricTest,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA, /*"MULTI:NVIDIA", */"HETERO:NVIDIA"));
::testing::Values(ov::test::utils::DEVICE_NVIDIA, /*"MULTI:NVIDIA", */"HETERO:NVIDIA"));
//
// Executable Network GetConfig / SetConfig
//

INSTANTIATE_TEST_SUITE_P(smoke_IEClassExecutableNetworkGetConfigTest,
IEClassExecutableNetworkGetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA));
::testing::Values(ov::test::utils::DEVICE_NVIDIA));

INSTANTIATE_TEST_SUITE_P(smoke_IEClassExecutableNetworkSetConfigTest,
IEClassExecutableNetworkSetConfigTest,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA));
::testing::Values(ov::test::utils::DEVICE_NVIDIA));

//
// Hetero Executable Network GetMetric
Expand All @@ -55,19 +55,19 @@ INSTANTIATE_TEST_SUITE_P(smoke_IEClassExecutableNetworkSetConfigTest,

INSTANTIATE_TEST_SUITE_P(smoke_IEClassHeteroExecutableNetworlGetMetricTest,
IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA));
::testing::Values(ov::test::utils::DEVICE_NVIDIA));

INSTANTIATE_TEST_SUITE_P(smoke_IEClassHeteroExecutableNetworlGetMetricTest,
IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA));
::testing::Values(ov::test::utils::DEVICE_NVIDIA));

INSTANTIATE_TEST_SUITE_P(smoke_IEClassHeteroExecutableNetworlGetMetricTest,
IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA));
::testing::Values(ov::test::utils::DEVICE_NVIDIA));

INSTANTIATE_TEST_SUITE_P(smoke_IEClassHeteroExecutableNetworlGetMetricTest,
IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK,
::testing::Values(CommonTestUtils::DEVICE_NVIDIA));
::testing::Values(ov::test::utils::DEVICE_NVIDIA));

#endif // ENABLE_INTEL_CPU
} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const std::vector<std::map<std::string, std::string>> configs = {{}};

INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
InferRequestCallbackTests,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_NVIDIA),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NVIDIA),
::testing::ValuesIn(configs)),
InferRequestCallbackTests::getTestCaseName);
} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const std::vector<std::map<std::string, std::string>> configs = {};
INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests_IncorrectConfig,
InferRequestConfigTest,
::testing::Combine(::testing::Values(0ul),
::testing::Values(CommonTestUtils::DEVICE_NVIDIA),
::testing::Values(ov::test::utils::DEVICE_NVIDIA),
::testing::ValuesIn(configs)),
InferRequestConfigTest::getTestCaseName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ TEST_F(smoke_InferenceRequestTest, AsyncParameterResult) {
InferenceEngine::Core ie{};
InferenceEngine::Blob::Ptr a{};
auto testNet = ie.ReadNetwork(model10, a);
auto execNet = ie.LoadNetwork(testNet, CommonTestUtils::DEVICE_NVIDIA);
auto execNet = ie.LoadNetwork(testNet, ov::test::utils::DEVICE_NVIDIA);
InferenceEngine::InferRequest inferRequest{execNet.CreateInferRequest()};
const InferenceEngine::ConstInputsDataMap inputsInfo{execNet.GetInputsInfo()};
fillBlobs(inferRequest, inputsInfo, 1);
Expand All @@ -379,7 +379,7 @@ TEST_F(InferenceRequestBasicTest, AsyncParameterResultCancel) {
InferenceEngine::Core ie{};
InferenceEngine::Blob::Ptr a{};
auto testNet = ie.ReadNetwork(heavyModel10, a);
auto execNet = ie.LoadNetwork(testNet, CommonTestUtils::DEVICE_NVIDIA);
auto execNet = ie.LoadNetwork(testNet, ov::test::utils::DEVICE_NVIDIA);
InferenceEngine::InferRequest inferRequest{execNet.CreateInferRequest()};
const InferenceEngine::ConstInputsDataMap inputsInfo{execNet.GetInputsInfo()};
fillBlobs(inferRequest, inputsInfo, 1);
Expand All @@ -395,7 +395,7 @@ TEST_F(smoke_InferenceRequestTest, PerformanceCounters) {
{InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::YES}};

auto testNet = ie.ReadNetwork(model10, a);
auto execNet = ie.LoadNetwork(testNet, CommonTestUtils::DEVICE_NVIDIA, config);
auto execNet = ie.LoadNetwork(testNet, ov::test::utils::DEVICE_NVIDIA, config);
InferenceEngine::InferRequest request{execNet.CreateInferRequest()};

const InferenceEngine::ConstInputsDataMap inputsInfo{execNet.GetInputsInfo()};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const std::vector<std::map<std::string, std::string>> configs = {{}};

INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
InferRequestIOBBlobTest,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_NVIDIA),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NVIDIA),
::testing::ValuesIn(configs)),
InferRequestIOBBlobTest::getTestCaseName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ namespace {
const std::vector<std::map<std::string, std::string>> configs = {{}};

const std::vector<std::map<std::string, std::string>> Multiconfigs = {
{{MULTI_CONFIG_KEY(DEVICE_PRIORITIES), CommonTestUtils::DEVICE_NVIDIA}}};
{{MULTI_CONFIG_KEY(DEVICE_PRIORITIES), ov::test::utils::DEVICE_NVIDIA}}};

INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests,
InferRequestPerfCountersTest,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_NVIDIA),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NVIDIA),
::testing::ValuesIn(configs)),
InferRequestPerfCountersTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests,
InferRequestPerfCountersTest,
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_MULTI),
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_MULTI),
::testing::ValuesIn(Multiconfigs)),
InferRequestPerfCountersTest::getTestCaseName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ const std::vector<ov::element::Type_t> netPrecisions = {
const std::vector<ov::AnyMap> configs = {
{},
};
const std::vector<ov::AnyMap> multiConfigs = {{ov::device::priorities(CommonTestUtils::DEVICE_NVIDIA)}};
const std::vector<ov::AnyMap> multiConfigs = {{ov::device::priorities(ov::test::utils::DEVICE_NVIDIA)}};

const std::vector<ov::AnyMap> heteroConfigs = {{ov::device::priorities(CommonTestUtils::DEVICE_NVIDIA)}};
const std::vector<ov::AnyMap> heteroConfigs = {{ov::device::priorities(ov::test::utils::DEVICE_NVIDIA)}};

INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_NVIDIA),
::testing::Values(ov::test::utils::DEVICE_NVIDIA),
::testing::ValuesIn(configs)),
OVExecGraphImportExportTest::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_AUTO),
::testing::Values(ov::test::utils::DEVICE_AUTO),
::testing::ValuesIn(multiConfigs)),
OVExecGraphImportExportTest::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_Hetero_BehaviorTests,
OVExecGraphImportExportTest,
::testing::Combine(::testing::ValuesIn(netPrecisions),
::testing::Values(CommonTestUtils::DEVICE_HETERO),
::testing::Values(ov::test::utils::DEVICE_HETERO),
::testing::ValuesIn(heteroConfigs)),
OVExecGraphImportExportTest::getTestCaseName);

Expand Down
Loading

0 comments on commit e3d0808

Please sign in to comment.