]> git.ipfire.org Git - nitsi.git/commitdiff
Raise an exception when we do no found important files of a test
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Thu, 14 Jun 2018 07:13:54 +0000 (09:13 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Thu, 14 Jun 2018 07:13:54 +0000 (09:13 +0200)
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
src/nitsi/test.py

index 7f6b868fb815452b9e1fed16dd9224d66fe8af25..5682752f7cb73537644f52acb89e7ebc9607a858 100755 (executable)
@@ -32,10 +32,12 @@ class Test():
         self.settings_file = "{}/settings".format(self.path)
         if not os.path.isfile(self.settings_file):
             self.log.error("No such file: {}".format(self.settings_file))
+            raise TestException("No settings file found")
 
         self.recipe_file = "{}/recipe".format(self.path)
         if not os.path.isfile(self.recipe_file):
             self.log.error("No such file: {}".format(self.recipe_file))
+            raise TestException("No recipe file found")
 
     def read_settings(self):
         self.config = configparser.ConfigParser()