From 0f307d1fa7b02affbddf74167aefa9e33da22a30 Mon Sep 17 00:00:00 2001 From: Melchisedech Date: Wed, 2 Mar 2022 22:52:18 +0100 Subject: [PATCH] Always activate time when running inside CI tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way, no need to specify the --time argument of ynh_script_progression if you’re testing your app package through Yunorunner and want to adjust weight. --- helpers/logging | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/helpers/logging b/helpers/logging index 6562f5e3c..0f2d7eece 100644 --- a/helpers/logging +++ b/helpers/logging @@ -248,7 +248,14 @@ ynh_script_progression() { # Re-disable xtrace, ynh_handle_getopts_args set it back set +o xtrace # set +x weight=${weight:-1} - time=${time:-0} + + # Always activate time when running inside CI tests + if [$PACKAGE_CHECK_EXEC -eq 1]; then + time=${time:-1} + else + time=${time:-0} + fi + last=${last:-0} # Get execution time since the last $base_time