Closed Bug 1056862 Opened 5 years ago Closed 5 years ago

make |mach python-test| even if run from outside the srcdir

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

No description provided.
I realize that running |mach python-test| from outside the srcdir is probably
kind of an odd use-case (no tab-completion!), but I expected it to work, given
that e.g. |mach mochitest| does.
Attachment #8476712 - Flags: review?(gps)
Comment on attachment 8476712 [details] [diff] [review]
make |mach python-test| even if run from outside the srcdir

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

::: python/mach_commands.py
@@ +62,5 @@
>          # launching Python multiple times. This also runs tests via mozunit,
>          # which produces output in the format Mozilla infrastructure expects.
>          return_code = 0
>          files = []
> +        for test, resolved in zip(tests, [mozpack.path.join(self.topsrcdir, t) for t in tests]):

We don't use `test`, so this could be:

for test in [mozpack.path.join(self.topsrcdir, t) for t in tests]:
Attachment #8476712 - Flags: review?(gps) → review+
(In reply to Gregory Szorc [:gps] from comment #2)
> We don't use `test`, so this could be:

We use it in the error message, but I suppose we could just derive it via mozpack.path.relpath.
Ignore my blind eyes.
This landed: http://hg.mozilla.org/mozilla-central/rev/afaa2a2dd1cf

I guess mcMerge failed to pick it up.
Assignee: nobody → nfroyd
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.