Bug 1459251 - Running |mach raptor-test| with no test specified results in a traceback; r?ahal
MozReview-Commit-ID: 9yggrydEoJv
--- 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: