aboutsummaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2018-10-10 14:38:35 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:55:45 +0000
commit21eaefecbe69a0ff0e211c627bf8c51c22400c7b (patch)
tree62cdfee4a32e70bb9baf1e681898b33f63a00ffe /tests/framework
parent7f32d01cedfd0f2e89bea1a40e5f82ed3ad43d4e (diff)
downloadComputeLibrary-21eaefecbe69a0ff0e211c627bf8c51c22400c7b.tar.gz
COMPMID-1631: Fixed test framework memory corruption.
Change-Id: I2c4dcedcd3b56e41174eebbbacd47be4e968d34d Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/152767 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Vidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/framework')
-rw-r--r--tests/framework/Framework.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/framework/Framework.cpp b/tests/framework/Framework.cpp
index 20510ba6af..1233ca5884 100644
--- a/tests/framework/Framework.cpp
+++ b/tests/framework/Framework.cpp
@@ -333,6 +333,7 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
}
catch(const FileNotFound &error)
{
+ profiler.test_stop();
if(_error_on_missing_assets)
{
if(_log_level >= LogLevel::ERRORS)
@@ -366,6 +367,7 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
}
catch(const TestError &error)
{
+ profiler.test_stop();
if(_log_level >= error.level())
{
func_on_all_printers([&](Printer * p)
@@ -384,6 +386,7 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
#ifdef ARM_COMPUTE_CL
catch(const ::cl::Error &error)
{
+ profiler.test_stop();
if(_log_level >= LogLevel::ERRORS)
{
std::stringstream stream;
@@ -405,6 +408,7 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
#endif /* ARM_COMPUTE_CL */
catch(const std::exception &error)
{
+ profiler.test_stop();
if(_log_level >= LogLevel::ERRORS)
{
func_on_all_printers([&](Printer * p)
@@ -422,6 +426,7 @@ void Framework::run_test(const TestInfo &info, TestCaseFactory &test_factory)
}
catch(...)
{
+ profiler.test_stop();
if(_log_level >= LogLevel::ERRORS)
{
func_on_all_printers([&](Printer * p)