From patchwork Fri Jan 14 11:42:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 478121 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 p0EBgtbH013336 for ; Fri, 14 Jan 2011 11:42:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753669Ab1ANLmr (ORCPT ); Fri, 14 Jan 2011 06:42:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40495 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753454Ab1ANLmq (ORCPT ); Fri, 14 Jan 2011 06:42:46 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0EBgiks010832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Jan 2011 06:42:44 -0500 Received: from freedom.redhat.com (vpn-9-38.rdu.redhat.com [10.11.9.38]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p0EBgftJ005727; Fri, 14 Jan 2011 06:42:42 -0500 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Jason Wang Subject: [PATCH] KVM test: Pass the test parameters through the command line Date: Fri, 14 Jan 2011 09:42:39 -0200 Message-Id: <1295005359-4840-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 14 Jan 2011 11:42:56 +0000 (UTC) diff --git a/client/tests/kvm/control b/client/tests/kvm/control index 63bbe5d..79c0897 100644 --- a/client/tests/kvm/control +++ b/client/tests/kvm/control @@ -53,6 +53,20 @@ str = """ """ tests_cfg = kvm_config.config() tests_cfg_path = os.path.join(kvm_test_dir, "tests.cfg") + +if args: + # We get test parameters from command line + for arg in args: + try: + (key, value) = re.findall("(.*)=(.*)", arg)[0] + if key == "only": + str += "only %s\n" % value + if key == "no": + str += "no %s\n" % value + else: + str += "%s = %s\n" % (key, value) + except IndexError: + pass tests_cfg.fork_and_parse(tests_cfg_path, str) # Run the tests