Open
Bug 980148
Opened 11 years ago
Updated 2 years ago
Provide a mechanism to identify orphaned tests
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
NEW
People
(Reporter: gps, Unassigned)
Details
Attachments
(2 files)
5.79 KB,
patch
|
Details | Diff | Splinter Review | |
133.33 KB,
text/plain
|
Details |
There have been a number of bugs related to accidental deactivation of tests. See bug 924463 comment 22 for the latest issue.
I think there should be some mechanism for crawling the source tree to look for test files that aren't referenced anywhere. These test files would represent likely orphaned files that require action (likely addition to a test manifest or deletion).
The easy solution is to use the active build config as a reference point. Alternatives include scouring for well-known filenames (xpcshell.ini, mochitest.ini, etc) and using Python's ast module for extracting all test manifest files (even ones behind conditionals) from moz.build files.
Once we have a set of test manifest files, we should be able to reconcile their content with directory state and report on differences.
Reporter | ||
Comment 1•11 years ago
|
||
This patch provides a mechanism to identify orphaned test files in the
source tree.
A new mach command - orphaned-tests - is introduced. It prints out a
list of files in directories with test manifests that aren't referenced
by any manifest.
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → gps
Status: NEW → ASSIGNED
Reporter | ||
Comment 2•11 years ago
|
||
This is the output generated from the new mach command. It's rather...long.
There are things there that shouldn't be there, notably reftests. We don't have reftests hooked up to the build config (yet) and I didn't feel like rolling that for this patch.
There are other false positives because test files are listed in the .ini manifest but they are commented out (instead of being behind |skip-if = true|).
There do seem to be some legitimate entries in that list. See dom/permission/tests.
Reporter | ||
Comment 3•11 years ago
|
||
Ignore the comment about dom/permission/tests - they are still defined in a Makefile.in. Maybe I should wait for the conversion to manifests to complete before scouring this list.
Comment 4•11 years ago
|
||
I'm going to land a few patches right now, and I just have one more to fixup to get all mochitests into manifests.
FYI, if you wanted to hook up reftests to this, we do have an in-tree Python parser for reftest manifests:
http://mxr.mozilla.org/mozilla-central/source/layout/tools/reftest/print-manifest-dirs.py
It could almost certainly move somewhere else nowadays, it dates back a few years.
Reporter | ||
Updated•10 years ago
|
Assignee: gps → nobody
Reporter | ||
Updated•10 years ago
|
Status: ASSIGNED → NEW
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•