]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fail sooner if an invalid config_yaml is passed
authorZack Cerza <zack@cerza.org>
Tue, 22 Jul 2014 21:47:53 +0000 (15:47 -0600)
committerZack Cerza <zack@cerza.org>
Tue, 22 Jul 2014 21:47:53 +0000 (15:47 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/suite.py

index e1672dabb60bdec692ebc8510e9135a57a926432..652a1ca599c2cfc21ea15403e7b8c75633e0ae87 100644 (file)
@@ -264,6 +264,12 @@ def prepare_and_schedule(job_config, suite_repo_path, base_yaml_paths, limit,
     suite_path = os.path.join(suite_repo_path, 'suites',
                               job_config.suite.replace(':', '/'))
 
+    # Make sure the yaml paths are actually valid
+    for yaml_path in base_yaml_paths:
+        full_yaml_path = os.path.join(suite_repo_path, yaml_path)
+        if not os.path.exists(full_yaml_path):
+            raise IOError("File not found: " + full_yaml_path)
+
     num_jobs = schedule_suite(
         job_config=job_config,
         path=suite_path,