Skip to content

Commit 2292623

Browse files
author
Satheesh Rajendran
committed
Merge remote-tracking branch 'origin/python3'
Add support for python3 and drop python2.
2 parents df715bd + 9fdb292 commit 2292623

File tree

6 files changed

+163
-163
lines changed

6 files changed

+163
-163
lines changed

README

Lines changed: 107 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,79 @@
11
1. OVERVIEW:
22

33

4-
This repository contains a wrapper script and configuration files to allow the user to set up
5-
the avocado test framework and run a suite of tests to help verify the OpenPOWER Host OS and
6-
Guest Virtual Machine (VM) stability. The tests are integrated into the avocado framework to
7-
increase the overall ease of use and to allow the open source community to easily add and run
4+
This repository contains a wrapper script and configuration files to allow
5+
the user to set up the avocado test framework and run a suite of tests to
6+
help verify the OpenPOWER Host OS and Guest Virtual Machine (VM) stability.
7+
The tests are integrated into the avocado framework to increase the overall
8+
ease of use and to allow the open source community to easily add and run
89
new tests within the suite.
910

10-
See the REFERENCE section below for links to the avocado framework and avocado documentation.
11+
See the REFERENCE section below for links to the avocado framework and
12+
avocado documentation.
1113

1214

1315
2. OPERATING SYSTEM SUPPORT:
1416

15-
A POWER8 bare-metal system running OpenPOWER Host OS is required to execute any test suite in this
16-
repository (Host or Guest tests). Guest test cases were validated against the following ppc64le guests:
17-
- Fedora 23
18-
- Fedora 24
19-
- CentOS 7.2
20-
- CentOS 7.3
21-
22-
Running test cases against other host and guest operating systems may result in unexpected errors.
23-
Proceed at your own risk.
17+
A PowerPC bare-metal system running OpenPOWER Host OS is required to execute
18+
any test suite in this repository (Host or Guest tests). Guest test cases
19+
were validated against the following ppc64le guests:
20+
- RHEL 8.0
21+
- RHEL 7.7
22+
- Fedora 29
23+
Any Operating system that has python3 should be able to run this suite.
2424

2525

2626
3. PREREQUISITES:
2727

28-
The "avocado-setup.py" script must always be run as root or as a user with root privileges
29-
or you risk permission denied errors.
28+
Python3 is installed on the System.
29+
30+
The "avocado-setup.py" script must always be run as root or as a user with
31+
root privileges or you risk permission denied errors.
3032

31-
The script will check your environment for tooling prerequisites and issue a warning/error
32-
if any prerequisites are not installed on the system and cannot be installed automatically.
33+
The script will check your environment for tooling prerequisites and issue
34+
a warning/error if any prerequisites are not installed on the system and
35+
cannot be installed automatically.
3336

3437

3538
GUEST VM INSTALL MANUAL PREREQUISITES:
3639

37-
Before installing the Guest VM ("--install" option used), you must complete the following manual tasks:
40+
Before installing the Guest VM ("--install" option used),
41+
you must complete the following manual tasks:
3842

39-
1) Place the ISO image for the guest OS in the `isos/` folder. The install option
40-
currently supports only the Fedora 23 and 24 OS ISO & guest.
43+
1) Place the ISO image for the guest OS in the `isos/` folder.
4144

4245
Download Fedora images and place them at the expected paths:
43-
>> curl -o isos/Fedora-Server-DVD-ppc64le-23.iso http://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/23/Server/ppc64le/iso/Fedora-Server-DVD-ppc64le-23.iso
44-
>> curl -o isos/Fedora-Server-DVD-ppc64le-24.iso http://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/24/Server/ppc64le/iso/Fedora-Server-dvd-ppc64le-24-1.2.iso
46+
>> curl -o isos/Fedora-Server-DVD-ppc64le-29.iso https://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/29/Server/ppc64le/iso/Fedora-Server-dvd-ppc64le-29-1.2.iso
4547

46-
Make sure you run `python avocado-setup.py --bootstrap` every time a new image is added or updated under `isos/` directory.
47-
Running bootstrap will copy all images to `data/avocado-vt/isos/linux/` directory.
48+
Make sure you run `python avocado-setup.py --bootstrap` every time
49+
a new image is added or updated under `isos/` directory.Running
50+
bootstrap will copy all images to `data/avocado-vt/isos/linux/` directory.
4851

