Bug 951153 - fix unclear error message if manifest has a non-existent file, r=jgriffin

This commit is contained in:
Malini Das 2013-12-17 14:51:59 -05:00
parent c0846a3517
commit 2d579ed95d

View File

@ -534,7 +534,7 @@ class BaseMarionetteTestRunner(object):
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:
@ -816,6 +816,8 @@ class BaseMarionetteTestRunner(object):
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