aboutsummaryrefslogtreecommitdiff
path: root/framework/printers
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-07-26 16:03:58 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:16:42 +0100
commit542002cf3d9acc2858e2311966cd9b060d70b5a6 (patch)
tree19787c9ff55c192be79398d1b07334277c29832a /framework/printers
parentba9b3f58583331100346cf4fad16d51aa11a3677 (diff)
downloadComputeLibrary-542002cf3d9acc2858e2311966cd9b060d70b5a6.tar.gz
COMPMID-415: Print test id
Change-Id: Ie8521aac33361a9296529eeea831f195319e0db7 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81726 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'framework/printers')
-rw-r--r--framework/printers/JSONPrinter.cpp6
-rw-r--r--framework/printers/JSONPrinter.h2
-rw-r--r--framework/printers/PrettyPrinter.cpp6
-rw-r--r--framework/printers/PrettyPrinter.h2
-rw-r--r--framework/printers/Printer.h8
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;