aboutsummaryrefslogtreecommitdiff
path: root/delegate/CMakeLists.txt
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2021-04-08 11:47:23 +0100
committerKeithARM <keith.davis@arm.com>2021-04-09 10:41:09 +0000
commit7c67fabc86b6647855beebac9f6cfe92341357cb (patch)
treef7001e3422918898cc0c181beeee3917088cfa12 /delegate/CMakeLists.txt
parent015b3f025d1f1ccb75d3f437bee8ed8dcfee302b (diff)
downloadarmnn-7c67fabc86b6647855beebac9f6cfe92341357cb.tar.gz
IVGCVSW-5803 Delegate Unit Tests Failure on Android: Normalization & Softmax
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I2873f8563cc11da550d460b04e5175372489a564
Diffstat (limited to 'delegate/CMakeLists.txt')
-rw-r--r--delegate/CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/delegate/CMakeLists.txt b/delegate/CMakeLists.txt
index 5dbe83e014..d72089ca85 100644
--- a/delegate/CMakeLists.txt
+++ b/delegate/CMakeLists.txt
@@ -170,6 +170,36 @@ if(BUILD_UNIT_TESTS)
src/test/TransposeTest.cpp
src/test/TransposeTestHelper.hpp)
+ # There's a known Android NDK bug which causes a subset of NeonLayerTests to
+ # fail. We'll exclude these tests in NeonLayerTests_NDK_Bug.cpp if we're doing
+ # a debug build and NDK is less than r21.
+ # https://github.com/android/ndk/issues/1135
+
+ # Default to always including these tests.
+ set(INCLUDE_NDK_BUG_TESTS "ON")
+ # Reconsider if we in a debug build.
+ string( TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE_LOWERCASE )
+ if ( NOT BUILD_TYPE_LOWERCASE STREQUAL "release" )
+ message("CMAKE:: BUILD TYPE IS ${CMAKE_BUILD_TYPE}")
+ # And NDK_VERSION has been set.
+ if ( DEFINED NDK_VERSION )
+ message("CMAKE:: NDK DEFINED")
+ # And the version is less than r21.
+ if ( ${NDK_VERSION} STRLESS "r21" )
+ message("CMAKE:: BUG TESTS OFF")
+ set(INCLUDE_NDK_BUG_TESTS "OFF")
+ endif()
+ endif()
+ endif()
+
+ if ( INCLUDE_NDK_BUG_TESTS STREQUAL "ON" )
+ list(APPEND armnnDelegate_unittest_sources
+ src/test/NeonDelegateTests_NDK_Issue.cpp
+ )
+ else()
+
+ endif()
+
add_executable(DelegateUnitTests ${armnnDelegate_unittest_sources})
target_include_directories(DelegateUnitTests PRIVATE third-party)