Merge ~kevinyeh/plainbox-provider-checkbox:update-suspend-manual-test into plainbox-provider-checkbox:master

Proposed by Kevin Yeh
Status: Merged
Approved by: Kevin Yeh
Approved revision: 63330119010f87f1d165a9edf5f9f385f8122d9d
Merged at revision: f989b2d55323733570a8aeaba76f9b6244ad6127
Proposed branch: ~kevinyeh/plainbox-provider-checkbox:update-suspend-manual-test
Merge into: plainbox-provider-checkbox:master
Diff against target: 40 lines (+18/-8)
1 file modified
units/suspend/suspend.pxu (+18/-8)
Reviewer Review Type Date Requested Status
Sylvain Pineau Approve
Review via email: mp+410584@code.launchpad.net

Commit message

some architectures don't support fwts s3 while manual test, copy from suspend_advance_auto part that if DUT doesn't support fwts s3, use rtcwake instead.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

LGTM, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu
2index cc5414d..8c25a91 100644
3--- a/units/suspend/suspend.pxu
4+++ b/units/suspend/suspend.pxu
5@@ -189,17 +189,27 @@ requires:
6 sleep.mem == 'supported'
7 rtc.state == 'supported'
8 user: root
9-environ: PLAINBOX_SESSION_SHARE
10+environ: PLAINBOX_SESSION_SHARE RTC_DEVICE_FILE
11 command:
12 if type -P fwts >/dev/null; then
13- echo "Calling fwts"
14- if [[ -v SNAP ]]; then
15- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
16- fi
17- 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
18+ echo "Calling fwts"
19+ if [[ -v SNAP ]]; then
20+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts"
21+ fi
22+ if fwts --show-tests-categories | grep -q 's3 '; then
23+ echo "Calling fwts"
24+ 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
25+ else
26+ echo "Calling rtcwake"
27+ if [ -z "$RTC_DEVICE_FILE" ]; then
28+ rtcwake -m mem -s 30
29+ else
30+ rtcwake -d "$RTC_DEVICE_FILE" -m mem -s 30
31+ fi
32+ fi
33 else
34- echo "Calling sleep_test.py"
35- set -o pipefail; sleep_test.py -p | tee "$PLAINBOX_SESSION_SHARE"/2_suspend_single_times.log
36+ echo "Calling sleep_test.py"
37+ set -o pipefail; sleep_test.py -p | tee "$PLAINBOX_SESSION_SHARE"/2_suspend_single_times.log
38 fi
39 estimated_duration: 90.0
40 _summary: Manual test of suspend function

Subscribers

People subscribed via source and target branches