diff options
Diffstat (limited to 'framework/printers')
-rw-r--r-- | framework/printers/JSONPrinter.cpp | 6 | ||||
-rw-r--r-- | framework/printers/JSONPrinter.h | 2 | ||||
-rw-r--r-- | framework/printers/PrettyPrinter.cpp | 6 | ||||
-rw-r--r-- | framework/printers/PrettyPrinter.h | 2 | ||||
-rw-r--r-- | framework/printers/Printer.h | 8 |
5 files changed, 15 insertions, 9 deletions
diff --git a/framework/printers/JSONPrinter.cpp b/framework/printers/JSONPrinter.cpp index 66973bb1ab..7806644418 100644 --- a/framework/printers/JSONPrinter.cpp +++ b/framework/printers/JSONPrinter.cpp @@ -23,6 +23,8 @@ */ #include "JSONPrinter.h" +#include "framework/Framework.h" + #include <algorithm> namespace arm_compute @@ -72,11 +74,11 @@ void JSONPrinter::print_run_footer() *_stream << "}"; } -void JSONPrinter::print_test_header(const std::string &name) +void JSONPrinter::print_test_header(const TestInfo &info) { print_separator(_first_test); - *_stream << R"(")" << name << R"(" : {)"; + *_stream << R"(")" << info.name << R"(" : {)"; } void JSONPrinter::print_test_footer() diff --git a/framework/printers/JSONPrinter.h b/framework/printers/JSONPrinter.h index 3cc5578ecd..7b34941ca1 100644 --- a/framework/printers/JSONPrinter.h +++ b/framework/printers/JSONPrinter.h @@ -43,7 +43,7 @@ public: void print_global_footer() override; void print_run_header() override; void print_run_footer() override; - void print_test_header(const std::string &name) override; + void print_test_header(const TestInfo &info) override; void print_test_footer() override; void print_measurements(const Profiler::MeasurementsMap &measurements) override; diff --git a/framework/printers/PrettyPrinter.cpp b/framework/printers/PrettyPrinter.cpp index 77fb6404a8..fd90401693 100644 --- a/framework/printers/PrettyPrinter.cpp +++ b/framework/printers/PrettyPrinter.cpp @@ -23,6 +23,8 @@ */ #include "PrettyPrinter.h" +#include "framework/Framework.h" + #include <algorithm> namespace arm_compute @@ -77,9 +79,9 @@ void PrettyPrinter::print_run_footer() { } -void PrettyPrinter::print_test_header(const std::string &name) +void PrettyPrinter::print_test_header(const TestInfo &info) { - *_stream << begin_color("2") << "Running '" << name << "'" << end_color() << "\n"; + *_stream << begin_color("2") << "Running [" << info.id << "] '" << info.name << "'" << end_color() << "\n"; } void PrettyPrinter::print_test_footer() diff --git a/framework/printers/PrettyPrinter.h b/framework/printers/PrettyPrinter.h index bf3f12943d..893b1fadd2 100644 --- a/framework/printers/PrettyPrinter.h +++ b/framework/printers/PrettyPrinter.h @@ -49,7 +49,7 @@ public: void print_global_footer() override; void print_run_header() override; void print_run_footer() override; - void print_test_header(const std::string &name) override; + void print_test_header(const TestInfo &info) override; void print_test_footer() override; void print_measurements(const Profiler::MeasurementsMap &measurements) override; diff --git a/framework/printers/Printer.h b/framework/printers/Printer.h index 7e1936413b..7d8af12416 100644 --- a/framework/printers/Printer.h +++ b/framework/printers/Printer.h @@ -24,7 +24,7 @@ #ifndef ARM_COMPUTE_TEST_PRINTER #define ARM_COMPUTE_TEST_PRINTER -#include "../Profiler.h" +#include "framework/Profiler.h" #include <fstream> #include <iostream> @@ -36,6 +36,8 @@ namespace test { namespace framework { +struct TestInfo; + /** Abstract printer class used by the @ref Framework to present output. */ class Printer { @@ -86,9 +88,9 @@ public: /** Print header before a test. * - * @param[in] name test_name. + * @param[in] info Test info. */ - virtual void print_test_header(const std::string &name) = 0; + virtual void print_test_header(const TestInfo &info) = 0; /** Print footer after a test. */ virtual void print_test_footer() = 0; |