Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The launch.py python script is used by CI to detect and run the functional tests using the avocado test framework. Tests to run/list can be specified by either their ftest relative path to the python test script (.e.g. ./ior/ior_small.py) or one or more avocado test tags (e.g. ior).

Selecting tests (tags)

One or more test method methods in one or more python test files can be selected by using avocado test tags. Tags can be combined to further filter out tests by using logical AND/OR operations. Tags can also be excluded by preceding them with a '-'. Specifying tags in a comma-separated list (w/o spaces) will work like an AND requiring a test to have all the tags specified. For example the “pr,-hw” (used by default in CI for Functional VM stages) runs any “pr” tagged test that does not also have a “hw” tag. Specifying tags in a space-separated list will behave like an OR requiring tests to have either tag specified. For example, “datamover ior“ will run any test with a “datamover” tag or a “ior” tag. These two specification types can be combined, e.g. “pr,hw,large multicontainerdelete“.See Test Tags for details and examples.

Listing tests

The --list / -l command line option is used to list any tests that match the tests/tags specified. Manually this can be useful for verifying the use of tags in tests or checking tags before using in a commit pragma.

...

To allow test portability, certain test requirements are specified in the test yaml with placeholders that launch.py can replace with real values. Launch.py creates a temporary copy of the test yaml file with the modifications applied for the test execution. Currently supported placeholders are:

Category

Test yaml keyword

Launch.py arugment

Nodes running servers

test_servers

--test_servers / -ts

Nodes running agents

test_clients

--test_clients / -tc

Server NVMe tier storage

bdev_list

--nvme / -n

Info

The values for the --test_servers and --test_clients arguments can be specified as a list (e.g. “wolf-1,wolf-2,wolf-5”) or “wolf-[1-2,5]“.

...

Info

Use of the --archive argument requires the installation of the daos-tests RPM on all nodes.

Info

In order for this feature to collect core files remotely they use --process_cores / -p the core files need to be located in /var/tmp/ on each host. Use the following command on each host to ensure the core files are written to this location:

echo \"/var/tmp/core.%e.%t.%p\" > /proc/sys/kernel/core_pattern"

Running Tests

In CI launch.py is run using the -jcrispa , -th 1G, -ts <node_list>, and (on HW clusters only) --nvme=auto:Optane arguments. For manual execution it is recommended to:

...

Launch.py uses/modifies the following environment variables when running tests. Typically no changes are needed when running from a RPM install out of the /usr/lib/daos/TESTING/ftest directory, but other test environments may require adjustments.

Environment Variable

Comments

DAOS_TEST_LOG_DIR

Common directory used on all hosts for temporary files. Defaults to /var/tmp/daos_testing

DAOS_INSECURE_MODE

Defines the default setting for server and agent insecure mode. This value is set by the --insecure_mode / -ins launch.py argument.

OFI_INTERFACE

If not already set, it will be set to the fastest active interface on the host executing launch.py.

PYTHONPATH

Launch.py extends the python path to include the following paths if they are not already included in the definition:

  • util/apricot

  • util

  • cart/util

PATH

The ../../.build_vars.json file is read to prepend the PREFIX/bin, PREFIX/sbin, and PREFIX/usr/bin paths to PATH

Info

When running tests on a set of non-homogenous nodes the OFI_INTERFACE environment variable may need to be manually set to a common active interface (e.g. “eth0”) before running launch.py.