Open Bug 1159395 Opened 7 years ago Updated 7 years ago
Our test manifests can't take a round trip through the manifest parser
"support-files" and "generated-files" need whitespace to be parsed correctly and the manifest parser doesn't know how to deal with this, so using manifestparser's own "write" will produce a manifest that can't be parsed. The workaround is to throw out these fields, which is ok for some use cases because these fields seem to be more concerned with installing tests than running them.
This is out of scope for this bug, but I always thought manifestparser should have a more formal notion of types. For example, there are several expression types (skip-if, fail-if), several list types (support-files, tags), and even expressions with a value (subsuite). As it stands, options of the same "type" are all implemented independently. For example tags are implemented here: https://dxr.mozilla.org/mozilla-central/source/testing/mozbase/manifestparser/manifestparser/filters.py#309 While support-files are implemented here: https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/frontend/emitter.py#1001
It's a related problem. Because as you pointed out we're doing more parsing outside the manifest parser for fields that are lists ("head" files is another that can be a list, but that's parsed in the xpcshell harness), we can't ask the manifest parser to have a notion of how to pretty print these fields.
You need to log in before you can comment on or make changes to this bug.