diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index dd5f5e038a4..832861f3d0d 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -366,8 +366,8 @@ jobs: - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OVProxyTests.xml displayName: 'OV Proxy Plugin Tests' - - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_hetero_unit_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OVHeteroUnitTests.xml - displayName: 'OV Hetero Unit Tests' + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OVHeteroFuncTests.xml + displayName: 'OV Hetero Func Tests' - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_conditional_compilation_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ConditionalCompilation.xml displayName: 'Conditional Compilation Tests' diff --git a/.ci/azure/linux_debian.yml b/.ci/azure/linux_debian.yml index bffadaa2fb6..614d4b3caca 100644 --- a/.ci/azure/linux_debian.yml +++ b/.ci/azure/linux_debian.yml @@ -282,6 +282,12 @@ jobs: LD_LIBRARY_PATH: $(INSTALL_TEST_DIR) displayName: 'OV Proxy Tests' + - script: | + $(INSTALL_TEST_DIR)/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OVHeteroFuncTests.xml + env: + LD_LIBRARY_PATH: $(INSTALL_TEST_DIR) + displayName: 'OV Hetero Func Tests' + - script: $(INSTALL_TEST_DIR)/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ONNXFrontend.xml env: LD_LIBRARY_PATH: $(INSTALL_TEST_DIR) diff --git a/.ci/azure/mac.yml b/.ci/azure/mac.yml index 37965683bd5..efdc5594c5d 100644 --- a/.ci/azure/mac.yml +++ b/.ci/azure/mac.yml @@ -188,8 +188,8 @@ jobs: displayName: 'OV Proxy Plugin Tests' enabled: 'false' - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_hetero_unit_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OVHeteroUnitTests.xml - displayName: 'OV Hetero Unit Tests' + - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OVHeteroFuncTests.xml + displayName: 'OV Hetero Func Tests' enabled: 'false' - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_ir_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-IRFrontend.xml diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index 49a47a42e82..11477b66251 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -266,8 +266,8 @@ jobs: - script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-OVProxyTests.xml displayName: 'OV Proxy Plugin Tests' - - script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_hetero_unit_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-OVHeteroUnitTests.xml - displayName: 'OV Hetero Unit Tests' + - script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-OVHeteroFuncTests.xml + displayName: 'OV Hetero Func Tests' - script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_conditional_compilation_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ConditionalCompilation.xml displayName: 'Conditional Compilation Tests' diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 22af2892bef..e71cd5f4546 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -20,24 +20,24 @@ jobs: with: python-version: '3.10.10' architecture: 'x64' - - + + - name: Setup ccache uses: hendrikmuhs/ccache-action@v1.2 with: max-size: 50G - + - name: Clone OpenVINO uses: actions/checkout@v3 with: submodules: recursive - + - name: Install dependencies run: | sudo apt --assume-yes update sudo -E ${{ github.workspace }}/install_build_dependencies.sh sudo apt --assume-yes install lcov - + python3 -m pip install --upgrade pip python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/wheel/requirements-dev.txt python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/requirements.txt @@ -56,7 +56,7 @@ jobs: python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_onnx.txt python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_tf2.txt python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_dev.txt - + - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v1 id: cpu-cores @@ -85,31 +85,34 @@ jobs: -DENABLE_SYSTEM_SNAPPY=ON build-type: Release parallel: ${{ steps.cpu-cores.outputs.count }} - + - name: Install wheel packages run: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install_pkg -P '${{ github.workspace }}/build/cmake_install.cmake' - + - name: Install python wheels run: python3 -m pip install openvino-dev --find-links=${{ github.workspace }}/install_pkg/tools - + - name: List binaries run: ls -la ${{ github.workspace }}/bin/intel64/Release - + - name: Install OpenVINO run: cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install_pkg -P '${{ github.workspace }}/build/cmake_install.cmake' - + - name: Run OV core unit tests run: ${{ github.workspace }}/bin/intel64/Release/ov_core_unit_tests - name: Run OV Proxy plugin tests run: ${{ github.workspace }}/bin/intel64/Release/ov_proxy_plugin_tests + - name: Run OV Hetero Func tests + run: ${{ github.workspace }}/bin/intel64/Release/ov_hetero_func_tests + - name: Run IR frontend tests run: ${{ github.workspace }}/bin/intel64/Release/ov_ir_frontend_tests # --gtest_print_time=1 --gtest_output=xml:${{ github.workspace }}/testdata/TEST-IRFrontend.xml - + - name: Run ONNX frontend tests run: ${{ github.workspace }}/bin/intel64/Release/ov_onnx_frontend_tests --gtest_filter=-*IE_GPU* - + #- name: Run Paddle frontend unit tests # run: ${{ github.workspace }}/bin/intel64/Release/paddle_tests --gtest_filter=-*IE_GPU* @@ -131,7 +134,7 @@ jobs: -DCMAKE_CXX_LINKER_LAUNCHER=ccache parallel: ${{ steps.cpu-cores.outputs.count }} - + - name: Print info run: | ls -laR diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9c3f6f41d9f..702e923774e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -75,9 +75,9 @@ jobs: - name: Install build dependencies run: | sudo -E ${{ env.OPENVINO_REPO }}/install_build_dependencies.sh - sudo -E apt update + sudo -E apt update sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers - + wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip unzip ninja-linux.zip sudo cp -v ninja /usr/local/bin/ @@ -94,16 +94,16 @@ jobs: python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements.txt python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements_test.txt - + # For running Python API tests python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt - + # For running ONNX frontend unit tests python3 -m pip install --force-reinstall -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt - + # For running TensorFlow frontend unit tests python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow/tests/requirements.txt - + # For running Paddle frontend unit tests python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/paddle/tests/requirements.txt @@ -294,7 +294,7 @@ jobs: - name: Install dependencies run: | - sudo -E apt update + sudo -E apt update sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers - name: Download OpenVINO package @@ -450,6 +450,11 @@ jobs: source ${{ env.INSTALL_DIR }}/setupvars.sh ${{ env.INSTALL_TEST_DIR }}/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVProxyTests.xml + - name: Hetero Func Tests + run: | + source ${{ env.INSTALL_DIR }}/setupvars.sh + ${{ env.INSTALL_TEST_DIR }}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroFuncTests.xml + - name: Upload Test Results uses: actions/upload-artifact@v3 if: ${{ always() }} @@ -494,7 +499,7 @@ jobs: - name: Install dependencies run: | - sudo -E apt update + sudo -E apt update sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers - uses: actions/setup-python@v4 @@ -705,7 +710,7 @@ jobs: - name: Install dependencies run: | - sudo -E apt update + sudo -E apt update sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers - name: Download OpenVINO package diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5fb10bddf8b..6b0a0038b8e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -85,16 +85,16 @@ jobs: python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements.txt python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements_test.txt - + # For running Python API tests python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt - + # For running ONNX frontend unit tests python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt - + # For running TensorFlow frontend unit tests python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow/tests/requirements.txt - + # For running Paddle frontend unit tests python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/paddle/tests/requirements.txt @@ -196,7 +196,7 @@ jobs: DestinationPath = "${{ env.BUILD_DIR }}/openvino_package.zip" } Compress-Archive @compress - + $file=Get-ChildItem -Path "${{ env.INSTALL_DIR }}\tests" $compress = @{ Path = $file @@ -365,14 +365,14 @@ jobs: - name: Model Optimizer UT shell: cmd run: | - + python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_mxnet.txt ^ -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_caffe.txt ^ -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_kaldi.txt ^ -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_onnx.txt ^ -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_tf2.txt ^ -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_dev.txt - + set PYTHONPATH=${{ env.OPENVINO_REPO }}\tools\mo;${{ env.LAYER_TESTS_INSTALL_DIR }};${{ env.INSTALL_TEST_DIR }};${{ env.INSTALL_DIR }}\python\python3.11;%PYTHONPATH% call "${{ env.INSTALL_DIR }}\\setupvars.bat" && python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/mo/unit_tests --ignore=${{ env.INSTALL_TEST_DIR }}/mo/unit_tests/mo/front/mxnet --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-ModelOptimizer.xml @@ -455,7 +455,7 @@ jobs: -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_onnx.txt ^ -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_tf2.txt ^ -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_dev.txt - + set PYTHONPATH=${{ env.OPENVINO_REPO }}\tools\mo;${{ env.LAYER_TESTS_INSTALL_DIR }};%PYTHONPATH% call "${{ env.INSTALL_DIR }}\\setupvars.bat" && python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_lite_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tfl_fe.xml @@ -640,6 +640,11 @@ jobs: run: | call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVProxyTests.xml + - name: Hetero Func Tests + shell: cmd + run: | + call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroFuncTests.xml + - name: Upload Test Results uses: actions/upload-artifact@v3 if: ${{ always() }} diff --git a/src/plugins/hetero/CMakeLists.txt b/src/plugins/hetero/CMakeLists.txt index 0a51e39cf17..e2866661e8e 100644 --- a/src/plugins/hetero/CMakeLists.txt +++ b/src/plugins/hetero/CMakeLists.txt @@ -29,6 +29,6 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) -if(ENABLE_TESTS) - add_subdirectory(tests/unit) +if(ENABLE_FUNCTIONAL_TESTS) + add_subdirectory(tests/functional) endif() \ No newline at end of file diff --git a/src/plugins/hetero/tests/unit/CMakeLists.txt b/src/plugins/hetero/tests/functional/CMakeLists.txt similarity index 90% rename from src/plugins/hetero/tests/unit/CMakeLists.txt rename to src/plugins/hetero/tests/functional/CMakeLists.txt index b65a9a29b20..eaa56e072b7 100644 --- a/src/plugins/hetero/tests/unit/CMakeLists.txt +++ b/src/plugins/hetero/tests/functional/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -set(TARGET_NAME ov_hetero_unit_tests) +set(TARGET_NAME ov_hetero_func_tests) ov_add_test_target( NAME ${TARGET_NAME} @@ -15,7 +15,7 @@ ov_add_test_target( openvino::runtime::dev gtest gtest_main - unit_test_utils + common_test_utils ADD_CLANG_FORMAT LABELS HETERO diff --git a/src/plugins/hetero/tests/unit/compile_model_tests.cpp b/src/plugins/hetero/tests/functional/compile_model_tests.cpp similarity index 100% rename from src/plugins/hetero/tests/unit/compile_model_tests.cpp rename to src/plugins/hetero/tests/functional/compile_model_tests.cpp diff --git a/src/plugins/hetero/tests/unit/hetero_tests.cpp b/src/plugins/hetero/tests/functional/hetero_tests.cpp similarity index 98% rename from src/plugins/hetero/tests/unit/hetero_tests.cpp rename to src/plugins/hetero/tests/functional/hetero_tests.cpp index 491b8428c57..266fc242507 100644 --- a/src/plugins/hetero/tests/unit/hetero_tests.cpp +++ b/src/plugins/hetero/tests/functional/hetero_tests.cpp @@ -27,9 +27,9 @@ namespace { std::string get_mock_engine_path() { - std::string mockEngineName("mock_engine"); + std::string mock_engine_name("mock_engine"); return ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(), - mockEngineName + IE_BUILD_POSTFIX); + mock_engine_name + IE_BUILD_POSTFIX); } template @@ -714,17 +714,15 @@ public: }; void ov::hetero::tests::HeteroTests::reg_plugin(std::shared_ptr& plugin) { - std::string libraryPath = get_mock_engine_path(); + std::string library_path = get_mock_engine_path(); if (!m_so) - m_so = ov::util::load_shared_object(libraryPath.c_str()); + m_so = ov::util::load_shared_object(library_path.c_str()); if (auto mock_plugin = std::dynamic_pointer_cast(plugin)) mock_plugin->set_version(mock_plugin->get_const_version()); std::function injectProxyEngine = make_std_function(m_so, "InjectPlugin"); injectProxyEngine(plugin.get()); - core.register_plugin(ov::util::make_plugin_library_name(CommonTestUtils::getExecutableDirectory(), - std::string("mock_engine") + IE_BUILD_POSTFIX), - plugin->get_device_name()); + core.register_plugin(library_path, plugin->get_device_name()); m_mock_plugins.emplace_back(plugin); } diff --git a/src/plugins/hetero/tests/unit/hetero_tests.hpp b/src/plugins/hetero/tests/functional/hetero_tests.hpp similarity index 100% rename from src/plugins/hetero/tests/unit/hetero_tests.hpp rename to src/plugins/hetero/tests/functional/hetero_tests.hpp diff --git a/src/plugins/hetero/tests/unit/import_model_tests.cpp b/src/plugins/hetero/tests/functional/import_model_tests.cpp similarity index 100% rename from src/plugins/hetero/tests/unit/import_model_tests.cpp rename to src/plugins/hetero/tests/functional/import_model_tests.cpp diff --git a/src/plugins/hetero/tests/unit/properties_tests.cpp b/src/plugins/hetero/tests/functional/properties_tests.cpp similarity index 100% rename from src/plugins/hetero/tests/unit/properties_tests.cpp rename to src/plugins/hetero/tests/functional/properties_tests.cpp diff --git a/src/plugins/hetero/tests/unit/query_model_tests.cpp b/src/plugins/hetero/tests/functional/query_model_tests.cpp similarity index 100% rename from src/plugins/hetero/tests/unit/query_model_tests.cpp rename to src/plugins/hetero/tests/functional/query_model_tests.cpp