MLCE-189 Adding more checks around dynamic backend directory paths.
* It appears that the customer ends up with an invalid value of
sharedObjectPath in GetBasePath. Inserting an explicit check for
it.
* Also checking the final derived path for the value dynamic backend
shared object.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I8bee4ea8ac2a6b8ad846b9c958731718669455d4
diff --git a/src/backends/backendsCommon/test/DynamicBackendTests.hpp b/src/backends/backendsCommon/test/DynamicBackendTests.hpp
index 0c24ec6..a2a6df0 100644
--- a/src/backends/backendsCommon/test/DynamicBackendTests.hpp
+++ b/src/backends/backendsCommon/test/DynamicBackendTests.hpp
@@ -108,8 +108,8 @@
path programLocation = boost::dll::program_location().parent_path();
path sharedObjectPath = programLocation.append(basePath);
- BOOST_CHECK(exists(sharedObjectPath));
-
+ BOOST_CHECK_MESSAGE(exists(sharedObjectPath), "Base path for shared objects does not exist: " +
+ sharedObjectPath.string());
return sharedObjectPath.string();
}
@@ -344,6 +344,11 @@
using namespace armnn;
std::string testSubDirectory = GetTestSubDirectory(g_TestDynamicBackendSubDir);
+
+ // We expect this path to exists so we can load a valid dynamic backend.
+ BOOST_CHECK_MESSAGE(boost::filesystem::exists(testSubDirectory),
+ "Base path for shared objects does not exist: " + testSubDirectory);
+
std::string sharedObjectFilePath = GetTestFilePath(testSubDirectory, g_TestValidTestDynamicBackendFileName);
void* sharedObjectHandle = nullptr;