Bug 951153 - fix unclear error message if manifest has a non-existent file, r=jgriffin
authorMalini Das <mdas@mozilla.com>
Tue, 17 Dec 2013 14:51:59 -0500
changeset 160863 7da640f2435579abecdcf5dcb7c452ece8540c76
parent 160862 81820a46dee24536b42671ca92a6db5f3c3e17c6
child 160864 8500bb46251568976c4b5b53ccc4c310639bf38f
push id37732
push usermdas@mozilla.com
push dateTue, 17 Dec 2013 19:52:32 +0000
treeherdermozilla-inbound@7da640f24355 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs951153
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 951153 - fix unclear error message if manifest has a non-existent file, r=jgriffin
testing/marionette/client/marionette/runner/base.py
--- a/testing/marionette/client/marionette/runner/base.py
+++ b/testing/marionette/client/marionette/runner/base.py
@@ -529,17 +529,17 @@ class BaseMarionetteTestRunner(object):
         self._appName = None
         self.es_servers = es_servers
         self.shuffle = shuffle
         self.sdcard = sdcard
         self.mixin_run_tests = []
 
         if testvars:
             if not os.path.exists(testvars):
-                raise Exception('--testvars file does not exist')
+                raise IOError('--testvars file does not exist')
 
             import json
             with open(testvars) as f:
                 self.testvars = json.loads(f.read())
 
         # set up test handlers
         self.test_handlers = []
 
@@ -811,16 +811,18 @@ class BaseMarionetteTestRunner(object):
                                   self.device,
                                   self.appName))
                 self.todo += 1
 
             target_tests = manifest.get(tests=manifest_tests, **testargs)
             if self.shuffle:
                 random.shuffle(target_tests)
             for i in target_tests:
+                if not os.path.exists(i["path"]):
+                    raise IOError("test file: %s does not exist" % i["path"])
                 self.run_test(i["path"], i["expected"])
                 if self.marionette.check_for_crash():
                     return
             return
 
             self.logger.info('TEST-START %s' % os.path.basename(test))
 
         self.test_kwargs['expected'] = expected