diff --git a/.gitignore b/.gitignore index 602bc629..2cb9c2fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ rpm/ pkgs/ +qubes.egg-info/ .coverage .coverage.* htmlcov/ diff --git a/run-tests b/run-tests new file mode 100755 index 00000000..e6fc8a03 --- /dev/null +++ b/run-tests @@ -0,0 +1,10 @@ +#!/bin/sh + +: "${PYTHON:=python}" +: "${TESTPYTHONPATH:=test-packages}" + +PYTHONPATH="${TESTPYTHONPATH}:${PYTHONPATH}" +export PYTHONPATH + +"${PYTHON}" setup.py egg_info --egg-base "${TESTPYTHONPATH}" +"${PYTHON}" -m qubes.tests.run diff --git a/site-packages-qmemman/qubes b/site-packages-qmemman/qubes deleted file mode 120000 index e86ad82b..00000000 --- a/site-packages-qmemman/qubes +++ /dev/null @@ -1 +0,0 @@ -../qmemman \ No newline at end of file diff --git a/site-packages/qubes b/site-packages/qubes deleted file mode 120000 index c73d9e17..00000000 --- a/site-packages/qubes +++ /dev/null @@ -1 +0,0 @@ -../core \ No newline at end of file diff --git a/test-packages/.gitignore b/test-packages/.gitignore new file mode 100644 index 00000000..a9edb3e6 --- /dev/null +++ b/test-packages/.gitignore @@ -0,0 +1 @@ +qubes.egg-info/ diff --git a/test-packages/libvirt.py b/test-packages/libvirt.py new file mode 100644 index 00000000..4c850656 --- /dev/null +++ b/test-packages/libvirt.py @@ -0,0 +1,15 @@ +"""mock libvirt module + +WARNING: you did not import real libvirt module + +This is needed, because we don't currently ship libvirt-python for templates. +The module contains libvirtError and openReadOnly() function, which +does nothing and raises the aforementioned exception. More functions can be +added as needed. +""" + +class libvirtError(Exception): + pass + +def openReadOnly(*args, **kwargs): + raise libvirtError('mock module, always raises')