Bug 1262158 - Fail early if test path does not exist; r?AutomatedTester draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Thu, 14 Apr 2016 18:18:58 -0400
changeset 351708 ab5c9f3644c4b79f1ade1ac9394c97314bca79ea
parent 351707 dbd50821663fb364a0dd0a3c83020fa845233022
child 518486 8ca63dc0bbebf5870daeb20f366d8657aa5fe253
push id15512
push usermjzffr@gmail.com
push dateThu, 14 Apr 2016 22:19:57 +0000
reviewersAutomatedTester
bugs1262158
milestone48.0a1
Bug 1262158 - Fail early if test path does not exist; r?AutomatedTester MozReview-Commit-ID: Lfo5zf8FIaf
testing/marionette/harness/marionette/runner/base.py
--- a/testing/marionette/harness/marionette/runner/base.py
+++ b/testing/marionette/harness/marionette/runner/base.py
@@ -466,16 +466,21 @@ class BaseMarionetteArguments(ArgumentPa
 
         return dict(prefs())
 
     def verify_usage(self, args):
         if not args.tests:
             print 'must specify one or more test files, manifests, or directories'
             sys.exit(1)
 
+        for path in args.tests:
+            if not os.path.exists(path):
+                print '{0} does not exist'.format(path)
+                sys.exit(1)
+
         if not args.emulator and not args.address and not args.binary:
             print 'must specify --binary, --emulator or --address'
             sys.exit(1)
 
         if args.emulator and args.binary:
             print 'can\'t specify both --emulator and --binary'
             sys.exit(1)