aboutsummaryrefslogtreecommitdiff
path: root/tests/framework/printers/JSONPrinter.cpp
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-11-24 11:24:45 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:41:04 +0000
commitdbfb31cdee063ec61e0ab1087f99f235c12d2e7e (patch)
tree6076e31984b4278cbba7ca2c1bc53fa258e98842 /tests/framework/printers/JSONPrinter.cpp
parentc8097129aca9e410ec1fe0ff8f568db7a89b7cd2 (diff)
downloadComputeLibrary-dbfb31cdee063ec61e0ab1087f99f235c12d2e7e.tar.gz
COMPMID-556 Print tests list using printers rather than cout
Will help with scripting to split the tests to run across several boards Change-Id: I32806c3cd03cd1b4af1865cd4fdb0422d609eff0 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/110535 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'tests/framework/printers/JSONPrinter.cpp')
-rw-r--r--tests/framework/printers/JSONPrinter.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/framework/printers/JSONPrinter.cpp b/tests/framework/printers/JSONPrinter.cpp
index 8d3c023a92..676ec69336 100644
--- a/tests/framework/printers/JSONPrinter.cpp
+++ b/tests/framework/printers/JSONPrinter.cpp
@@ -113,6 +113,21 @@ void JSONPrinter::print_test_footer()
*_stream << "}";
}
+void JSONPrinter::print_list_tests(const std::vector<TestInfo> &infos)
+{
+ *_stream << R"(, "list_tests" : {)";
+ bool first = true;
+ for(auto info : infos)
+ {
+ if(!first)
+ {
+ *_stream << ",";
+ }
+ *_stream << R"(")" << info.id << R"(" : { "name": ")" << info.name << R"(", "mode": ")" << info.mode << R"(", "status" : ")" << info.status << R"(" })";
+ first = false;
+ }
+ *_stream << "}";
+}
void JSONPrinter::print_errors_header()
{
_errors.clear();