[IE TESTS] Test movement (#9429)
* [IE TESTS] Movement of some tests in shared lib. Movement of 'QueryNetwork' validation to ApiConformance suite * Update read_ir.cpp
This commit is contained in:
parent
3ee00e018a
commit
9234f4177d
@ -4,7 +4,7 @@
|
||||
|
||||
#include "common_test_utils/file_utils.hpp"
|
||||
|
||||
#include "read_ir/read_ir.hpp"
|
||||
#include "read_ir/read_ir_query_network.hpp"
|
||||
#include "conformance.hpp"
|
||||
|
||||
namespace ConformanceTests {
|
@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "op_impl_check/op_impl_check.hpp"
|
||||
#include "op_impl_check/single_op_graph.hpp"
|
||||
#include "single_layer_tests/op_impl_check/op_impl_check.hpp"
|
||||
#include "single_layer_tests/op_impl_check/single_op_graph.hpp"
|
||||
#include "conformance.hpp"
|
||||
|
||||
namespace ConformanceTests {
|
||||
|
@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "common_test_utils/file_utils.hpp"
|
||||
|
||||
#include "read_ir/read_ir_compare_with_refs.hpp"
|
||||
#include "conformance.hpp"
|
||||
|
||||
namespace ConformanceTests {
|
||||
using namespace LayerTestsDefinitions;
|
||||
|
||||
namespace {
|
||||
INSTANTIATE_TEST_SUITE_P(conformance,
|
||||
ReadIRTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(CommonTestUtils::getFileListByPatternRecursive(IRFolderPaths, std::regex(R"(.*\.xml)"))),
|
||||
::testing::Values(targetDevice),
|
||||
::testing::Values(pluginConfig)),
|
||||
ReadIRTest::getTestCaseName);
|
||||
} // namespace
|
||||
} // namespace ConformanceTests
|
@ -0,0 +1,13 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "shared_test_classes/read_ir/read_ir.hpp"
|
||||
|
||||
namespace LayerTestsDefinitions {
|
||||
|
||||
TEST_P(ReadIRTest, ReadIR) {
|
||||
Run();
|
||||
}
|
||||
|
||||
} // namespace LayerTestsDefinitions
|
@ -6,10 +6,6 @@
|
||||
|
||||
namespace LayerTestsDefinitions {
|
||||
|
||||
TEST_P(ReadIRTest, ReadIR) {
|
||||
Run();
|
||||
}
|
||||
|
||||
TEST_P(ReadIRTest, QueryNetwork) {
|
||||
QueryNetwork();
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#include "op_impl_check/op_impl_check.hpp"
|
||||
#include "single_layer_tests/op_impl_check/op_impl_check.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace test {
|
@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <op_impl_check/op_impl_check.hpp>
|
||||
#include <op_impl_check/single_op_graph.hpp>
|
||||
#include <single_layer_tests/op_impl_check/op_impl_check.hpp>
|
||||
#include <single_layer_tests/op_impl_check/single_op_graph.hpp>
|
||||
|
||||
namespace ov {
|
||||
namespace test {
|
@ -19,6 +19,7 @@ class ReadIRTest : public testing::WithParamInterface<ReadIRParams>,
|
||||
virtual public LayerTestsUtils::LayerTestsCommon {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<ReadIRParams> &obj);
|
||||
void QueryNetwork() override;
|
||||
|
||||
protected:
|
||||
void SetUp() override;
|
||||
|
@ -2,6 +2,11 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <signal.h>
|
||||
#ifdef _WIN32
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#include <pugixml.hpp>
|
||||
#include "common_test_utils/file_utils.hpp"
|
||||
#include "functional_test_utils/core_config.hpp"
|
||||
@ -29,6 +34,36 @@ std::string ReadIRTest::getTestCaseName(const testing::TestParamInfo<ReadIRParam
|
||||
return result.str();
|
||||
}
|
||||
|
||||
void ReadIRTest::QueryNetwork() {
|
||||
if (functionRefs == nullptr) {
|
||||
functionRefs = ngraph::clone_function(*function);
|
||||
functionRefs->set_friendly_name("refFunction");
|
||||
}
|
||||
auto crashHandler = [](int errCode) {
|
||||
auto &s = LayerTestsUtils::Summary::getInstance();
|
||||
s.saveReport();
|
||||
std::cout << "Unexpected application crash!" << std::endl;
|
||||
std::abort();
|
||||
};
|
||||
signal(SIGSEGV, crashHandler);
|
||||
|
||||
auto &s = LayerTestsUtils::Summary::getInstance();
|
||||
s.setDeviceName(targetDevice);
|
||||
|
||||
if (FuncTestUtils::SkipTestsConfig::currentTestIsDisabled()) {
|
||||
s.updateOPsStats(functionRefs, LayerTestsUtils::PassRate::Statuses::SKIPPED);
|
||||
GTEST_SKIP() << "Disabled test due to configuration" << std::endl;
|
||||
} else {
|
||||
s.updateOPsStats(functionRefs, LayerTestsUtils::PassRate::Statuses::CRASHED);
|
||||
}
|
||||
try {
|
||||
LayerTestsCommon::QueryNetwork();
|
||||
s.updateOPsStats(functionRefs, LayerTestsUtils::PassRate::Statuses::PASSED);
|
||||
} catch (...) {
|
||||
s.updateOPsStats(functionRefs, LayerTestsUtils::PassRate::Statuses::FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
void ReadIRTest::SetUp() {
|
||||
std::tie(pathToModel, targetDevice, configuration) = this->GetParam();
|
||||
auto net = getCore()->ReadNetwork(pathToModel);
|
||||
|
Loading…
Reference in New Issue
Block a user