From patchwork Thu Feb 17 17:51:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 571181 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 p1HHpenS003339 for ; Thu, 17 Feb 2011 17:51:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756742Ab1BQRvn (ORCPT ); Thu, 17 Feb 2011 12:51:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9162 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754105Ab1BQRvl (ORCPT ); Thu, 17 Feb 2011 12:51:41 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1HHpZGM031058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Feb 2011 12:51:35 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1HHpYlW031944; Thu, 17 Feb 2011 12:51:34 -0500 Received: from qu0061.eng.lab.tlv.redhat.com ([10.35.16.61]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p1HHpXD3020116; Thu, 17 Feb 2011 12:51:33 -0500 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 1/4] KVM test: kvm_config.py: parse extra strings passed as command line args Date: Thu, 17 Feb 2011 19:51:46 +0200 Message-Id: <1297965109-14293-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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]); Thu, 17 Feb 2011 17:51:45 +0000 (UTC) diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py index 807a204..cab0022 100755 --- a/client/tests/kvm/kvm_config.py +++ b/client/tests/kvm/kvm_config.py @@ -640,7 +640,9 @@ class FileReader(StrReader): if __name__ == "__main__": - parser = optparse.OptionParser("usage: %prog [options] ") + parser = optparse.OptionParser('usage: %prog [options] filename ' + '[extra code] ...\n\nExample:\n\n ' + '%prog tests.cfg "only my_set" "no qcow2"') parser.add_option("-v", "--verbose", dest="debug", action="store_true", help="include debug messages in console output") parser.add_option("-f", "--fullname", dest="fullname", action="store_true", @@ -653,6 +655,9 @@ if __name__ == "__main__": parser.error("filename required") c = Parser(args[0], debug=options.debug) + for s in args[1:]: + c.parse_string(s) + for i, d in enumerate(c.get_dicts()): if options.fullname: print "dict %4d: %s" % (i + 1, d["name"])