49-
Note: This step is not required for CentOS guest Installation, as it would pick up automatically.
52+
Note: This step is not required for CentOS guest Installation,
53+
as it would pick up automatically.
5054

51-
2) Open firewall ports 8000-8020. They are needed by the avocado test framework
55+
2) Open firewall ports 8000-8020. They are needed by the avocado test framework
5256
to host the kickstart file for the guest using the default bridge network.
5357

54-
Suggested iptables command:
58+
Suggested iptables command:
5559
>> iptables -t filter -I INPUT -p tcp -m state --dport 8000:8020 --state NEW -j ACCEPT
5660

5761

5862
4. "avocado-setup.py" SCRIPT USAGE INFORMATION:
5963

6064

61-
It is highly recommended for users to execute the following command as root when running the
62-
test suite for the first time or you risk permission denied errors. See the below information
65+
It is highly recommended for users to execute the following command as root
66+
when running the test suite for the first time or you risk permission denied
67+
errors. See the below information
6368
for details:
64-
>> python avocado-setup.py --run-suite host_sanity,guest_short_sanity --install
69+
>> ./avocado-setup.py --run-suite host_sanity,guest_short_sanity --install
6570

6671

67-
python avocado-setup.py [-h] [--bootstrap] [--run-suite RUN_SUITE]
68-
[--output-dir OUTPUTDIR] [--verbose]
69-
[--only-filter ONLY_FILTER] [--no-filter NO_FILTER]
70-
[--additional-args ADD_ARGS] [--guest-os GUEST_OS]
71-
[--vt VT_TYPE] [--install]
72+
./avocado-setup.py [-h] [--bootstrap] [--run-suite RUN_SUITE]
73+
[--output-dir OUTPUTDIR] [--verbose]
74+
[--only-filter ONLY_FILTER] [--no-filter NO_FILTER]
75+
[--additional-args ADD_ARGS] [--guest-os GUEST_OS]
76+
[--vt VT_TYPE] [--install]
7277

7378
OPTIONAL ARGUMENTS:
7479

@@ -94,12 +99,15 @@
9499
ARGUMENT DETAILS:
95100

96101
--bootstrap
97-
Use this option to bootstrap the environment so that all of the required repositories
102+
Use this option to bootstrap the environment so that all of the required repositories
98103
(avocado, avocado-vt, avocado-misc-tests) are downloaded, installed, and configured.
99104

100105

101-
Example command to bootstrap the test suite:
102-
>> python avocado-setup.py --bootstrap
106+
Example command to bootstrap the test suite with only host tests.
107+
>> ./avocado-setup.py --bootstrap
108+
109+
Example command to bootstrap the test suite with guests tests.
110+
>> ./avocado-setup.py --bootstrap --enable-kvm
103111

104112

105113
--run-suite RUN_SUITE
@@ -116,8 +124,8 @@
116124
the Avocado Test Framework "avocado-misc-tests"
117125
repository.
118126

119-
Example command to run the preconfigured Host OS test suite only:
120-
>> python avocado-setup.py --run-suite host_sanity
127+
Example command to run the preconfigured Host OS test suite only:
128+
>> ./avocado-setup.py --run-suite host_sanity
121129

122130

123131
guest_sanity --> Uses the preconfigured file:
@@ -128,9 +136,9 @@
128136
hours to complete. The "variants:" section of the
129137
config file shows which commands are tested.
130138

131-
Example command to install a new Guest VM and run the preconfigured full
132-
guest test suite against it:
133-
>> python avocado-setup.py --run-suite guest_sanity --install
139+
Example command to install a new Guest VM and run the preconfigured full
140+
guest test suite against it:
141+
>> ./avocado-setup.py --run-suite guest_sanity --install
134142

135143

136144
guest_short_sanity --> Uses the preconfigured file:
@@ -141,9 +149,9 @@
141149
complete. The "variants:" section of the config
142150
file shows which commands are tested.
143151

144-
Example command to install a new Guest VM and run the preconfigured short
145-
guest test suite against it:
146-
>> python avocado-setup.py --run-suite guest_short_sanity --install
152+
Example command to install a new Guest VM and run the preconfigured short
153+
guest test suite against it:
154+
>> ./avocado-setup.py --run-suite guest_short_sanity --install
147155

