Merge lp:~cypressyew/checkbox/fwts-hwe-test into lp:checkbox

Proposed by Po-Hsu Lin
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 3973
Merged at revision: 3980
Proposed branch: lp:~cypressyew/checkbox/fwts-hwe-test
Merge into: lp:checkbox
Diff against target: 166 lines (+59/-31)
2 files modified
providers/plainbox-provider-checkbox/bin/fwts_test (+41/-26)
providers/plainbox-provider-checkbox/jobs/firmware.txt.in (+18/-5)
To merge this branch: bzr merge lp:~cypressyew/checkbox/fwts-hwe-test
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Jeff Lane  Approve
Review via email: mp+269711@code.launchpad.net

Description of the change

Pull the HWE tests out of the CERT tests into a stand-alone list with an --hwe option to trigger it.
And call the remaining CERT tests as "QA" tests, with --qa option.
(CERT = HWE + QA)

We could run the fwts tests for QA and HWE individually, so that we can know which one is failing.

Now it won't split log for hwe, as we can explicitly assign the test and the log filename. e.g.
fwts --hwe -l fwts_result_hwe.log
fwts --qa -l fwts_result.log

For server, if we don't need to split the extra hwe log, we can simply run:
fwts -l fwts_result.log

This require further changes in test plans.

To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

Quick look and it looks good to me. Thanks for re-working this based on my comments about splitting the test lists out rather than the logs. Still needs Sylvain to ack, but I +1.

