Merge ~liaou3/checkbox-limerick/+git/checkbox-provider-limerick:replace_wol_s3 into ~checkbox-dev/checkbox-limerick/+git/checkbox-provider-limerick:master

Proposed by Vincent Liao
Status: Merged
Approved by: Vincent Liao
Approved revision: 16010e64a1273cdb2fac13bc0c26236d2fa63993
Merged at revision: 643e6573c05c33c92e7eecab8158938a5c8debd6
Proposed branch: ~liaou3/checkbox-limerick/+git/checkbox-provider-limerick:replace_wol_s3
Merge into: ~checkbox-dev/checkbox-limerick/+git/checkbox-provider-limerick:master
Diff against target: 120 lines (+54/-0)
6 files modified
units/ethernet/category.pxu (+3/-0)
units/ethernet/jobs.pxu (+37/-0)
units/ethernet/testplan.pxu (+8/-0)
units/kd240-test-plan-classic.pxu (+2/-0)
units/kr260-test-plan-classic.pxu (+2/-0)
units/kv260-test-plan-classic.pxu (+2/-0)
Reviewer Review Type Date Requested Status
Rick Wu Approve
PeiYao Chang Approve
Weichen Wu Pending
StanleyHuang Pending
Vic Liu Pending
Review via email: mp+463263@code.launchpad.net

Commit message

Replace with new wol_s3 tests

Description of the change

Since to test wol needs pre-setting which is quite annoying, I create a new test with those pre-setting steps run automatically before starting the test.

Submission: https://certification.canonical.com/hardware/202307-31903/submission/362351/

To post a comment you must log in.
Revision history for this message
PeiYao Chang (baconyao) wrote :

See my inline comment

review: Needs Fixing
Revision history for this message
Vincent Liao (liaou3) wrote :

> See my inline comment
Fixed

Revision history for this message
Vincent Liao (liaou3) wrote :

> See my inline comment
Fixed

Revision history for this message
PeiYao Chang (baconyao) wrote :

+1

review: Approve
Revision history for this message
Rick Wu (rickwu4444) wrote :

Please see my inline comment