148156

149157
--output-dir
@@ -152,9 +160,9 @@
152160

153161
Example command to run the host and guest test suite and output the test results to the
154162
/tmp folder:
155-
>> python avocado-setup.py --run-suite guest_sanity,host_sanity --output-dir /tmp
163+
>> ./avocado-setup.py --run-suite guest_sanity,host_sanity --output-dir /tmp
156164

157-
NOTE: The avocado-setup.py log will always be generated at
165+
NOTE: The avocado-setup.py log will always be generated at
158166
/current_run_path/avocado-wrapper.log
159167

160168

@@ -179,37 +187,37 @@
179187
--verbose
180188
Use this option to display test verbose output on the console.
181189

182-
Example command to install a new guest VM, run the full host & guest test suites, and
183-
display verbose output on the console:
184-
>> python avocado-setup.py --run-suite guest_sanity,host_sanity --install --verbose
190+
Example command to install a new guest VM, run the full host & guest test suites, and
191+
display verbose output on the console:
192+
>> ./avocado-setup.py --run-suite guest_sanity,host_sanity --install --verbose
185193

186194

187195
--only-filter
188-
Use this option to add additional specific avocado tests or features to the guest test suite.
189-
This filter option is for advanced users of the avocado test framework who want to
190-
temporarily adjust the tests being run without having to create or change configuration
196+
Use this option to add additional specific avocado tests or features to the guest test suite.
197+
This filter option is for advanced users of the avocado test framework who want to
198+
temporarily adjust the tests being run without having to create or change configuration
191199
files.
192200

193-
Example command to run the host & guest test suites and add "scsi virtio_net" filter to
194-
the guest test suite:
195-
>> python avocado-setup.py --run-suite guest_sanity,host_sanity --install --only-filter "scsi virtio_net"
201+
Example command to run the host & guest test suites and add "scsi virtio_net" filter to
202+
the guest test suite:
203+
>> ./avocado-setup.py --run-suite guest_sanity,host_sanity --install --only-filter "scsi virtio_net"
196204

197-
IMPORTANT: Ensure you do not include a filter in the command that is a duplicate of a filter
198-
in the guest test suite being run. This could cause avocado test errors.
205+
IMPORTANT: Ensure you do not include a filter in the command that is a duplicate of a filter
206+
in the guest test suite being run. This could cause avocado test errors.
199207

200208

201209
--no-filter
202-
Use this option to remove specific avocado tests or features from the guest test suite.
203-
This filter option is for advanced users of the avocado test framework who want to
204-
temporarily adjust the tests being run without having to create or change configuration
210+
Use this option to remove specific avocado tests or features from the guest test suite.
211+
This filter option is for advanced users of the avocado test framework who want to
212+
temporarily adjust the tests being run without having to create or change configuration
205213
files.
206214

207-
Example command to run the host & guest test suites and remove the "scsi virtio_net" filter
208-
from the guest test suite:
215+
Example command to run the host & guest test suites and remove the "scsi virtio_net" filter
216+
from the guest test suite:
209217
>> python avocado-setup.py --run-suite guest_sanity,host_sanity --install --no-filter "scsi virtio_net"
210218

211-
IMPORTANT: Ensure you do not include a filter in the command that is a duplicate of a filter
212-
in the guest test suite being run. This could cause avocado test errors.
219+
IMPORTANT: Ensure you do not include a filter in the command that is a duplicate of a filter
220+
in the guest test suite being run. This could cause avocado test errors.
213221

214222

215223
--additional-args
@@ -222,63 +230,64 @@
222230

223231
--guest-os
224232
Use this option to specify the guest os for the guest tests to run against.
225-
By default, the value is Fedora.24.ppc64le.
226-
Supported Guests: Fedora.24.ppc64le, Fedora.23.ppc64le, CentOS.7.2.ppc64le
227-
228-
IMPORTANT: It is highly recommended that you only specify a guest os from the list
229-
of supported guest vm's in the above Operating System Support section.
233+
By default, the value is JeOS.27.ppc64le.
234+
Supported Guests: JeOS.27.ppc64le, Fedora.29.ppc64le etc.,
230235

231236

