aboutsummaryrefslogtreecommitdiff
path: root/tests/acceptance/version.py
diff options
context:
space:
mode:
authorCleber Rosa <crosa@redhat.com>2018-05-30 14:41:52 -0400
committerEduardo Habkost <ehabkost@redhat.com>2018-06-15 16:10:11 -0300
commitc3d7e8c90db208b1d876f8d6458c2dfca169137f (patch)
treee69f5c637f0cc11025af5449ed6855f2e3632b74 /tests/acceptance/version.py
parent93bc3b29fa31637f9dd062cf05bff36646070dab (diff)
downloadqemu-c3d7e8c90db208b1d876f8d6458c2dfca169137f.zip
qemu-c3d7e8c90db208b1d876f8d6458c2dfca169137f.tar.gz
qemu-c3d7e8c90db208b1d876f8d6458c2dfca169137f.tar.bz2
Add functional/acceptance tests infrastructure
This patch adds the very minimum infrastructure necessary for writing and running functional/acceptance tests, including: * Documentation * The avocado_qemu.Test base test class * One example tests (version.py) Additional functionality is expected to be added along the tests that require them. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20180530184156.15634-2-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [ehabkost: fix typo on testing.rst] Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'tests/acceptance/version.py')
-rw-r--r--tests/acceptance/version.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/acceptance/version.py b/tests/acceptance/version.py
new file mode 100644
index 0000000..13b0a74
--- /dev/null
+++ b/tests/acceptance/version.py
@@ -0,0 +1,24 @@
+# Version check example test
+#
+# Copyright (c) 2018 Red Hat, Inc.
+#
+# Author:
+# Cleber Rosa <crosa@redhat.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later. See the COPYING file in the top-level directory.
+
+
+from avocado_qemu import Test
+
+
+class Version(Test):
+ """
+ :avocado: enable
+ :avocado: tags=quick
+ """
+ def test_qmp_human_info_version(self):
+ self.vm.launch()
+ res = self.vm.command('human-monitor-command',
+ command_line='info version')
+ self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)')