Closed Bug 1181520 Opened 9 years ago Closed 9 years ago

Remove reftest commandline flags

Categories

(Testing :: Reftest, defect)

defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: jgraham, Unassigned)

References

Details

Attachments

(1 file, 10 obsolete files)

(deleted), text/x-review-board-request
jmaher
: review+
Details
Reftests currently have two ways of passing in options: command line arguments, that are only used on desktop, and via prefs, which is only used on mobile. This has several disadvantages, notably unnecessary complexity since the implementation adds preprocessor directives to the reftest.js file, and makes it much easier to break things on mobile when making changes on desktop. As part of bug 1181516 I want to pass in a number of manifests and the associated test filters for each. This is easy to do via prefs because I can json serialize a structure like {manifest1:[filter1-1, filter1-2], manifest2:[filter2-1]} and read it in reftest.js. I could do the same thing via the command line, I suppose, but it seems perverse to make two implementations when no one is actually ever going to write this by hand. It also seems strange to have this read from the prefs when everything else is read from the command line. Therefore I propose simply removing commandline support and always passing data into the harness via prefs. The only problem I can see is if someone is running the binary with reftest options set directly, for some reason, without going through mach or at least runreftest.py. Hopefully no one is doing that, but…
Flags: needinfo?(dbaron)
I know dbaron has said historically that he uses "firefox -reftest" directly, so I'd defer to him, but it's possible that having this particular case require the Python harness wouldn't be bad.
I've never liked requiring runreftest.py because running firefox -reftest directly allows more flexibility with debugging tools. But I guess I'm ok with dropping support for the command line way of passing things to reftest. (Are there any command line options today other than "-reftest <manifest>"? Is it hard to keep just that?)
Flags: needinfo?(dbaron)
(In reply to David Baron [:dbaron] ⏰UTC-7 from comment #2) > I've never liked requiring runreftest.py because running firefox -reftest > directly allows more flexibility with debugging tools. Interesting. Do you have examples of tasks that you find hard to do using the harness and so tend to use the binary for directly? These might be workflows we want to improve for everyone. > But I guess I'm ok > with dropping support for the command line way of passing things to reftest. > (Are there any command line options today other than "-reftest <manifest>"? > Is it hard to keep just that?) I think that's the only one. Removing it is just easier because there doesn't need to be logic about how the multiple ways of specifying reftests interact. If no one's using it that makes for ε less complexity to maintain in the harness. But if it's something that will make you more productive I can make it work.
Nothing in particular that I know of that's broken right now -- just that the interesting cases seem to regress, and I have the sense that anytime I want to try something interesting (like, say, use a debugging tool that requires passing a quoted argument through the various python scripts, or wanting to pass an environment variable to firefox but not to the python stuff (or, say, an xpcshell process that it starts) for, say, the nsTraceRefcnt-based leak debugging tools) that there's a decent chance I'll have to debug something that's broken along the pipeline because things have regressed. I'm ok with removing it.
Bug 1181520 - Remove support for passing in reftest arguments via the command line. This unifies how reftests are invoked across desktop and mobile, and paves the way for introducing more complex datatypes that are unreasonable to express on the command line.
Attachment #8646321 - Flags: review?(jmaher)
Bug 1181516 - Allow reftests to take paths to multiple directories containing tests on the command line. This makes reftest command line arguments behave more like other test suites, so we can use a simple unified syntax for e.g. |mach try|. The patch also reworks the command line argument parsing to use argparse rather than optparse, and causes mach to reuse the same parser as the suite.
Attachment #8646322 - Flags: review?(jmaher)
Bug 1193223 - Add reftest support to mach test.
Attachment #8646323 - Flags: review?(cmanchester)
Bug 1181516 - Better support for providing a directory name and discovering reftests under that directory
Attachment #8646324 - Flags: review?(jmaher)
Bug 1193224 - Remove vestigial --tests-root-dir option from xpcshell tests.
Attachment #8646325 - Flags: review?(ahalberstadt)
Bug 1193257 - Make xpcshell harness command line arguments path filters for tests
Attachment #8646326 - Flags: review?(ahalberstadt)
Bug 1193257, 1181516 - Update unittest mozconfigs for all platforms
Attachment #8646327 - Flags: review?(cmanchester)
Bug 1188730 - Exit with a warning and status code 0 if we don't find any mochitests to run. This can happen, in particular with the M-oth job on buildbot in combination with test selection through |mach try| without being an error. That job is a particular problem because it runs several mochitest-based suites of which only a subset may have tests selected
Attachment #8646328 - Flags: review?(cmanchester)
Bug 1193215 - Support for passing test directories through mach try. This adds support for web-platform-tests to mach try. It changes the implementation so that instead of passing paths to manifests, the user passes arbitary paths in the source tree, and tests under that path are run, with test discovery mainly left to the harness.
Attachment #8646329 - Flags: review?(cmanchester)
Bug 1193264 - Add support for saving and reusing try strings in mach try Adds --save and --preset arguments that can be used to store and reuse frequently used try strings.
Attachment #8646330 - Flags: review?(cmanchester)
Attachment #8646321 - Attachment is obsolete: true
Attachment #8646321 - Flags: review?(jmaher)
Attachment #8646322 - Attachment is obsolete: true
Attachment #8646322 - Flags: review?(jmaher)
Attachment #8646323 - Attachment is obsolete: true
Attachment #8646323 - Flags: review?(cmanchester)
Attachment #8646324 - Attachment is obsolete: true
Attachment #8646324 - Flags: review?(jmaher)
Attachment #8646325 - Attachment is obsolete: true
Attachment #8646325 - Flags: review?(ahalberstadt)
Attachment #8646326 - Attachment is obsolete: true
Attachment #8646326 - Flags: review?(ahalberstadt)
Attachment #8646327 - Attachment is obsolete: true
Attachment #8646327 - Flags: review?(cmanchester)
Attachment #8646328 - Attachment is obsolete: true
Attachment #8646328 - Flags: review?(cmanchester)
Attachment #8646329 - Attachment is obsolete: true
Attachment #8646329 - Flags: review?(cmanchester)
Attachment #8646330 - Attachment is obsolete: true
Attachment #8646330 - Flags: review?(cmanchester)
Bug 1181520 - Remove support for passing in reftest arguments via the command line. This unifies how reftests are invoked across desktop and mobile, and paves the way for introducing more complex datatypes that are unreasonable to express on the command line.
Attachment #8646443 - Flags: review?(jmaher)
Comment on attachment 8646443 [details] MozReview Request: Bug 1181520 - Remove support for passing in reftest arguments via the command line. https://reviewboard.mozilla.org/r/15753/#review14077 ::: layout/tools/reftest/reftest.js (Diff revision 1) > -#if BOOTSTRAP 1) do we still use bootstrap mode for android? 2) does this work on android? 3) removing if/else appears like we are keeping a lot of code from both parts. Can we reduce the code to just the else block?
Attachment #8646443 - Flags: review?(jmaher)
https://reviewboard.mozilla.org/r/15753/#review14263 ::: layout/tools/reftest/reftest.js (Diff revision 1) > -#if BOOTSTRAP This works on android on Try at least. It's not surprising because we are mostly using the code that was already used on mobile and dropping the desktop-specific part. I think the fact that we have kept some of the code from the else clause is the bug that needs to be fixed.
https://reviewboard.mozilla.org/r/15753/#review14077 > 1) do we still use bootstrap mode for android? > 2) does this work on android? > 3) removing if/else appears like we are keeping a lot of code from both parts. Can we reduce the code to just the else block? This works on android on Try at least. It's not surprising because we are mostly using the code that was already used on mobile and dropping the desktop-specific part. I think the fact that we have kept some of the code from the else clause is the bug that needs to be fixed.
Attachment #8646443 - Flags: review?(jmaher)
Comment on attachment 8646443 [details] MozReview Request: Bug 1181520 - Remove support for passing in reftest arguments via the command line. Bug 1181520 - Remove support for passing in reftest arguments via the command line. This unifies how reftests are invoked across desktop and mobile, and paves the way for introducing more complex datatypes that are unreasonable to express on the command line.
Comment on attachment 8646443 [details] MozReview Request: Bug 1181520 - Remove support for passing in reftest arguments via the command line. https://reviewboard.mozilla.org/r/15753/#review15761 thanks, this is looking good.
Attachment #8646443 - Flags: review?(jmaher) → review+
Looks like Android 4.0 debug reftests are scheduled on inbound but not on try.. that's kind of bad.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: