From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Harper Subject: [KVM-AUTOTEST][PATCH] Fix kvm_config.py -f mode Date: Mon, 2 Nov 2009 17:28:01 -0600 Message-ID: <20091102232801.GR13808@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: autotest@test.kernel.org Return-path: Received: from e33.co.us.ibm.com ([32.97.110.151]:46630 "EHLO e33.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757261AbZKBX2E (ORCPT ); Mon, 2 Nov 2009 18:28:04 -0500 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e33.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id nA2NPZen020135 for ; Mon, 2 Nov 2009 16:25:35 -0700 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nA2NS5l1135182 for ; Mon, 2 Nov 2009 16:28:05 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nA2NS52q022652 for ; Mon, 2 Nov 2009 16:28:05 -0700 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: kvm_config.py supports specifying a different filename for test config. This patch fixes the option parsing parameters. Currently it uses 'store_true' which stores the value True into the filename variable; we want the 'store' mode which will store the value of the option (aka, the filename) in the variable. Signed-off-by: Ryan Harper diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py index 3114c07..52de4c7 100755 --- a/client/tests/kvm/kvm_config.py +++ b/client/tests/kvm/kvm_config.py @@ -501,7 +501,7 @@ class config: if __name__ == "__main__": parser = optparse.OptionParser() - parser.add_option('-f', '--file', dest="filename", action='store_true', + parser.add_option('-f', '--file', dest="filename", action='store', help='path to a config file that will be parsed. ' 'If not specified, will parse kvm_tests.cfg ' 'located inside the kvm test dir.') -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com