Open Bug 1419703 Opened 7 years ago Updated 2 years ago

generate an artifact from the bugzilla source job to indicate which files are test files

Categories

(Testing :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: jmaher, Assigned: jmaher)

Details

Attachments

(1 file, 1 obsolete file)

I would love to know which files are test cases (to answer how many test cases do I have in my component). In addition knowing which files are test support files are good as for code coverage we care about source file coverage and knowing that we have 231000 total files in tree, but <60000 have any coverage it is concerning- knowning that 114606 files are test related, makes the total covered files less concerning. We have data in tree right now to build a list of all test related filed- we should generate that as an artifact so we can start being smarter. To split out the test cases, possibly we can do that with a regex, or maybe we need to parse manifests or maybe add more meta data into moz.build files.
first attempt at this- not very optimal and just quickly hacked up. While this appears to work just fine, I am not sure if I am using the data properly- if this is r+ territory, please switch from feedback to review, I suspect there are other great ideas here or something obvious I am overlooking.
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Attachment #8930849 - Flags: feedback?(gps)
Comment on attachment 8930849 [details] [diff] [review] generate testfiles.json artifact from bugzilla job Review of attachment 8930849 [details] [diff] [review]: ----------------------------------------------------------------- This seems pretty reasonable. FWIW, that "test_files" attribute only captures the results of IMPACTED_TESTS: it isn't reading test manifests. I'm not sure if you want to call this out somewhere. ::: python/mozbuild/mozbuild/frontend/mach_commands.py @@ +188,5 @@ > missing_component = set() > seen_components = set() > component_by_path = {} > + test_paths = [] > + test_files = [] I think these should be sets. Then you can just insert items without testing for membership first. @@ +211,5 @@ > + for p in component_by_path: > + for tp in test_paths: > + path = tp > + if tp.endswith('**'): > + path = tp.strip('**') This can just be `path = tp.rstrip('**')`
Attachment #8930849 - Flags: feedback?(gps) → feedback+
now we will have a field for 'source' and 'test', we could eventually add 'testcase', 'third_party', 'data/binary', 'precompiled', etc. This does change the format of components.json- I do know that we consume components.json in activedata and can change our ingestion to be the new format. If desired I could create a new format and we can build on that.
Attachment #8930849 - Attachment is obsolete: true
Attachment #8933854 - Flags: review?(gps)
Comment on attachment 8933854 [details] [diff] [review] update components.json to be extensible and contain a field describing the type of file Review of attachment 8933854 [details] [diff] [review]: ----------------------------------------------------------------- Please write a new output file. We don't know who is consuming these files and need to maintain backwards compatibility. At the point you do that, we now have 3 output formats. It is probably best to move the logic for producing the data structure to its own function so the @Command method doesn't get any more polluted.
Attachment #8933854 - Flags: review?(gps) → review-
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: