aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-07-31 14:48:45 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:16:42 +0100
commite33eb645664e3525086a01b27674febc99ecf5c3 (patch)
tree686288bfa8709efc16858c58b369a247e79a1925
parentb3d2579b567eabd98fdb4861bf1380fefa18c9aa (diff)
downloadComputeLibrary-e33eb645664e3525086a01b27674febc99ecf5c3.tar.gz
COMPMID-415: Fix new validation
Change-Id: I013d8665afc4e5674b1ff229c44669abd714f690 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/82228 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
-rw-r--r--framework/Framework.cpp16
-rw-r--r--tests/Utils.h2
-rw-r--r--tests/validation_new/half.h3
3 files changed, 17 insertions, 4 deletions
diff --git a/framework/Framework.cpp b/framework/Framework.cpp
index 008c4c00eb..5a2b02fb21 100644
--- a/framework/Framework.cpp
+++ b/framework/Framework.cpp
@@ -221,7 +221,7 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
log_test_start(info);
Profiler profiler = get_profiler();
- TestResult result(TestResult::Status::SUCCESS);
+ TestResult result(TestResult::Status::NOT_RUN);
_current_test_result = &result;
@@ -247,6 +247,12 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
}
test_case->do_teardown();
+
+ // Change status to success if no error has happend
+ if(result.status == TestResult::Status::NOT_RUN)
+ {
+ result.status = TestResult::Status::SUCCESS;
+ }
}
catch(const TestError &error)
{
@@ -314,6 +320,8 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
std::cerr << "FATAL ERROR: Received unhandled error during fixture creation: '" << error.what() << "'\n";
}
+ result.status = TestResult::Status::CRASHED;
+
if(_throw_errors)
{
throw;
@@ -342,7 +350,11 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
{
result.status = TestResult::Status::EXPECTED_FAILURE;
}
- else if(_stop_on_error)
+ }
+
+ if(result.status == TestResult::Status::FAILED || result.status == TestResult::Status::CRASHED)
+ {
+ if(_stop_on_error)
{
throw std::runtime_error("Abort on first error.");
}
diff --git a/tests/Utils.h b/tests/Utils.h
index 0a58d41e35..389c9806bb 100644
--- a/tests/Utils.h
+++ b/tests/Utils.h
@@ -31,7 +31,7 @@
#include "arm_compute/core/TensorShape.h"
#include "arm_compute/core/Types.h"
#include "support/ToolchainSupport.h"
-#include "tests/validation/half.h"
+#include "tests/validation_new/half.h"
#include <cmath>
#include <cstddef>
diff --git a/tests/validation_new/half.h b/tests/validation_new/half.h
index 6ac6716372..0ca620cf57 100644
--- a/tests/validation_new/half.h
+++ b/tests/validation_new/half.h
@@ -33,5 +33,6 @@
#define HALF_ROUND_STYLE 1
#define HALF_ROUND_TIES_TO_EVEN 1
-#include "half/tests/validation_new/half.h"
+#include "half/half.hpp"
+
#endif /* __ARM_COMPUTE_TEST_HALF_H__ */