1#!/usr/bin/env python3
2#
3# Version check example test
4#
5# Copyright (c) 2018 Red Hat, Inc.
6#
7# Author:
8#  Cleber Rosa <crosa@redhat.com>
9#
10# This work is licensed under the terms of the GNU GPL, version 2 or
11# later.  See the COPYING file in the top-level directory.
12
13
14from qemu_test import QemuSystemTest
15
16
17class Version(QemuSystemTest):
18
19    def test_qmp_human_info_version(self):
20        self.set_machine('none')
21        self.vm.add_args('-nodefaults')
22        self.vm.launch()
23        res = self.vm.cmd('human-monitor-command',
24                          command_line='info version')
25        self.assertRegex(res, r'^(\d+\.\d+\.\d)')
26
27if __name__ == '__main__':
28    QemuSystemTest.main()
29