Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8EF3610B2B for ; Fri, 21 Jun 2013 12:31:58 +0000 (UTC) Received: (qmail 82667 invoked by uid 500); 21 Jun 2013 12:31:58 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 82486 invoked by uid 500); 21 Jun 2013 12:31:58 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 82479 invoked by uid 99); 21 Jun 2013 12:31:58 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 12:31:58 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0421D82B90F; Fri, 21 Jun 2013 12:31:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sebgoa@apache.org To: commits@cloudstack.apache.org Message-Id: <65f40373f31c4785acdbf912215396ad@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 16e4f2f Date: Fri, 21 Jun 2013 12:31:57 +0000 (UTC) Updated Branches: refs/heads/master a401127b0 -> 16e4f2ff7 format deployAndRun Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/16e4f2ff Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/16e4f2ff Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/16e4f2ff Branch: refs/heads/master Commit: 16e4f2ff7221bfbd4ac171aae4702e62f43574d3 Parents: a401127 Author: Daan Hoogland Authored: Fri Jun 21 11:38:53 2013 +0200 Committer: Sebastien Goasguen Committed: Fri Jun 21 08:30:43 2013 -0400 ---------------------------------------------------------------------- tools/marvin/marvin/deployAndRun.py | 53 ++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16e4f2ff/tools/marvin/marvin/deployAndRun.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/deployAndRun.py b/tools/marvin/marvin/deployAndRun.py index c83065a..78c1617 100644 --- a/tools/marvin/marvin/deployAndRun.py +++ b/tools/marvin/marvin/deployAndRun.py @@ -5,9 +5,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -22,46 +22,53 @@ if __name__ == "__main__": parser = ArgumentParser() - parser.add_argument("-d", "--directory", dest="testCaseFolder", help="the test case directory") - parser.add_argument("-f", "--file", dest="module", help="run tests in the given file") - parser.add_argument("-r", "--result", dest="result", help="test result log file", default='/tmp/t.log') - parser.add_argument("-t", "--client", dest="testcaselog", help="test case log file", default='/tmp/r.log') - parser.add_argument("-c", "--config", action="store", default="./datacenterCfg", dest="config", - help="the path where the json config file generated, by default is ./datacenterCfg") + parser.add_argument("-d", "--directory", dest="testCaseFolder", + help="the test case directory") + parser.add_argument("-f", "--file", dest="module", + help="run tests in the given file") + parser.add_argument("-r", "--result", dest="result", + help="test result log file", default='/tmp/t.log') + parser.add_argument("-t", "--client", dest="testcaselog", + help="test case log file", default='/tmp/r.log') + parser.add_argument("-c", "--config", action="store", + default="./datacenterCfg", dest="config", + help="the path where the json config file generated,\ + by default is ./datacenterCfg") parser.add_argument("-l", "--load", dest="load", action="store_true", - help="only load config, do not deploy, it will only run testcase") + help="only load config, do not deploy,\ + it will only run testcase") options = parser.parse_args() testResultLogFile = None if options.result is not None: testResultLogFile = options.result - + testCaseLogFile = None if options.testcaselog is not None: testCaseLogFile = options.testcaselog - deploy = deployDataCenter.deployDataCenters(options.config) + deploy = deployDataCenter.deployDataCenters(options.config) if options.load: deploy.loadCfg() else: deploy.deploy() - + if options.testCaseFolder is None: if options.module is None: parser.print_usage() exit(1) else: - engine = \ - TestCaseExecuteEngine.TestCaseExecuteEngine(deploy.testClient, - deploy.getCfg(), - testCaseLogFile, - testResultLogFile) - engine.loadTestsFromFile(options.module) - engine.run() - else: - engine = TestCaseExecuteEngine.TestCaseExecuteEngine(deploy.testClient, + engine = \ + TestCaseExecuteEngine.TestCaseExecuteEngine(deploy.testClient, deploy.getCfg(), testCaseLogFile, testResultLogFile) - engine.loadTestsFromDir(options.testCaseFolder) - engine.run() + engine.loadTestsFromFile(options.module) + engine.run() + else: + engine = TestCaseExecuteEngine.TestCaseExecuteEngine(deploy.testClient, + deploy.getCfg(), + testCaseLogFile, + testResultLogFile) + engine.loadTestsFromDir(options.testCaseFolder) + engine.run()