From 9298738d062c88a3eae3b2f0454e0607470bf533 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 23 Jun 2024 14:30:57 +0200 Subject: [PATCH] helpers2.1: display 100 lines instead of 20 in CI context when service fails to start --- helpers/helpers.v2.1.d/systemd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helpers/helpers.v2.1.d/systemd b/helpers/helpers.v2.1.d/systemd index b33ca5252..259f25862 100644 --- a/helpers/helpers.v2.1.d/systemd +++ b/helpers/helpers.v2.1.d/systemd @@ -71,6 +71,12 @@ ynh_systemctl() { timeout=${timeout:-60} # =========================================== + # On CI, use length=100 because it's sometime hell to debug otherwise for super-long output + if ynh_in_ci_tests && [ $length -le 20 ] + then + length=100 + fi + # Manage case of service already stopped if [ "$action" == "stop" ] && ! systemctl is-active --quiet $service; then return 0