aboutsummaryrefslogtreecommitdiff
path: root/tests/framework/printers
diff options
context:
space:
mode:
Diffstat (limited to 'tests/framework/printers')
-rw-r--r--tests/framework/printers/JSONPrinter.cpp12
-rw-r--r--tests/framework/printers/JSONPrinter.h3
-rw-r--r--tests/framework/printers/PrettyPrinter.cpp8
-rw-r--r--tests/framework/printers/PrettyPrinter.h3
-rw-r--r--tests/framework/printers/Printer.cpp2
-rw-r--r--tests/framework/printers/Printer.h8
-rw-r--r--tests/framework/printers/Printers.cpp2
-rw-r--r--tests/framework/printers/Printers.h2
8 files changed, 31 insertions, 9 deletions
diff --git a/tests/framework/printers/JSONPrinter.cpp b/tests/framework/printers/JSONPrinter.cpp
index 179cdf9601..84b2d23114 100644
--- a/tests/framework/printers/JSONPrinter.cpp
+++ b/tests/framework/printers/JSONPrinter.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 ARM Limited.
+ * Copyright (c) 2017-2019,2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -169,10 +169,18 @@ void JSONPrinter::print_info(const std::string &info)
_infos.push_back(info);
}
+void JSONPrinter::print_profiler_header(const std::string &header_data)
+{
+ if(header_data.size() > 0)
+ {
+ print_separator(_first_test_entry);
+ }
+ *_stream << header_data;
+}
+
void JSONPrinter::print_measurements(const Profiler::MeasurementsMap &measurements)
{
print_separator(_first_test_entry);
-
*_stream << R"("measurements" : {)";
for(auto i_it = measurements.cbegin(), i_end = measurements.cend(); i_it != i_end;)
diff --git a/tests/framework/printers/JSONPrinter.h b/tests/framework/printers/JSONPrinter.h
index 3b783ac64f..ad996708e7 100644
--- a/tests/framework/printers/JSONPrinter.h
+++ b/tests/framework/printers/JSONPrinter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017,2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -51,6 +51,7 @@ public:
void print_errors_footer() override;
void print_error(const std::exception &error, bool expected) override;
void print_info(const std::string &info) override;
+ void print_profiler_header(const std::string &header_data) override;
void print_measurements(const Profiler::MeasurementsMap &measurements) override;
void print_list_tests(const std::vector<TestInfo> &infos) override;
diff --git a/tests/framework/printers/PrettyPrinter.cpp b/tests/framework/printers/PrettyPrinter.cpp
index fe0540a624..529ff2c2d9 100644
--- a/tests/framework/printers/PrettyPrinter.cpp
+++ b/tests/framework/printers/PrettyPrinter.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 ARM Limited.
+ * Copyright (c) 2017-2019,2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -116,6 +116,12 @@ void PrettyPrinter::print_list_tests(const std::vector<TestInfo> &infos)
*_stream << "[" << info.id << ", " << info.mode << ", " << info.status << "] " << info.name << "\n";
}
}
+
+void PrettyPrinter::print_profiler_header(const std::string &header_data)
+{
+ ARM_COMPUTE_UNUSED(header_data);
+}
+
void PrettyPrinter::print_measurements(const Profiler::MeasurementsMap &measurements)
{
for(const auto &instrument : measurements)
diff --git a/tests/framework/printers/PrettyPrinter.h b/tests/framework/printers/PrettyPrinter.h
index 95487f94c5..b9d5d3957c 100644
--- a/tests/framework/printers/PrettyPrinter.h
+++ b/tests/framework/printers/PrettyPrinter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017,2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -55,6 +55,7 @@ public:
void print_errors_footer() override;
void print_error(const std::exception &error, bool expected) override;
void print_info(const std::string &info) override;
+ void print_profiler_header(const std::string &header_data) override;
void print_measurements(const Profiler::MeasurementsMap &measurements) override;
void print_list_tests(const std::vector<TestInfo> &infos) override;
diff --git a/tests/framework/printers/Printer.cpp b/tests/framework/printers/Printer.cpp
index e034c2ed43..12e2460aef 100644
--- a/tests/framework/printers/Printer.cpp
+++ b/tests/framework/printers/Printer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
diff --git a/tests/framework/printers/Printer.h b/tests/framework/printers/Printer.h
index cbe22fb2a6..af0209788c 100644
--- a/tests/framework/printers/Printer.h
+++ b/tests/framework/printers/Printer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2018,2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -125,6 +125,12 @@ public:
*/
virtual void print_info(const std::string &info) = 0;
+ /** Print header data.
+ *
+ * @param[in] header_data JSON formmated header data.
+ */
+ virtual void print_profiler_header(const std::string &header_data) = 0;
+
/** Print measurements for a test.
*
* @param[in] measurements Measurements as collected by a @ref Profiler.
diff --git a/tests/framework/printers/Printers.cpp b/tests/framework/printers/Printers.cpp
index 6e11b63a9a..9ba3098432 100644
--- a/tests/framework/printers/Printers.cpp
+++ b/tests/framework/printers/Printers.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
diff --git a/tests/framework/printers/Printers.h b/tests/framework/printers/Printers.h
index 53867e2dff..acbddf0bd4 100644
--- a/tests/framework/printers/Printers.h
+++ b/tests/framework/printers/Printers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017 Arm Limited.
*
* SPDX-License-Identifier: MIT
*