Closed Bug 809729 Opened 8 years ago Closed 8 years ago

"mach reftest" doesn't play well wtih EXTRA_TEST_ARGS=--debugger=gdb

Categories

(Firefox Build System :: Mach Core, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla20

People

(Reporter: heycam, Assigned: gps)

References

Details

(Whiteboard: [mach])

Attachments

(1 file)

Since mach grabs the output of running reftests, gdb doesn't a terminal that you can interact with it nicely when using EXTRA_TEST_ARGS=--debugger=gdb.
I suppose anyway that we don't want to support EXTRA_TEST_ARGS but have arguments that get passed to mach directly, like `./mach reftest --debugger=gdb`.
(Bug 797101 was filed for this capability under mochitests.)
Depends on: 818366
This is essentially the same patch as bug 797101. I also performed some basic cleanup so we don't see a stack trace if make exits with a non-0 exit code.

I was unable to run reftests on my tree when I wrote this because my tree wasn't built. However, I was able to see a gdb prompt with --debugger. I would appreciate verification that this works correctly.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Attachment #688603 - Flags: review?(Ms2ger)
Comment on attachment 688603 [details] [diff] [review]
Add --debugger option to run reftests, v1

Review of attachment 688603 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/tools/reftest/mach_commands.py
@@ +93,5 @@
> +            pass_thru = True
> +
> +        if extra_args:
> +            existing = os.environ.get(b'EXTRA_TEST_ARGS', '')
> +            env[b'EXTRA_TEST_ARGS'] = existing + ' '.join(extra_args)

If existing is 'foo' and extra_args is ['bar'], don't we get 'foobar' instead of 'foo bar' here?
Good catch. Is that the only thing standing between this patch and r+?
Comment on attachment 688603 [details] [diff] [review]
Add --debugger option to run reftests, v1

Review of attachment 688603 [details] [diff] [review]:
-----------------------------------------------------------------

Yeah, looks good otherwise.
Attachment #688603 - Flags: review?(Ms2ger) → review+
https://hg.mozilla.org/mozilla-central/rev/7e5fee8e5ba0
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [mach]
Target Milestone: --- → mozilla20
Depends on: 820060
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.