tests: re-enable policy prompt tests in travis

Xenial environment has much newer GTK/Glib. For those test to run, few
more changes are needed:
 - relevant GTK packages installed
 - X server running (otherwise GTK terminate the process on module
   import...)
 - enable system side packages in virtualenv set by travis
This commit is contained in:
Marek Marczykowski-Górecki 2019-03-15 20:55:17 +01:00
parent b68746163b
commit 65bdff1fdf
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 10 additions and 7 deletions

View File

@ -3,7 +3,12 @@ dist: xenial
language: python
python:
- '3.5'
virtualenv:
system_site_packages: true
services:
- xvfb
install:
- sudo apt-get -y install python3-gi gir1.2-gtk-3.0
- pip install --quiet -r ci/requirements.txt
- git clone https://github.com/"${TRAVIS_REPO_SLUG%%/*}"/qubes-builder ~/qubes-builder
script:

View File

@ -1347,13 +1347,11 @@ def load_tests(loader, tests, pattern): # pylint: disable=unused-argument
):
tests.addTests(loader.loadTestsFromName(modname))
# GTK/Glib is way too old there
if 'TRAVIS' not in os.environ:
for modname in (
'qubespolicy.tests.gtkhelpers',
'qubespolicy.tests.rpcconfirmation',
):
tests.addTests(loader.loadTestsFromName(modname))
for modname in (
'qubespolicy.tests.gtkhelpers',
'qubespolicy.tests.rpcconfirmation',
):
tests.addTests(loader.loadTestsFromName(modname))
tests.addTests(loader.discover(
os.path.join(os.path.dirname(__file__), 'tools')))