aboutsummaryrefslogtreecommitdiff
path: root/tests/AssetsLibrary.h
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-09-28 12:01:10 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitf6705ec6ed137233680929e941c674af6baae1dc (patch)
tree01e042ca01e80cec627cb76b537a3c5e5d65b7b5 /tests/AssetsLibrary.h
parent349feef33ed931a4b24f34f76482e80428973873 (diff)
downloadComputeLibrary-f6705ec6ed137233680929e941c674af6baae1dc.tar.gz
COMPMID-417 Allow the tests to run even when assets are not present
Change-Id: Ief165b1d583a70cbe35aae93f05ddfe962196323 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/89503 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/AssetsLibrary.h')
-rw-r--r--tests/AssetsLibrary.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/AssetsLibrary.h b/tests/AssetsLibrary.h
index bd1d8b4758..6199a09012 100644
--- a/tests/AssetsLibrary.h
+++ b/tests/AssetsLibrary.h
@@ -35,6 +35,7 @@
#include "tests/RawTensor.h"
#include "tests/TensorCache.h"
#include "tests/Utils.h"
+#include "tests/framework/Exceptions.h"
#include <algorithm>
#include <cstddef>
@@ -663,7 +664,10 @@ void AssetsLibrary::fill_layer_data(T &&tensor, std::string name) const
// Open file
std::ifstream stream(path, std::ios::in | std::ios::binary);
- ARM_COMPUTE_ERROR_ON_MSG(!stream.good(), "Failed to load binary data");
+ if(!stream.good())
+ {
+ throw framework::FileNotFound("Could not load npy file: " + path);
+ }
// Check magic bytes and version number
unsigned char v_major = 0;
unsigned char v_minor = 0;