|
1 | 1 | 1. OVERVIEW: |
2 | 2 |
|
3 | 3 |
|
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 |
8 | 9 | new tests within the suite. |
9 | 10 |
|
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. |
11 | 13 |
|
12 | 14 |
|
13 | 15 | 2. OPERATING SYSTEM SUPPORT: |
14 | 16 |
|
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. |
24 | 24 |
|
25 | 25 |
|
26 | 26 | 3. PREREQUISITES: |
27 | 27 |
|
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. |
30 | 32 |
|
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. |
33 | 36 |
|
34 | 37 |
|
35 | 38 | GUEST VM INSTALL MANUAL PREREQUISITES: |
36 | 39 |
|
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: |
38 | 42 |
|
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. |
41 | 44 |
|
42 | 45 | 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 |
45 | 47 |
|
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. |
48 | 51 |
|
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. |
50 | 54 |
|
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 |
52 | 56 | to host the kickstart file for the guest using the default bridge network. |
53 | 57 |
|
54 | | - Suggested iptables command: |
| 58 | + Suggested iptables command: |
55 | 59 | >> iptables -t filter -I INPUT -p tcp -m state --dport 8000:8020 --state NEW -j ACCEPT |
56 | 60 |
|
57 | 61 |
|
58 | 62 | 4. "avocado-setup.py" SCRIPT USAGE INFORMATION: |
59 | 63 |
|
60 | 64 |
|
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 |
63 | 68 | 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 |
65 | 70 |
|
66 | 71 |
|
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] |
72 | 77 |
|
73 | 78 | OPTIONAL ARGUMENTS: |
74 | 79 |
|
|
94 | 99 | ARGUMENT DETAILS: |
95 | 100 |
|
96 | 101 | --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 |
98 | 103 | (avocado, avocado-vt, avocado-misc-tests) are downloaded, installed, and configured. |
99 | 104 |
|
100 | 105 |
|
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 |
103 | 111 |
|
104 | 112 |
|
105 | 113 | --run-suite RUN_SUITE |
|
116 | 124 | the Avocado Test Framework "avocado-misc-tests" |
117 | 125 | repository. |
118 | 126 |
|
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 |
121 | 129 |
|
122 | 130 |
|
123 | 131 | guest_sanity --> Uses the preconfigured file: |
|
128 | 136 | hours to complete. The "variants:" section of the |
129 | 137 | config file shows which commands are tested. |
130 | 138 |
|
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 |
134 | 142 |
|
135 | 143 |
|
136 | 144 | guest_short_sanity --> Uses the preconfigured file: |
|
141 | 149 | complete. The "variants:" section of the config |
142 | 150 | file shows which commands are tested. |
143 | 151 |
|
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 |
147 | 155 |
|
148 | 156 |
|
149 | 157 | --output-dir |
|
152 | 160 |
|
153 | 161 | Example command to run the host and guest test suite and output the test results to the |
154 | 162 | /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 |
156 | 164 |
|
157 | | - NOTE: The avocado-setup.py log will always be generated at |
| 165 | + NOTE: The avocado-setup.py log will always be generated at |
158 | 166 | /current_run_path/avocado-wrapper.log |
159 | 167 |
|
160 | 168 |
|
|
179 | 187 | --verbose |
180 | 188 | Use this option to display test verbose output on the console. |
181 | 189 |
|
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 |
185 | 193 |
|
186 | 194 |
|
187 | 195 | --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 |
191 | 199 | files. |
192 | 200 |
|
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" |
196 | 204 |
|
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. |
199 | 207 |
|
200 | 208 |
|
201 | 209 | --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 |
205 | 213 | files. |
206 | 214 |
|
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: |
209 | 217 | >> python avocado-setup.py --run-suite guest_sanity,host_sanity --install --no-filter "scsi virtio_net" |
210 | 218 |
|
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. |
213 | 221 |
|
214 | 222 |
|
215 | 223 | --additional-args |
|
222 | 230 |
|
223 | 231 | --guest-os |
224 | 232 | 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., |
230 | 235 |
|
231 | 236 |
|
232 | 237 | --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 |
234 | 239 | is the RUN_SUITE value. By default, the libvirt folder is used. |
235 | 240 |
|
236 | 241 |
|
237 | 242 | --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 |
240 | 245 | separately, but the install must follow the strict avocado configuration rules. |
241 | | - |
| 246 | + |
242 | 247 |
|
243 | 248 | IMPORTANT: Complete all Guest VM Install prerequisites listed in the Prerequisites |
244 | 249 | section above BEFORE running this script with the "--install" option. |
245 | | - |
246 | | - |
| 250 | + |
| 251 | + |
247 | 252 | --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 | + |
252 | 257 | --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 |
254 | 259 | tests on a system where prereqs have already been checked once. |
255 | | - |
256 | | - |
| 260 | + |
| 261 | + |
257 | 262 | --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. |
259 | 268 |
|
260 | 269 |
|
261 | 270 | 5. CUSTOMIZING TEST SUITES |
262 | 271 |
|
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. |
264 | 273 | There are additional tests that were not included in the sanity suites that users can optionally add if they wish. |
265 | | - |
| 274 | + |
266 | 275 | Adding Guest Sanity Tests: |
267 | 276 | You must be a proficient/advanced Avocado test suite user to correctly customize the Guest sanity suites since the syntax of these |
268 | 277 | configuration files is very specific. |
269 | | - |
| 278 | + |
270 | 279 | 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 |
274 | 283 | 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. |
279 | 288 | - The exact location of this test in the repository is "generic/ras.py". |
280 | 289 | - 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 |
282 | 291 | file in this tests repository and saves the file. |
283 | 292 | - The user runs the host_sanity suite using the avocado-setup.py script explained in Section 4 above. |
284 | 293 | - 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 | 303 | we have a provision to mention such tests to not run. |
295 | 304 | Please have a look at "config/wrapper/no_run_test.conf" |
296 | 305 |
|
297 | | - |
| 306 | + |
298 | 307 | 7. REFERENCE LINKS |
299 | 308 |
|
300 | 309 | Avocado Test Framework repositories on GitHub: |
|
0 commit comments