Skip to content

Commit

Permalink
Add less packets arg in runner script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Karan Desai committed Jul 13, 2016
1 parent f561e64 commit 9c25217
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions tardis/tests/integration_tests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,30 @@
help="Path to YAML config file for integration tests.")
parser.add_argument("--atomic-dataset", dest="atomic_dataset",
help="Path to atomic dataset.")
parser.add_argument("--less-packets", action="store_true", default=False,
help="Run integration tests with less packets.")

args = parser.parse_args()

integration_tests_config = yaml.load(open(args.yaml_filepath))
doku_conn = dokuwiki.DokuWiki(
url=integration_tests_config['dokuwiki']['url'],
user=integration_tests_config['dokuwiki']['username'],
password=integration_tests_config['dokuwiki']['password']
)
def run_tests():
args = parser.parse_args()

integration_tests_config = yaml.load(open(args.yaml_filepath))
doku_conn = dokuwiki.DokuWiki(
url=integration_tests_config['dokuwiki']['url'],
user=integration_tests_config['dokuwiki']['username'],
password=integration_tests_config['dokuwiki']['password']
)

def call_test_command(args):
subprocess.call([
less_packets = "--less-packets" if args.less_packets else ""
shell_command = [
"python", "setup.py", "test",
"--test-path=tardis/tests/integration_tests/test_integration.py", "--args",
"-rs --integration-tests={0} --atomic-dataset={1} --remote-data".format(
args.yaml_filepath, args.atomic_dataset
"-rs --integration-tests={0} --atomic-dataset={1} --remote-data {2}".format(
args.yaml_filepath, args.atomic_dataset, less_packets
)
])

]
subprocess.call(shell_command)

def run_tests():
call_test_command(args)
while True:
# Request Github API and get githash of master on Github.
gh_request = requests.get(
Expand All @@ -61,7 +62,7 @@ def run_tests():
subprocess.call([
"git", "pull", "https://www.github.com/tardis-sn/tardis", "master"
])
call_test_command(args)
subprocess.call(shell_command)
else:
checked = datetime.datetime.now()
logger.info("Up-to-date. Checked on {0} {1}".format(
Expand Down

0 comments on commit 9c25217

Please sign in to comment.