Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/python3'
Browse files Browse the repository at this point in the history
Add support for python3 and drop python2.
  • Loading branch information
Satheesh Rajendran committed Sep 25, 2019
2 parents df715bd + 9fdb292 commit 2292623
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 163 deletions.
205 changes: 107 additions & 98 deletions README
Original file line number Diff line number Diff line change
@@ -1,74 +1,79 @@
1. OVERVIEW:


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

See the REFERENCE section below for links to the avocado framework and avocado documentation.
See the REFERENCE section below for links to the avocado framework and
avocado documentation.


2. OPERATING SYSTEM SUPPORT:

A POWER8 bare-metal system running OpenPOWER Host OS is required to execute any test suite in this
repository (Host or Guest tests). Guest test cases were validated against the following ppc64le guests:
- Fedora 23
- Fedora 24
- CentOS 7.2
- CentOS 7.3

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


3. PREREQUISITES:

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

The "avocado-setup.py" script must always be run as root or as a user with
root privileges or you risk permission denied errors.

The script will check your environment for tooling prerequisites and issue a warning/error
if any prerequisites are not installed on the system and cannot be installed automatically.
The script will check your environment for tooling prerequisites and issue
a warning/error if any prerequisites are not installed on the system and
cannot be installed automatically.


GUEST VM INSTALL MANUAL PREREQUISITES:

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

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

Download Fedora images and place them at the expected paths:
>> 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
>> 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
>> 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

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

Note: This step is not required for CentOS guest Installation, as it would pick up automatically.
Note: This step is not required for CentOS guest Installation,
as it would pick up automatically.

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

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


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


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


python avocado-setup.py [-h] [--bootstrap] [--run-suite RUN_SUITE]
[--output-dir OUTPUTDIR] [--verbose]
[--only-filter ONLY_FILTER] [--no-filter NO_FILTER]
[--additional-args ADD_ARGS] [--guest-os GUEST_OS]
[--vt VT_TYPE] [--install]
./avocado-setup.py [-h] [--bootstrap] [--run-suite RUN_SUITE]
[--output-dir OUTPUTDIR] [--verbose]
[--only-filter ONLY_FILTER] [--no-filter NO_FILTER]
[--additional-args ADD_ARGS] [--guest-os GUEST_OS]
[--vt VT_TYPE] [--install]

OPTIONAL ARGUMENTS:

Expand All @@ -94,12 +99,15 @@
ARGUMENT DETAILS:

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


Example command to bootstrap the test suite:
>> python avocado-setup.py --bootstrap
Example command to bootstrap the test suite with only host tests.
>> ./avocado-setup.py --bootstrap

Example command to bootstrap the test suite with guests tests.
>> ./avocado-setup.py --bootstrap --enable-kvm


--run-suite RUN_SUITE
Expand All @@ -116,8 +124,8 @@
the Avocado Test Framework "avocado-misc-tests"
repository.

Example command to run the preconfigured Host OS test suite only:
>> python avocado-setup.py --run-suite host_sanity
Example command to run the preconfigured Host OS test suite only:
>> ./avocado-setup.py --run-suite host_sanity


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

Example command to install a new Guest VM and run the preconfigured full
guest test suite against it:
>> python avocado-setup.py --run-suite guest_sanity --install
Example command to install a new Guest VM and run the preconfigured full
guest test suite against it:
>> ./avocado-setup.py --run-suite guest_sanity --install


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

Example command to install a new Guest VM and run the preconfigured short
guest test suite against it:
>> python avocado-setup.py --run-suite guest_short_sanity --install
Example command to install a new Guest VM and run the preconfigured short
guest test suite against it:
>> ./avocado-setup.py --run-suite guest_short_sanity --install


--output-dir
Expand All @@ -152,9 +160,9 @@

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

NOTE: The avocado-setup.py log will always be generated at
NOTE: The avocado-setup.py log will always be generated at
/current_run_path/avocado-wrapper.log


Expand All @@ -179,37 +187,37 @@
--verbose
Use this option to display test verbose output on the console.

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


--only-filter
Use this option to add additional specific avocado tests or features to the guest test suite.
This filter option is for advanced users of the avocado test framework who want to
temporarily adjust the tests being run without having to create or change configuration
Use this option to add additional specific avocado tests or features to the guest test suite.
This filter option is for advanced users of the avocado test framework who want to
temporarily adjust the tests being run without having to create or change configuration
files.

Example command to run the host & guest test suites and add "scsi virtio_net" filter to
the guest test suite:
>> python avocado-setup.py --run-suite guest_sanity,host_sanity --install --only-filter "scsi virtio_net"
Example command to run the host & guest test suites and add "scsi virtio_net" filter to
the guest test suite:
>> ./avocado-setup.py --run-suite guest_sanity,host_sanity --install --only-filter "scsi virtio_net"

