From patchwork Tue Dec 8 19:38:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 65742 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB8JcZWn001651 for ; Tue, 8 Dec 2009 19:38:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756201AbZLHTi0 (ORCPT ); Tue, 8 Dec 2009 14:38:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756182AbZLHTi0 (ORCPT ); Tue, 8 Dec 2009 14:38:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756137AbZLHTi0 (ORCPT ); Tue, 8 Dec 2009 14:38:26 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB8JcVrt029024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Dec 2009 14:38:31 -0500 Received: from localhost.localdomain (vpn-9-102.rdu.redhat.com [10.11.9.102]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB8JcTT3009042; Tue, 8 Dec 2009 14:38:30 -0500 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH] KVM test: build subtest (koji): turn lists into strings and vice versa Date: Tue, 8 Dec 2009 17:38:28 -0200 Message-Id: <1260301108-10270-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/client/tests/kvm/tests/build.py b/client/tests/kvm/tests/build.py index d22d59b..789373b 100644 --- a/client/tests/kvm/tests/build.py +++ b/client/tests/kvm/tests/build.py @@ -158,9 +158,11 @@ class KojiInstaller: """ default_koji_cmd = '/usr/bin/koji' default_src_pkg = 'qemu' - default_pkg_list = ['qemu-kvm', 'qemu-kvm-tools'] - default_qemu_bin_paths = ['/usr/bin/qemu-kvm', '/usr/bin/qemu-img'] - default_extra_modules = None + # Since the config file will provide strings, to save some + # comparisons, we're converting the values below to strings. + default_pkg_list = str(['qemu-kvm', 'qemu-kvm-tools']) + default_qemu_bin_paths = str(['/usr/bin/qemu-kvm', '/usr/bin/qemu-img']) + default_extra_modules = str(None) self.koji_cmd = params.get("koji_cmd", default_koji_cmd) @@ -170,9 +172,9 @@ class KojiInstaller: os_dep.command(self.koji_cmd) self.src_pkg = params.get("src_pkg", default_src_pkg) - self.pkg_list = params.get("pkg_list", default_pkg_list) - self.qemu_bin_paths = params.get("qemu_bin_paths", - default_qemu_bin_paths) + self.pkg_list = eval(params.get("pkg_list", default_pkg_list)) + self.qemu_bin_paths = eval(params.get("qemu_bin_paths", + default_qemu_bin_paths)) self.tag = params.get("koji_tag", None) self.build = params.get("koji_build", None) if self.tag and self.build: @@ -192,7 +194,8 @@ class KojiInstaller: self.load_modules = True elif load_modules == 'no': self.load_modules = False - self.extra_modules = params.get("extra_modules", default_extra_modules) + self.extra_modules = eval(params.get("extra_modules", + default_extra_modules)) self.srcdir = test.srcdir self.test_bindir = test.bindir