From b32f9859f6abab8fb9ac6ede07e191a8e699dfb3 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 28 Jan 2008 10:43:38 +0000
Subject: [PATCH] Allow selection of hypervisor type in QA

This patch allows the selection of the hypervisor type for the QA
process; this is useful when testing hypervisor-independent changes that
don't require a Xen setup.

The patch also fixes the OS name in the sample QA config file provided.

Reviewed-by: imsnah
---
 qa/qa-sample.yaml | 3 ++-
 qa/qa_cluster.py  | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/qa/qa-sample.yaml b/qa/qa-sample.yaml
index 3901d962b..a5795d705 100644
--- a/qa/qa-sample.yaml
+++ b/qa/qa-sample.yaml
@@ -1,8 +1,9 @@
 # Cluster name
 name: xen-test
+hypervisor-type: xen-3.0
 
 # System to use
-os: debian-edgy
+os: debian-etch
 os-size: 10G
 swap-size: 1G
 mem: 512M
diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py
index 245ac681b..08868fd5e 100644
--- a/qa/qa_cluster.py
+++ b/qa/qa_cluster.py
@@ -66,6 +66,10 @@ def TestClusterInit():
     cmd.append('--bridge=%s' % bridge)
     cmd.append('--master-netdev=%s' % bridge)
 
+  htype = qa_config.get('hypervisor-type', None)
+  if htype:
+    cmd.append('--hypervisor-type=%s' % htype)
+
   cmd.append(qa_config.get('name'))
 
   AssertEqual(StartSSH(master['primary'],
-- 
GitLab