IMPORTANT: Ensure you do not include a filter in the command that is a duplicate of a filter
in the guest test suite being run. This could cause avocado test errors.
IMPORTANT: Ensure you do not include a filter in the command that is a duplicate of a filter
in the guest test suite being run. This could cause avocado test errors.


--no-filter
Use this option to remove specific avocado tests or features from the guest test suite.
This filter option is for advanced users of the avocado test framework who want to
temporarily adjust the tests being run without having to create or change configuration
Use this option to remove specific avocado tests or features from the guest test suite.
This filter option is for advanced users of the avocado test framework who want to
temporarily adjust the tests being run without having to create or change configuration
files.

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

IMPORTANT: Ensure you do not include a filter in the command that is a duplicate of a filter
in the guest test suite being run. This could cause avocado test errors.
IMPORTANT: Ensure you do not include a filter in the command that is a duplicate of a filter
in the guest test suite being run. This could cause avocado test errors.


--additional-args
Expand All @@ -222,63 +230,64 @@

--guest-os
Use this option to specify the guest os for the guest tests to run against.
By default, the value is Fedora.24.ppc64le.
Supported Guests: Fedora.24.ppc64le, Fedora.23.ppc64le, CentOS.7.2.ppc64le

IMPORTANT: It is highly recommended that you only specify a guest os from the list
of supported guest vm's in the above Operating System Support section.
By default, the value is JeOS.27.ppc64le.
Supported Guests: JeOS.27.ppc64le, Fedora.29.ppc64le etc.,


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


--install
Use this option to install the guest VM before or during the first time that you
run any guest test suite. Advanced avocado users may install their guest vm
Use this option to install the guest VM before or during the first time that you
run any guest test suite. Advanced avocado users may install their guest VM
separately, but the install must follow the strict avocado configuration rules.


IMPORTANT: Complete all Guest VM Install prerequisites listed in the Prerequisites
section above BEFORE running this script with the "--install" option.


--no-download
Use this option to skip the guest image download. This helps to save time when you are
using an already preinstalled guest image.
Use this option to skip the guest image download. This helps to save time when you are
using an already pre-installed guest VM image.


--no-deps-check
Force wrapper to skip check for dependancy packages. This helps to save time when re-running
Force wrapper to skip check for dependancy packages. This helps to save time when re-running
tests on a system where prereqs have already been checked once.


--clean
Remove/Uninstall autotest and avocado from system after test completion.
Remove/Uninstall autotest and avocado from system after test completion.

--enable-kvm
By default kvm(guest VM) tests environment is not bootstrapped, enable this flag
to bootstrap kvm(guest VM) tests.


5. CUSTOMIZING TEST SUITES

The Host and Guest sanity suites were created to include a varied collection of tests to validate new Host OS installations.
The Host and Guest sanity suites were created to include a varied collection of tests to validate new Host OS installations.
There are additional tests that were not included in the sanity suites that users can optionally add if they wish.

Adding Guest Sanity Tests:
You must be a proficient/advanced Avocado test suite user to correctly customize the Guest sanity suites since the syntax of these
configuration files is very specific.

Adding Host Sanity Tests:
The Host sanity tests are listed in the config/tests/host/sanity.cfg file in this repository. These are tests used directly
from the avocado-misc-tests respository (see link in the REFERNCE LINKS section below). If you want to run additional
tests from this repository, simply add a new line in the sanity.cfg file with the location of the file within the
The Host sanity tests are listed in the config/tests/host/sanity.cfg file in this repository. These are tests used directly
from the avocado-misc-tests respository (see link in the REFERENCE LINKS section below). If you want to run additional
tests from this repository, simply add a new line in the sanity.cfg file with the location of the file within the
avocado-misc-tests repository.
For Example:
- A user wishes to run ras.py test in the generic folder of the avocado-misc-tests repository. The purpose of this
test is documented within the file itself.

For Example:
- A user wishes to run ras.py test in the generic folder of the avocado-misc-tests repository. The purpose of this
test is documented within the file itself.
- The exact location of this test in the repository is "generic/ras.py".
- The user downloads this tests repository onto their system and edits the config/tests/host/sanity.cfg file.
- The user adds a line "avocado-misc-tests/generic/ras.py" (without the quotes) to the end of the config/tests/host/sanity.cfg
- The user adds a line "avocado-misc-tests/generic/ras.py" (without the quotes) to the end of the config/tests/host/sanity.cfg
file in this tests repository and saves the file.
- The user runs the host_sanity suite using the avocado-setup.py script explained in Section 4 above.
- 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,
Expand All @@ -294,7 +303,7 @@
we have a provision to mention such tests to not run.
Please have a look at "config/wrapper/no_run_test.conf"


7. REFERENCE LINKS

Avocado Test Framework repositories on GitHub:
Expand Down
Loading

0 comments on commit 2292623

Please sign in to comment.