From 1da36bd15813bf822afe8c0a6e7c62ff1a3305a4 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Jan 24 2017 12:27:16 +0000 Subject: add logic to check for main yaml or yml file. Fixes #2 --- diff --git a/run_atomic_tests.py b/run_atomic_tests.py index 2c92609..6d45711 100644 --- a/run_atomic_tests.py +++ b/run_atomic_tests.py @@ -128,7 +128,12 @@ def run(atomic_image=""): build_inventory(ip=vm_ip) # Each test is in the 'main.yml' file, so fix the path - test += "/main.yaml" + if os.path.exists(test + '/main.yaml'): + test += '/main.yaml' + elif os.path.exists(test + '/main.yml'): + test += '/main.yml' + else: + raise Exception("There is no main.yml or mail.yaml file found in {}".format(test)) # There's a race condition, so we'll wait a second sb.call(['sleep', '3'])