232237
--vt {qemu or libvirt}
233-
Use this option to choose either the libvirt or qemu folder when guest_sanity
238+
Use this option to choose either the libvirt or qemu folder when guest_sanity
234239
is the RUN_SUITE value. By default, the libvirt folder is used.
235240

236241

237242
--install
238-
Use this option to install the guest VM before or during the first time that you
239-
run any guest test suite. Advanced avocado users may install their guest vm
243+
Use this option to install the guest VM before or during the first time that you
244+
run any guest test suite. Advanced avocado users may install their guest VM
240245
separately, but the install must follow the strict avocado configuration rules.
241-
246+
242247

243248
IMPORTANT: Complete all Guest VM Install prerequisites listed in the Prerequisites
244249
section above BEFORE running this script with the "--install" option.
245-
246-
250+
251+
247252
--no-download
248-
Use this option to skip the guest image download. This helps to save time when you are
249-
using an already preinstalled guest image.
250-
251-
253+
Use this option to skip the guest image download. This helps to save time when you are
254+
using an already pre-installed guest VM image.
255+
256+
252257
--no-deps-check
253-
Force wrapper to skip check for dependancy packages. This helps to save time when re-running
258+
Force wrapper to skip check for dependancy packages. This helps to save time when re-running
254259
tests on a system where prereqs have already been checked once.
255-
256-
260+
261+
257262
--clean
258-
Remove/Uninstall autotest and avocado from system after test completion.
263+
Remove/Uninstall autotest and avocado from system after test completion.
264+
265+
--enable-kvm
266+
By default kvm(guest VM) tests environment is not bootstrapped, enable this flag
267+
to bootstrap kvm(guest VM) tests.
259268

260269

261270
5. CUSTOMIZING TEST SUITES
262271

263-
The Host and Guest sanity suites were created to include a varied collection of tests to validate new Host OS installations.
272+
The Host and Guest sanity suites were created to include a varied collection of tests to validate new Host OS installations.
264273
There are additional tests that were not included in the sanity suites that users can optionally add if they wish.
265-
274+
266275
Adding Guest Sanity Tests:
267276
You must be a proficient/advanced Avocado test suite user to correctly customize the Guest sanity suites since the syntax of these
268277
configuration files is very specific.
269-
278+
270279
Adding Host Sanity Tests:
271-
The Host sanity tests are listed in the config/tests/host/sanity.cfg file in this repository. These are tests used directly
272-
from the avocado-misc-tests respository (see link in the REFERNCE LINKS section below). If you want to run additional
273-
tests from this repository, simply add a new line in the sanity.cfg file with the location of the file within the
280+
The Host sanity tests are listed in the config/tests/host/sanity.cfg file in this repository. These are tests used directly
281+
from the avocado-misc-tests respository (see link in the REFERENCE LINKS section below). If you want to run additional
282+
tests from this repository, simply add a new line in the sanity.cfg file with the location of the file within the
274283
avocado-misc-tests repository.
275-
276-
For Example:
277-
- A user wishes to run ras.py test in the generic folder of the avocado-misc-tests repository. The purpose of this
278-
test is documented within the file itself.
284+
285+
For Example:
286+
- A user wishes to run ras.py test in the generic folder of the avocado-misc-tests repository. The purpose of this
287+
test is documented within the file itself.
279288
- The exact location of this test in the repository is "generic/ras.py".
280289
- The user downloads this tests repository onto their system and edits the config/tests/host/sanity.cfg file.
281-
- The user adds a line "avocado-misc-tests/generic/ras.py" (without the quotes) to the end of the config/tests/host/sanity.cfg
290+
- The user adds a line "avocado-misc-tests/generic/ras.py" (without the quotes) to the end of the config/tests/host/sanity.cfg
282291
file in this tests repository and saves the file.
283292
- The user runs the host_sanity suite using the avocado-setup.py script explained in Section 4 above.
284293
- If the user wishes to run a test with yaml file inputs, the yaml file can be specified in the same line in the cfg file,
@@ -294,7 +303,7 @@
294303
we have a provision to mention such tests to not run.
295304
Please have a look at "config/wrapper/no_run_test.conf"
296305

297-
306+
298307
7. REFERENCE LINKS
299308

300309
Avocado Test Framework repositories on GitHub:

0 commit comments

Comments
 (0)