From 5879bbb9aa52545f907a83b28d501d944ee58f1c Mon Sep 17 00:00:00 2001 From: Fernando Bravo <39527354+fernando79513@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:52:06 +0100 Subject: [PATCH] Fix suspend time integrated gpu (BugFix) (#1597) * Use the correct log for the attachment with integrated graphics card * Fixed also for suspend log * replaced jinja templates for if/else statement --- .../base/units/suspend/suspend-graphics.pxu | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/providers/base/units/suspend/suspend-graphics.pxu b/providers/base/units/suspend/suspend-graphics.pxu index 7495dab44..f2d536e20 100644 --- a/providers/base/units/suspend/suspend-graphics.pxu +++ b/providers/base/units/suspend/suspend-graphics.pxu @@ -246,7 +246,14 @@ depends: {%- else %} suspend/suspend_advanced_auto {%- endif %} -command: [ -e "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single.log ] && cat "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single.log +command: + if [ -e "$PLAINBOX_SESSION_SHARE/{{ index }}_suspend_single.log" ]; then + cat "$PLAINBOX_SESSION_SHARE/{{ index }}_suspend_single.log" + elif [ -e "$PLAINBOX_SESSION_SHARE/suspend_single.log" ]; then + cat "$PLAINBOX_SESSION_SHARE/suspend_single.log" + else + echo "No suspend log files found" + fi _purpose: Attaches the log from the single suspend/resume test to the results _summary: Attach log from a single suspend/resume test. @@ -266,7 +273,15 @@ depends: suspend/suspend_advanced_auto {%- endif %} estimated_duration: 1.2 -command: [ -e "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single_times.log +command: + if [ -e "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single_times.log ]; then + sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/{{ index }}_suspend_single_times.log + elif [ -e "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log ]; then + sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log + else + echo "No suspend log files found" + exit 1 + fi _purpose: Checks the sleep times to ensure that a machine suspends and resumes within a given threshold _summary: Verify if the machine meets the suspend and resume time thresholds.