diff options
author | Éanna Ó Catháin <eanna.ocathain@arm.com> | 2019-05-08 14:00:45 +0100 |
---|---|---|
committer | Eanna O Cathain Arm <eanna.ocathain@arm.com> | 2019-05-08 15:23:27 +0000 |
commit | a4247d5a50502811a6956dffd990c0254622b7e1 (patch) | |
tree | a2e8742695673bc8e958cce316e6ddeafcc59642 /tests/InferenceTest.cpp | |
parent | c2fe5fb3a070ce2c7daebf63d0def3d57cec09d3 (diff) | |
download | armnn-a4247d5a50502811a6956dffd990c0254622b7e1.tar.gz |
IVGCVSW-2900 Adding the Accuracy Checker Tool and tests
Change-Id: I4ac325e45f2236b8e0757d21046f117024ce3979
Signed-off-by: Éanna Ó Catháin <eanna.ocathain@arm.com>
Diffstat (limited to 'tests/InferenceTest.cpp')
-rw-r--r-- | tests/InferenceTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/InferenceTest.cpp b/tests/InferenceTest.cpp index 89e78def2f..cf97459ddc 100644 --- a/tests/InferenceTest.cpp +++ b/tests/InferenceTest.cpp @@ -92,6 +92,12 @@ bool ParseCommandLine(int argc, char** argv, IInferenceTestCaseProvider& testCas bool ValidateDirectory(std::string& dir) { + if (dir.empty()) + { + std::cerr << "No directory specified" << std::endl; + return false; + } + if (dir[dir.length() - 1] != '/') { dir += "/"; @@ -103,6 +109,12 @@ bool ValidateDirectory(std::string& dir) return false; } + if (!boost::filesystem::is_directory(dir)) + { + std::cerr << "Given directory [" << dir << "] is not a directory" << std::endl; + return false; + } + return true; } |