aboutsummaryrefslogtreecommitdiff
path: root/tests/main.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-12-16 19:59:52 +0000
committerMichele Di Giorgio <michele.digiorgio@arm.com>2020-01-10 18:10:41 +0000
commit7f15251e2fd6c729a1d8f4f524a4bb902c30cdad (patch)
tree63d14297c28a1a8296bd0e97dd283f65c2ba528e /tests/main.cpp
parent13ec5f0a09e038f12cbe0f3b119a215934b72b42 (diff)
downloadComputeLibrary-7f15251e2fd6c729a1d8f4f524a4bb902c30cdad.tar.gz
COMPMID-2986: Extend test framework options.
Add the following option to the test framework: - delay: Allows run delay between tests in seconds. Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: Ib1b7a1d1ad83c9a99b23f353b1800db075b32bce Reviewed-on: https://review.mlplatform.org/c/2525 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/main.cpp')
-rw-r--r--tests/main.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index 604a51fc0f..441e28b2a8 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 ARM Limited.
+ * Copyright (c) 2017-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -142,6 +142,8 @@ int main(int argc, char **argv)
#endif /* ARM_COMPUTE_CL */
auto threads = parser.add_option<utils::SimpleOption<int>>("threads", 1);
threads->set_help("Number of threads to use");
+ auto cooldown_sec = parser.add_option<utils::SimpleOption<float>>("delay", -1.f);
+ cooldown_sec->set_help("Delay to add between test executions in seconds");
try
{
@@ -261,12 +263,15 @@ int main(int argc, char **argv)
framework.set_instruments_info(instruments_info);
// Initialize framework
- framework.init(options.instruments->value(),
- options.iterations->value(),
- dataset_mode->value(),
- filter->value(),
- filter_id->value(),
- options.log_level->value());
+ framework::FrameworkConfig fconfig;
+ fconfig.instruments = options.instruments->value();
+ fconfig.name_filter = filter->value();
+ fconfig.id_filter = filter_id->value();
+ fconfig.num_iterations = options.iterations->value();
+ fconfig.mode = dataset_mode->value();
+ fconfig.log_level = options.log_level->value();
+ fconfig.cooldown_sec = cooldown_sec->value();
+ framework.init(fconfig);
for(auto &p : printers)
{