tests: set QUBES_XML_PATH env variable to force usage of qubes-test.xml

This way even separate processes (even those started not directly - like
qrexec service calls) will use correct qubes.xml file.

Fixes QubesOS/qubes-issues#1730
This commit is contained in:
Marek Marczykowski-Górecki 2016-02-10 19:30:55 +01:00 committed by Wojtek Porczyk
parent c80e89d47e
commit 50819c726c

View File

@ -376,7 +376,9 @@ class SystemTestsMixin(object):
# need some information from the real qubes.xml - at least installed
# templates; should not be used for testing, only to initialize self.app
self.host_app = qubes.Qubes()
self.host_app = qubes.Qubes(os.path.join(
qubes.config.system_path['qubes_base_dir'],
qubes.config.system_path['qubes_store_filename']))
if os.path.exists(CLASS_XMLPATH):
shutil.copy(CLASS_XMLPATH, XMLPATH)
self.app = qubes.Qubes(XMLPATH)
@ -386,6 +388,7 @@ class SystemTestsMixin(object):
clockvm=None,
updatevm=None
)
os.environ['QUBES_XML_PATH'] = XMLPATH
def init_default_template(self, template=None):
if template is None: