Always activate time when running inside CI tests

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.
This commit is contained in:
Melchisedech 2022-03-02 22:52:18 +01:00 committed by GitHub
parent 680811eeff
commit 0f307d1fa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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