Bug 1262158 - Fail early if test path does not exist; r=automatedtester
authorMaja Frydrychowicz <mjzffr@gmail.com>
Thu, 14 Apr 2016 18:18:58 -0400
changeset 331544 f5f9a967030d8104686224579294d5aeafff8b5a
parent 331543 865e124224cd54ec70adbefbcb8a750f5e1d985c
child 331545 67cd0f4372e924d0d9e7bc8c56fc41015191b09e
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1262158
milestone48.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 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)