review: Approve
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Tanks for the feedback Jeff, +1 from me too

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'providers/plainbox-provider-checkbox/bin/fwts_test'
2--- providers/plainbox-provider-checkbox/bin/fwts_test 2015-08-26 08:01:19 +0000
3+++ providers/plainbox-provider-checkbox/bin/fwts_test 2015-09-01 09:46:27 +0000
4@@ -18,26 +18,20 @@
5 'power_button',
6 'brightness',
7 'lid']
8-# These are usually performed on normal certification runs
9-CERT_TESTS = ['acpitests',
10- 'acpidump',
11- 'acpitables',
12- 'apicedge',
13- 'apicinstance',
14- 'aspm',
15- 'bios32',
16- 'dmicheck',
17- 'ebda',
18- 'klog',
19- 'mpcheck',
20- 'msr',
21- 'mtrr',
22- 'nx',
23- 'oops',
24- 'uefibootpath',
25- 'uefirtvariable',
26- 'version',
27- 'virt']
28+# These are performed on QA certification runs
29+QA_TESTS = ['acpitests',
30+ 'acpidump',
31+ 'acpitables',
32+ 'apicinstance',
33+ 'aspm',
34+ 'bios32',
35+ 'dmicheck',
36+ 'ebda',
37+ 'mpcheck',
38+ 'msr',
39+ 'nx',
40+ 'uefirtvariable',
41+ 'version']
42 # These are advanced tests that shouldn't affect certification status
43 NON_CERT_TESTS = ['bios_info',
44 'cmosdump',
45@@ -67,8 +61,6 @@
46 'uefirttime',
47 'uefivarinfo'
48 ]
49-TESTS = sorted(CERT_TESTS + NON_CERT_TESTS)
50-
51 # The following tests will record logs in a separate file for the HWE team
52 HWE_TESTS = ['mtrr',
53 'virt',
54@@ -76,6 +68,9 @@
55 'klog',
56 'oops',
57 'uefibootpath']
58+CERT_TESTS = sorted(QA_TESTS + HWE_TESTS)
59+TESTS = sorted(QA_TESTS + NON_CERT_TESTS + HWE_TESTS)
60+
61
62 def get_sleep_times(start_marker, end_marker, sleep_time, resume_time):
63 logfile = '/var/log/syslog'
64@@ -166,10 +161,10 @@
65 '--s3-quirks\n'
66 '--s3-sleep-delay\n'
67 '--s3power-sleep-delay\n\n'
68- 'Example: fwts-test --sleep s3 --s3-min-delay 30 '
69+ 'Example: fwts_test --sleep s3 --s3-min-delay 30 '
70 '--s3-multiple 10 --s3-device-check\n\n'
71 'For further help with sleep options:\n'
72- 'fwts-test --fwts-help')
73+ 'fwts_test --fwts-help')
74 parser = ArgumentParser(description=description_text,
75 epilog=epilog_text,
76 formatter_class=RawTextHelpFormatter)
77@@ -226,6 +221,12 @@
78 'For info on these extra fwts options, please \n'
79 'see the epilog below and \n'
80 'the --fwts-help option.'))
81+ group.add_argument('--hwe',
82+ action='store_true',
83+ help='Run HWE concerned tests in fwts')
84+ group.add_argument('--qa',
85+ action='store_true',
86+ help='Run QA concerned tests in fwts')
87 group.add_argument('--fwts-help',
88 dest='fwts_help',
89 action='store_true',
90@@ -239,6 +240,12 @@
91 group.add_argument('--list-advanced',
92 action='store_true',
93 help='List all advanced tests in fwts.')
94+ group.add_argument('--list-hwe',
95+ action='store_true',
96+ help='List all HWE concerned tests in fwts')
97+ group.add_argument('--list-qa',
98+ action='store_true',
99+ help='List all QA concerned tests in fwts')
100 args = parser.parse_args()
101
102 tests = []
103@@ -279,10 +286,20 @@
104 elif args.list_advanced:
105 print('\n'.join(NON_CERT_TESTS))
106 return 0
107+ elif args.list_hwe:
108+ print('\n'.join(HWE_TESTS))
109+ return 0
110+ elif args.list_qa:
111+ print('\n'.join(QA_TESTS))
112+ return 0
113 elif args.test:
114 tests.extend(args.test)
115 elif args.all:
116 tests.extend(['wakealarm', 'cpufreq', 'maxfreq'] + TESTS)
117+ elif args.hwe:
118+ tests.extend(HWE_TESTS)
119+ elif args.qa:
120+ tests.extend(QA_TESTS)
121 elif args.sleep:
122 args.sleep = fix_sleep_args(args.sleep)
123 iterations = 1
124@@ -382,8 +399,6 @@
125 # ACPI tests can now be run with --acpitests (fwts >= 15.07.00)
126 log = args.log
127 # Split the log file for HWE (only if -t is not used)
128- if not args.test and test in HWE_TESTS:
129- log = log.replace('.log', '_hwe.log')
130 if test == 'acpitests':
131 test = '--acpitests'
132 command = ('fwts -q --stdout-summary -r %s %s'
133
134=== modified file 'providers/plainbox-provider-checkbox/jobs/firmware.txt.in'
135--- providers/plainbox-provider-checkbox/jobs/firmware.txt.in 2015-08-10 17:51:39 +0000
136+++ providers/plainbox-provider-checkbox/jobs/firmware.txt.in 2015-09-01 09:46:27 +0000
137@@ -41,11 +41,24 @@
138 package.name == 'fwts'
139 user: root
140 _description:
141- Run Firmware Test Suite (fwts) desktop-specific diagnosis tests.
142-_summary: Run FWTS desktop-specific diagnosis tests.
143-environ: PLAINBOX_SESSION_SHARE
144-command:
145- fwts_test -l $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results.log
146+ Run Firmware Test Suite (fwts) QA-concerned desktop-specific diagnosis tests.
147+_summary: Run FWTS QA-concerned desktop-specific diagnosis tests.
148+environ: PLAINBOX_SESSION_SHARE
149+command:
150+ fwts_test --qa -l $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results.log
151+
152+plugin:shell
153+id: firmware/fwts_desktop_diagnosis_hwe
154+estimated_duration: 5.0
155+requires:
156+ package.name == 'fwts'
157+user: root
158+_description:
159+ Run Firmware Test Suite (fwts) HWE-concerned desktop-specific diagnosis tests.
160+_summary: Run FWTS HWE-concerned desktop-specific diagnosis tests.
161+environ: PLAINBOX_SESSION_SHARE
162+command:
163+ fwts_test --hwe -l $PLAINBOX_SESSION_SHARE/fwts_desktop_diagnosis_results_hwe.log
164
165 plugin: attachment
166 estimated_duration: 0.5

Subscribers

People subscribed via source and target branches