Closed Bug 1067037 Opened 5 years ago Closed 5 years ago

mach mochitest-plain --debugger is broken on Windows

Categories

(Firefox Build System :: General, defect)

x86_64
Windows 7
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla35

People

(Reporter: aklotz, Assigned: Dexter)

References

Details

Attachments

(3 files, 1 obsolete file)

After updating my tree last night, I am not longer able to run this command on Windows:

./mach mochitest-plain --debugger=<path-to-debugger> <test>

Instead I see this error:

Traceback (most recent call last):
  File "c:\Users\aklotz\src\m-c\obj-ff-prof-dbg\_tests\testing\mochitest\runtests.py", line 1794, in doTests
    quiet=options.quiet
  File "c:\Users\aklotz\src\m-c\obj-ff-prof-dbg\_tests\testing\mochitest\runtests.py", line 1381, in runApp
    debug_args = [debuggerInfo.path] + debuggerInfo.args
TypeError: can only concatenate list (not "str") to list
0 ERROR Automation Error: Received unexpected exception while running application

I suspect it is the landing of bug 928397 that triggered this. I'm not sure if this is an issue on other platforms.
Depends on: 928397
Flags: needinfo?(alessio.placitelli)
Thanks for reporting, it's definitely the patch I landed. I'm looking into it right now.
Flags: needinfo?(alessio.placitelli)
Are you using --debugger-args?
Flags: needinfo?(aklotz)
Assignee: nobody → alessio.placitelli
I think I've found the problem: does this fix the issue for you?
(In reply to Alessio Placitelli [:Dexter] from comment #2)
> Are you using --debugger-args?

No, but when I tried it, that wasn't working either.

(In reply to Alessio Placitelli [:Dexter] from comment #3)
> Created attachment 8489116 [details] [diff] [review]
> bug1067037_fix_debugger_arguments.patch
> 
> I think I've found the problem: does this fix the issue for you?

No. Without --debugger-args, I see the same error. With --debugger-args, I see this:

TypeError: cannot concatenate 'str' and 'list' objects

  File "c:\Users\aklotz\src\m-c\testing/mochitest/mach_commands.py", line 625, in run_mochitest_plain
    return self.run_mochitest(test_paths, 'plain', **kwargs)
  File "c:\Users\aklotz\src\m-c\testing/mochitest/mach_commands.py", line 750, in run_mochitest
    test_paths=test_paths, suite=flavor, **kwargs)
  File "c:\Users\aklotz\src\m-c\testing/mochitest/mach_commands.py", line 379, in run_desktop_test
    result = runner.runTests(options)
  File "c:\Users\aklotz\src\m-c\obj-ff-prof-dbg\_tests\testing\mochitest\runtests.py", line 1638, in runTests
    return self.runMochitests(options, onLaunch)
  File "c:\Users\aklotz\src\m-c\obj-ff-prof-dbg\_tests\testing\mochitest\runtests.py", line 1616, in runMochitests
    result = self.doTests(options, onLaunch, testsToRun)
  File "c:\Users\aklotz\src\m-c\obj-ff-prof-dbg\_tests\testing\mochitest\runtests.py", line 1700, in doTests
    options.debuggerInteractive)
  File "c:\Users\aklotz\src\m-c\testing/mozbase/mozdebug\mozdebug\mozdebug.py", line 126, in get_debugger_info
    debugger_arguments += [debuggerArgs];
Flags: needinfo?(aklotz) → needinfo?(alessio.placitelli)
Weird, it works just fine if I issue:

./mach mochitest-plain --debugger WDExpress.exe dom/browser-element/mochitest

Would you mind sending me the whole command you use?
Flags: needinfo?(alessio.placitelli) → needinfo?(aklotz)
(In reply to Alessio Placitelli [:Dexter] from comment #5)
> Weird, it works just fine if I issue:
> 
> ./mach mochitest-plain --debugger WDExpress.exe dom/browser-element/mochitest
> 
> Would you mind sending me the whole command you use?

This is of course entered in using the msys terminal included with MozillaBuild:

./mach mochitest-plain --debugger="/c/Program Files (x86)/Microsoft SDKs/Windows/v8.1/Debuggers/x86/windbg.exe" dom/plugins/test/mochitest/test_pluginstream_err.html
Flags: needinfo?(aklotz)
Thanks for the additional information, they helped to pinpoint the problem! This fixes the bug for me.

Would you kindly test it and confirm it works for you as well?
Attachment #8489116 - Attachment is obsolete: true
Flags: needinfo?(aklotz)
Looks good. Thanks!
Flags: needinfo?(aklotz)
Comment on attachment 8489241 [details] [diff] [review]
bug1067037_fix_debugger_arguments_v2.patch

Aaron confirmed this fixes the problem, so it should be good to go!
Attachment #8489241 - Flags: review?(ted)
Attachment #8489241 - Flags: review?(ted) → review+
Duplicate of this bug: 1069210
https://hg.mozilla.org/mozilla-central/rev/fdcc0f0a5d25
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
I don't think this is fixed. If there are multiple arguments in the --debugger-args argument, they are not split which causes an error in running the tests old style as well as new style with mach.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Bob Clary [:bc:] from comment #13)
> Created attachment 8493286 [details]
> error with --debugger and --debugger-args
> 
> I don't think this is fixed. If there are multiple arguments in the
> --debugger-args argument, they are not split which causes an error in
> running the tests old style as well as new style with mach.

Hi Bob, could you please provide a sample command triggering an error?
Flags: needinfo?(bclary)
see attachment 8493286 [details]
Flags: needinfo?(bclary)
This fixes the issue on my system. Would you mind confirming this fixes the problem for you as well?
Flags: needinfo?(bclary)
Yes, this fixes it for me as well. Thanks!
Flags: needinfo?(bclary)
Attachment #8493798 - Flags: review?(ted)
Attachment #8493798 - Flags: review?(ted) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9a5d04a8d5d2
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.