review: Needs Fixing
Revision history for this message
Rick Wu (rickwu4444) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/ethernet/category.pxu b/units/ethernet/category.pxu
2new file mode 100644
3index 0000000..79c3e2e
4--- /dev/null
5+++ b/units/ethernet/category.pxu
6@@ -0,0 +1,3 @@
7+unit: category
8+id: limerick-ethernet
9+_name: Limerick Ethernet
10diff --git a/units/ethernet/jobs.pxu b/units/ethernet/jobs.pxu
11new file mode 100644
12index 0000000..68fe706
13--- /dev/null
14+++ b/units/ethernet/jobs.pxu
15@@ -0,0 +1,37 @@
16+unit: template
17+template-engine: jinja2
18+template-resource: com.canonical.certification::device
19+template-filter: device.category == 'NETWORK' and device.interface != 'UNKNOWN' # Remove device.mac != 'UNKNOWN', due to LP#2009577
20+template-id: limerick-ethernet/wol_S3_tests
21+_template-summary: Wake on lan testing on Limerick devices
22+id: limerick-ethernet/wol_S3_{{ interface }}
23+_summary: Wake on LAN (WOL) test from S3 - {{ interface }}
24+_purpose:
25+ Check that another system can wake up from S3 the SUT using ethernet port {{ interface }} WOL function.
26+_steps:
27+ 1. Ensure there is an ethernet cable attached to port {{ interface }}.
28+ 2. Press Enter to suspend the system.
29+ 3. From another computer on the same network run the following command:
30+ ping {DUT_IP} -> provided in the job output
31+_verification:
32+ Did the SUT wake up from S3?
33+plugin: user-interact-verify
34+imports:
35+ from com.canonical.certification import sleep
36+requires:
37+ sleep.mem == 'supported'
38+command:
39+ echo "Wake up sources:"
40+ wakeup_sources=$(find /sys/ | grep /power/wakeup\$ | grep {{ interface }})
41+ echo "$wakeup_sources"
42+ for device in $wakeup_sources; do
43+ echo enabled > "$device"
44+ done
45+ echo "Set wol 'a' on {{ interface }}"
46+ ethtool -s {{ interface }} wol a
47+ ip=$(ip -4 addr show {{ interface }} | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
48+ echo "ip: $ip"
49+ systemctl suspend
50+user: root
51+category_id: limerick-ethernet
52+estimated_duration: 60
53diff --git a/units/ethernet/testplan.pxu b/units/ethernet/testplan.pxu
54new file mode 100644
55index 0000000..6609426
56--- /dev/null
57+++ b/units/ethernet/testplan.pxu
58@@ -0,0 +1,8 @@
59+id: limerick-ethernet-manual
60+unit: test plan
61+_name: Limerick Manual Ethernet Tests
62+_description: Manual ethernet test
63+include:
64+ limerick-ethernet/wol_S3_tests
65+bootstrap_include:
66+ com.canonical.certification::device
67diff --git a/units/kd240-test-plan-classic.pxu b/units/kd240-test-plan-classic.pxu
68index f97200a..4d8f524 100644
69--- a/units/kd240-test-plan-classic.pxu
70+++ b/units/kd240-test-plan-classic.pxu
71@@ -27,7 +27,9 @@ nested_part:
72 com.canonical.qa.ceoem::ce-oem-manual
73 com.canonical.certification::client-cert-iot-server-22-04-manual
74 com.canonical.qa.ceoem::after-suspend-ce-oem-manual
75+ limerick-ethernet-manual
76 exclude:
77+ com.canonical.certification::ethernet/wol_S3_.* # LP:1982453 Since wol on limerick devices needs pre-setting, we replace it with limerick-ethernet/wol_S3_.*
78 com.canonical.certification::ethernet/wol_S5_.* # LP:2017481
79 com.canonical.certification::rtc/battery # LP:2017486
80
81diff --git a/units/kr260-test-plan-classic.pxu b/units/kr260-test-plan-classic.pxu
82index 548e239..76688c5 100644
83--- a/units/kr260-test-plan-classic.pxu
84+++ b/units/kr260-test-plan-classic.pxu
85@@ -33,6 +33,7 @@ nested_part:
86 limerick-after-suspend-monitor-manual
87 com.canonical.certification::after-suspend-graphics-integrated-gpu-cert-manual
88 limerick-usb-manual
89+ limerick-ethernet-manual
90 exclude:
91 com.canonical.certification::audio.* # keep if audio is not supported
92 com.canonical.certification::bluetooth.* # keep if bluetooth is not supported
93@@ -57,6 +58,7 @@ exclude:
94 com.canonical.certification::after-suspend.*wwan.* # keep if post-suspend wwan/4G/5G is not supported
95 com.canonical.certification::ethernet/wol_S5_.*
96 com.canonical.certification::ethernet/wol_S4_.*
97+ com.canonical.certification::ethernet/wol_S3_.* # LP:1982453 Since wol on limerick devices needs pre-setting, we replace it with limerick-ethernet/wol_S3_.*
98 com.canonical.certification::graphics/1_glxgears_.*
99 com.canonical.certification::graphics/1_video_.*
100 com.canonical.certification::graphics/1_rotation_.*
101diff --git a/units/kv260-test-plan-classic.pxu b/units/kv260-test-plan-classic.pxu
102index cf58bba..849d63a 100644
103--- a/units/kv260-test-plan-classic.pxu
104+++ b/units/kv260-test-plan-classic.pxu
105@@ -43,6 +43,7 @@ nested_part:
106 limerick-after-suspend-monitor-manual
107 com.canonical.certification::after-suspend-graphics-integrated-gpu-cert-manual
108 limerick-usb-manual
109+ limerick-ethernet-manual
110 exclude:
111 com.canonical.certification::audio.* # keep if audio is not supported
112 com.canonical.certification::bluetooth.* # keep if bluetooth is not supported
113@@ -67,6 +68,7 @@ exclude:
114 com.canonical.certification::after-suspend.*wwan.* # keep if post-suspend wwan/4G/5G is not supported
115 com.canonical.certification::ethernet/wol_S5_.*
116 com.canonical.certification::ethernet/wol_S4_.*
117+ com.canonical.certification::ethernet/wol_S3_.* # LP:1982453 Since wol on limerick devices needs pre-setting, we replace it with limerick-ethernet/wol_S3_.*
118 com.canonical.certification::graphics/1_glxgears_.*
119 com.canonical.certification::graphics/1_video_.*
120 com.canonical.certification::graphics/1_rotation_.*

Subscribers

People subscribed via source and target branches