Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCreate mechanism for plugging tests from the outside of core-admin repository #1800
Comments
marmarek
added
C: core
task
C: tests
labels
Mar 2, 2016
marmarek
self-assigned this
Mar 2, 2016
marmarek
added this to the Release 3.1 updates milestone
Mar 2, 2016
added a commit
to marmarek/old-qubes-core-admin
that referenced
this issue
Mar 3, 2016
added a commit
to marmarek/old-qubes-core-admin
that referenced
this issue
Mar 3, 2016
added a commit
to marmarek/old-qubes-core-admin
that referenced
this issue
Mar 3, 2016
added a commit
to marmarek/old-qubes-core-admin
that referenced
this issue
Mar 7, 2016
added a commit
to marmarek/old-qubes-core-admin
that referenced
this issue
Mar 7, 2016
marmarek
closed this
in
marmarek/old-qubes-core-admin@02c601b
Mar 7, 2016
added a commit
to marmarek/old-qubes-core-admin
that referenced
this issue
Mar 7, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 7, 2016
Member
Automated announcement from builder-github
The package qubes-core-dom0-3.1.14-1.fc20 has been pushed to the r3.1 testing repository for dom0.
To test this update, please install it with the following command:
sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing
|
Automated announcement from builder-github The package
|
marmarek
added
the
r3.1-dom0-cur-test
label
Mar 7, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 13, 2016
Member
Automated announcement from builder-github
The package qubes-core-dom0-3.1.14-1.fc20 has been pushed to the r3.1 stable repository for dom0.
To install this update, please use the standard update command:
sudo qubes-dom0-update
Or update dom0 via Qubes Manager.
|
Automated announcement from builder-github The package
Or update dom0 via Qubes Manager. |
marmarek commentedMar 2, 2016
It is really convenient to have a single test runner to launch all the Qubes tests. But some of them are barely related to
core-adminrepository (for example split GPG). Additionally (especially for qubes-app-*) it would be useful to have the same test running on any Qubes version (supported by such component).This means that we need some API to allow tests from other repositories to be plugged into test runner (
qubes.tests.runmodule). As discussed in #1368 we've settled on using entry points for that and providing some minimal stable API for creating VMs for the test purposes.The API
External test case needs to expose entry point(s). Currently supported two of them:
qubes.tests.extra- test should be instantiated oncequbes.tests.extra.for_template- test should be instantiated for every template (generally should be used to testing some VM software)Each of those entry points should be a function, which will return a list of classes derived from
unittest.TestCase. This class will be mixed with Qubes-version specific class providing basic API for handling VMs:create_vms(names)- create AppVMs with names given as a parameter (iterable of names); return list of created objectsenable_network()- created VMs should have access to the network (if available on the host)qrexec_policy(service, source, destination)- allow qrexec calls described by parametersshutdown_and_wait(vm, timeout=60)- ask given VM (VM object) to shutdown and wait for it to finishremove_vms(vms)- remove VMs (list of VM objects)save_and_reload_db()- ensure the changes are written to the disk (create_vmsandremove_vmscall it automatically, but if you make any additional changes, you need to call it on your own)Additionally some useful functions are available:
wait_for_window(title, timeout=30, show=True)- wait for given window to show (or hide ifshow=False)enter_keys_in_window(title, keys)- enter given keys into given windowTest case should take care of any other API compatibility on its own. In case of not supported API detected, it should call
self.skipTestwith appropriate message. For example: