From 70546ac21a4be4c2cb9fab2a6ea195949f8c944c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 28 Dec 2015 01:07:48 +0100 Subject: [PATCH] tests: add test for VM autostart on qrexec call --- tests/vm_qrexec_gui.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/vm_qrexec_gui.py b/tests/vm_qrexec_gui.py index aa4e3da4..3c3f12ea 100644 --- a/tests/vm_qrexec_gui.py +++ b/tests/vm_qrexec_gui.py @@ -547,6 +547,25 @@ class TC_00_AppVMMixin(qubes.tests.SystemTestsMixin): wait=True) self.assertEqual(retcode, 0, "file differs") + @unittest.skipUnless(spawn.find_executable('xdotool'), + "xdotool not installed") + def test_101_qrexec_filecopy_with_autostart(self): + self.testvm1.start() + p = self.testvm1.run("qvm-copy-to-vm %s /etc/passwd" % + self.testvm2.name, passio_popen=True, + passio_stderr=True) + # Confirm transfer + self.enter_keys_in_window('Question', ['y']) + p.wait() + self.assertEqual(p.returncode, 0, "qvm-copy-to-vm failed: %s" % + p.stderr.read()) + self.assertTrue(self.testvm2.is_running()) + retcode = self.testvm2.run("diff /etc/passwd " + "/home/user/QubesIncoming/{}/passwd".format( + self.testvm1.name), + wait=True) + self.assertEqual(retcode, 0, "file differs") + @unittest.skipUnless(spawn.find_executable('xdotool'), "xdotool not installed") def test_110_qrexec_filecopy_deny(self):