Bug 1459251 - Running |mach raptor-test| with no test specified results in a traceback; r?ahal draft
authorRob Wood <rwood@mozilla.com>
Fri, 04 May 2018 13:46:03 -0400
changeset 793628 5b3d9ebc33860bbb984cfcc6bd65baf2ddc2f3c7
parent 793626 7a8616427aea19089fffd9423577751deae186e2
push id109437
push userrwood@mozilla.com
push dateThu, 10 May 2018 14:06:35 +0000
reviewersahal
bugs1459251
milestone62.0a1
Bug 1459251 - Running |mach raptor-test| with no test specified results in a traceback; r?ahal MozReview-Commit-ID: 9yggrydEoJv
testing/raptor/raptor/manifest.py
--- a/testing/raptor/raptor/manifest.py
+++ b/testing/raptor/raptor/manifest.py
@@ -62,17 +62,20 @@ def write_test_settings_json(test_detail
         LOG.info("abort: exception writing test settings json!")
 
 
 def get_raptor_test_list(args):
     # get a list of available raptor tests, for the browser we're testing on
     available_tests = get_browser_test_list(args.app)
     tests_to_run = []
     # currently only support one test name on cmd line
-    args.test = args.test[0]
+    if args.test is not None and len(args.test) > 0:
+        args.test = args.test[0]
+    else:
+        args.test = None
     # if test name not provided on command line, run all available raptor tests for this browser;
     # if test name provided on command line, make sure it exists, and then only include that one
     if args.test is not None:
         for next_test in available_tests:
             if next_test['name'] == args.test:
                 tests_to_run = [next_test]
                 break
         if len(tests_to_run) == 0: