Skip to content

Commit

Permalink
Disable tests which read prototxt files if protobuf-lite is used (#3691)
Browse files Browse the repository at this point in the history
* Disable tests which read prototxt if protobuf lite is used

* added missing line

* cmake flags refactor
  • Loading branch information
Mateusz Bencer authored Dec 22, 2020
1 parent 9465073 commit 00181d5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ set(DEPENDENCIES
sharedTestClasses
)

if (NGRAPH_ONNX_IMPORT_ENABLE)
if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE)
list(APPEND INCLUDES "${OpenVINO_MAIN_SOURCE_DIR}/docs/onnx_custom_op")
list(APPEND LINK_LIBRARIES onnx_custom_op)
list(APPEND DEPENDENCIES onnx_custom_op)
else()
set(EXCLUDED_SOURCE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/onnx_reader")
endif()

if (NOT NGRAPH_ONNX_IMPORT_ENABLE OR NOT ENABLE_MKL_DNN)
if (NOT NGRAPH_ONNX_IMPORT_ENABLE OR NOT ENABLE_MKL_DNN OR NGRAPH_USE_PROTOBUF_LITE)
set(EXCLUDED_SOURCE_PATHS ${EXCLUDED_SOURCE_PATHS} "${CMAKE_CURRENT_SOURCE_DIR}/extension.cpp")
endif()

Expand Down
34 changes: 18 additions & 16 deletions inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@
# SPDX-License-Identifier: Apache-2.0
#

set(TARGET_NAME onnxImporterUnitTests)
if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE)
set(TARGET_NAME onnxImporterUnitTests)

addIeTargetTest(
NAME ${TARGET_NAME}
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDENCIES
ngraph
onnx_importer
LINK_LIBRARIES
unitTestUtils
onnx_importer
DEFINES
ONNX_MODELS_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/models\"
ADD_CPPLINT
LABELS
ONNX
)
addIeTargetTest(
NAME ${TARGET_NAME}
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDENCIES
ngraph
onnx_importer
LINK_LIBRARIES
unitTestUtils
onnx_importer
DEFINES
ONNX_MODELS_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/models\"
ADD_CPPLINT
LABELS
ONNX
)
endif()

0 comments on commit 00181d5

Please sign in to comment.