From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Habkost Subject: [KVM-AUTOTEST PATCH 1/5] kvm_config: accept multiple filenames as argument Date: Thu, 6 Jan 2011 14:12:32 -0200 Message-ID: <1294330356-17043-2-git-send-email-ehabkost@redhat.com> References: <1294330356-17043-1-git-send-email-ehabkost@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: autotest@test.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <1294330356-17043-1-git-send-email-ehabkost@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org From: Eduardo Habkost Useful to test and debug cases where config settings are concatenated together, without the need to change the base .cfg file. Signed-off-by: Eduardo Habkost --- client/tests/kvm/kvm_config.py | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py index 4fc1029..45d8fe6 100755 --- a/client/tests/kvm/kvm_config.py +++ b/client/tests/kvm/kvm_config.py @@ -682,15 +682,18 @@ if __name__ == "__main__": options, args = parser.parse_args() debug = options.debug if args: - filename = args[0] + filenames = args else: - filename = os.path.join(os.path.dirname(sys.argv[0]), "tests.cfg") + filenames = [os.path.join(os.path.dirname(sys.argv[0]), "tests.cfg")] # Here we configure the stand alone program to use the autotest # logging system. logging_manager.configure_logging(kvm_utils.KvmLoggingConfig(), verbose=debug) - dicts = config(filename, debug=debug).get_generator() + cfg = config(debug=debug) + for fn in filenames: + cfg.parse_file(fn) + dicts = cfg.get_generator() for i, dict in enumerate(dicts): logging.info("Dictionary #%d:", i) keys = dict.keys() -- 1.7.3.2