Repository Split Proposal
=========================
Test Providers
--------------
After a lot of discussion on how virt-test could be split in different
repositories, to fullfill the following requirements:
* Make it possible for other organizations to maintain test repositories,
in other arbitrary git repositories
* Stabilize API and enforce separation of core virt-test functionality
and tests
We came up with an idea called test providers: A loadable module mechanism
inside virt-test that can pull a directory that will provide tests, config
files and any dependencies.
Test Provider Layout
--------------------
.
|-- cfg - Main test config directory. Holds base files for the
test runner
|-- deps - Auxiliary files such as ELF files, Windows executables,
images
`-- tests - Holds tests python files
`-- cfg - Test configuration
In fact, virt-test libraries are smart enough to support arbitrary
organization
of python and config files inside the 'tests' directory.
Types of Test Providers
-----------------------
Each test provider can be either a local filesystem directory, or a
subdirectory
of a git repository. Of course, the git repo subdirectory can be the
repo root
directory, but one of the points of the proposal is that people can hold
virt-test providers inside git repos of other projects. Say qemu wants to
maintain its own provider, they can do this by holding the tests, say,
inside
a tests/virt-test subdirectory inside qemu.git.
Test Provider definition file
-----------------------------
virt-test will have a subdirectory 'test-providers.d' that contains
definition
files, which are .ini files that encode information from a test
provider. Here's
an example structure of a test provider file:
[provider]
# Test provider URI (default is a git repository, fallback to standard
dir)
uri: git://git-provider.com/repo.git
#uri: /path-to-my-git-dir/repo.git
#uri: http://bla.com/repo.git
#uri: /path-to-my-git-dir/repo/
#uri: /path-to-my-standard-dir/foobar/tests
# Optional git branch (for git repo type)
branch: master
# Optionall git commit reference (tag or sha1)
ref: e44231e88300131621586d24c07baa8e627de989
# Pubkey: File containing public key for signed tags (git)
pubkey: example.pub
[qemu]
# Optional subdir (place inside repo where the actual tests are)
# This is useful for projects to keep virt tests inside their
# (larger) test repos. Defaults to ''.
subdir: src/tests/qemu/
[agnostic]
# For each test backend, you may have different sub directories
subdir: src/tests/generic/
Sketch implementation
---------------------
A basic (and quite rough) sketch implementation of this idea can be found
here:
https://github.com/lmr/virt-test-experimental.git
This repository is able to download a number of test providers, also
available
on the same github area. The implementation is far from complete, and
there
are things that need to be worked out:
* Fully isolating test dependencies from the virt-test repo and
passing them
to the test providers repos. This wasn't done in the sketch due to
the time
needed to check case by case and pass the dependency files around.
A PR was started to isolate the dependencies, see:
https://github.com/autotest/virt-test/pull/1333
Schedule
--------
As discussed, the ETA for a complete, deployed implementation is about
30 days
from now. In PR 1333, the changes made on the sketch implementation
will be
re-made, this time the version that will be effectively pushed.
Thanks for your time reading this, let us know your comments.
_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel