Bug 1253872 - When jstest.py is run and debugger=lldb is passed as an argument there is no error. r=arai
authorsasa cocic <sasacocic@gmail.com>
Fri, 11 Mar 2016 17:53:00 -0500
changeset 339769 bc7045b5a4d55ca44a59692cfe02c317c3a1f1d7
parent 339768 aaa66a4fcd17e846a58035d54722f4f47ffbed6b
child 339770 17eabd8512ffecbb895e5366771e84e5035fd312
push id12803
push userjbeich@FreeBSD.org
push dateSun, 13 Mar 2016 09:48:54 +0000
reviewersarai
bugs1253872
milestone48.0a1
Bug 1253872 - When jstest.py is run and debugger=lldb is passed as an argument there is no error. r=arai
js/src/tests/jstests.py
--- a/js/src/tests/jstests.py
+++ b/js/src/tests/jstests.py
@@ -163,17 +163,24 @@ def parse_args():
     if options.js_shell is None and not options.make_manifests:
         op.error('missing JS_SHELL argument')
 
     # Valgrind, gdb, and rr are mutually exclusive.
     if sum(map(lambda e: 1 if e else 0, [options.valgrind, options.debug, options.rr])) > 1:
         op.error("--valgrind, --debug, and --rr are mutually exclusive.")
 
     # Fill the debugger field, as needed.
-    debugger_prefix = options.debugger.split() if options.debug else []
+    if options.debug:
+        if options.debugger == 'lldb':
+            debugger_prefix = ['lldb', '--']
+        else:
+            debugger_prefix = options.debugger.split()
+    else:
+        debugger_prefix = []
+
     if options.valgrind:
         debugger_prefix = ['valgrind'] + options.valgrind_args.split()
         if os.uname()[0] == 'Darwin':
             debugger_prefix.append('--dsymutil=yes')
         options.show_output = True
     if options.rr:
         debugger_prefix = ['rr', 'record']