From patchwork Wed Dec 29 22:37:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 440061 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBUMBElR000490 for ; Thu, 30 Dec 2010 22:11:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754036Ab0L2Whm (ORCPT ); Wed, 29 Dec 2010 17:37:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753535Ab0L2Whl (ORCPT ); Wed, 29 Dec 2010 17:37:41 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBTMbdIU010581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 Dec 2010 17:37:40 -0500 Received: from freedom.redhat.com (vpn-8-145.rdu.redhat.com [10.11.8.145]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBTMbWit012882; Wed, 29 Dec 2010 17:37:38 -0500 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues , Eduardo Habkost Subject: [PATCH 3/8] KVM test: add methods to store a installer object in 'env' Date: Wed, 29 Dec 2010 20:37:25 -0200 Message-Id: <1293662250-18292-4-git-send-email-lmr@redhat.com> In-Reply-To: <1293662250-18292-1-git-send-email-lmr@redhat.com> References: <1293662250-18292-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Dec 2010 22:11:58 +0000 (UTC) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 6362490..1967ddd 100644 --- a/client/tests/kvm/kvm_utils.py +++ b/client/tests/kvm/kvm_utils.py @@ -121,6 +121,24 @@ class Env(UserDict.IterableUserDict): del self["vm__%s" % name] + def register_installer(self, installer): + """ + Register a installer that was just run + + The installer will be available for other tests, so that + information about the installed KVM modules and qemu-kvm can be used by + them. + """ + self['last_installer'] = installer + + + def previous_installer(self): + """ + Return the last installer that was registered + """ + return self.get('last_installer') + + class Params(UserDict.IterableUserDict): """ A dict-like object passed to every test.