From 56e3a161a616f3773edd6fe21ce439d1fac5935e Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Wed, 28 Aug 2019 12:31:43 +0200 Subject: suspend_advanced_auto: fallback to rtcwake if fwts s3 is not supported FWTS on arm does not provide the S3 tests. Supported tests: bmc_info, clog, cpu_info, cpufreq, dt_base, dt_sysinfo, klog, maxreadreq, mem_info, mtd_info, olog, oops, power_mgmt, prd_info, reserv_mem, version. --- units/suspend/suspend.pxu | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu index 0c3a9424..35ba417c 100644 --- a/units/suspend/suspend.pxu +++ b/units/suspend/suspend.pxu @@ -268,7 +268,14 @@ command: if [[ -v SNAP ]]; then export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts" fi - set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/suspend_single_times.log + # fwts s3 is not available on all architectures (i.e ARM) + if fwts --show-tests-categories | grep -q 's3 '; then + echo "Calling fwts" + set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/suspend_single_times.log + else + echo "Calling rtcwake" + rtcwake -m mem -s 30 + fi estimated_duration: 90.000 unit: template -- cgit v1.2.3