From 2ac5040c9b21734610b51b232ddac5a9067aa2c2 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Mon, 24 Jul 2017 15:52:54 +0100 Subject: COMPMID-415: Add log level Change-Id: I93f49198ab2c32f52b4723a0624d588683a92451 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81446 Reviewed-by: Anthony Barbier Tested-by: Kaizen --- framework/Framework.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'framework/Framework.h') diff --git a/framework/Framework.h b/framework/Framework.h index 6bf3f18f3f..5f52b4fbe8 100644 --- a/framework/Framework.h +++ b/framework/Framework.h @@ -25,6 +25,7 @@ #define ARM_COMPUTE_TEST_FRAMEWORK #include "DatasetModes.h" +#include "Exceptions.h" #include "Profiler.h" #include "TestCase.h" #include "TestCaseFactory.h" @@ -95,8 +96,9 @@ public: * @param[in] mode Dataset mode. * @param[in] name_filter Regular expression to filter tests by name. Only matching tests will be executed. * @param[in] id_filter Test id. Only this test will be executed. + * @param[in] log_level Verbosity of the output. */ - void init(const std::vector &instruments, int num_iterations, DatasetMode mode, const std::string &name_filter, int64_t id_filter); + void init(const std::vector &instruments, int num_iterations, DatasetMode mode, const std::string &name_filter, int64_t id_filter, LogLevel log_level); /** Add a new test suite. * @@ -177,9 +179,10 @@ public: /** Tell the framework that the currently running test case failed a non-fatal expectation. * - * @param[in] msg Description of the failure. + * @param[in] msg Description of the failure. + * @param[in] level Severity of the failed expectation. */ - void log_failed_expectation(const std::string &msg); + void log_failed_expectation(const std::string &msg, LogLevel level = LogLevel::ERRORS); /** Number of iterations per test case. * @@ -291,6 +294,7 @@ private: std::regex _test_name_filter{ ".*" }; int64_t _test_id_filter{ -1 }; DatasetMode _dataset_mode{ DatasetMode::ALL }; + LogLevel _log_level{ LogLevel::ALL }; TestResult *_current_test_result{ nullptr }; std::vector _test_info{}; }; -- cgit v1.2.1