[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [XTF PATCH 1/3] xtf-runner: introduce get_xen_version
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xtf-runner | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xtf-runner b/xtf-runner index c063699..7b69c45 100755 --- a/xtf-runner +++ b/xtf-runner @@ -151,6 +151,19 @@ def __repr__(self): return "TestInfo(%s)" % (self.name, ) +def get_xen_version(): + """Get the version string of Xen""" + + for line in check_output(['xl', 'info']).splitlines(): + if not line.startswith("xen_version"): + continue + + version_str = line.split()[2:][0] + break + + return version_str + + def parse_test_instance_string(arg): """Parse a test instance string. -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |