make |mach reftest| support testing single files

RESOLVED FIXED in mozilla37

Status

Testing
Reftest
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: froydnj, Assigned: froydnj)

Tracking

unspecified
mozilla37
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

4 years ago
It bugs me that mach doesn't support this straightforward thing.  Let's fix it.
(Assignee)

Comment 1

4 years ago
Created attachment 8520729 [details] [diff] [review]
part 0 - fix cut-and-pasted comment

Just something I noticed while I was in the vicinity.
Attachment #8520729 - Flags: review?(ted)
(Assignee)

Comment 2

4 years ago
Created attachment 8520730 [details] [diff] [review]
part 1 - add filtering support to |mach reftest-{remote,b2g-desktop}|

We're going to (ab)use --filter to support single-file tests, and therefore we
need --filter support for remote-ish reftests, too.

One wonders why the b2g reftest stuff uses a completely separate
@CommandProvider for this stuff, but maybe that can be fixed up another day.
Attachment #8520730 - Flags: review?(ted)
(Assignee)

Comment 3

4 years ago
Created attachment 8520732 [details] [diff] [review]
part 2 - make |mach reftest| and related commands support single files

It turns out that the easy workaround (prior to this bug) is to do:

  mach reftest [options] --filter=$(basename $TEST) $(dirname $TEST)

but we can just make mach do that, and make life easier for people.

As written, the patch silently permits you to test non-existent files; I guess
we could add a check to guard against that if you like.
Attachment #8520732 - Flags: review?(ted)
Attachment #8520729 - Flags: review?(ted) → review+
Attachment #8520730 - Flags: review?(ted) → review+
Comment on attachment 8520732 [details] [diff] [review]
part 2 - make |mach reftest| and related commands support single files

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

::: layout/tools/reftest/mach_commands.py
@@ +94,3 @@
>          return files[suite]
>  
>      def _find_manifest(self, suite, test_file):

You might want to add a short docstring here documenting what this function returns now, since it's no longer obvious.
Attachment #8520732 - Flags: review?(ted) → review+
https://hg.mozilla.org/mozilla-central/rev/140c9b452bf5
https://hg.mozilla.org/mozilla-central/rev/f941c8c85ae0
https://hg.mozilla.org/mozilla-central/rev/3d75b3fcfb90
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.