Generate cppunittest.ini at build time

NEW
Unassigned

Status

()

Core
Build Config
a year ago
5 months ago

People

(Reporter: glandium, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
It seems wasteful that we need to define C++ unit tests both in moz.build and cppunittests.ini, with the latter containing skip rules that probably more or less (but likely subtly not) match conditions in moz.build.

If instead the file was generated at build time, from what's in moz.build, things would be simpler for everyone.
See also bug 1314514 comment 14, where padenot just realized that a couple of libcubeb unit tests haven't been running for the past two years because they weren't listed in cppunittests.ini. I wonder how many other tests we have like that.

I also wonder if any of the 'skip-if' lines are in the wrong place. It's easy to mistakenly think that a 'skip-if' line affects the test in the subsequent line, when it really affects the test in the preceding line.
I think we wound up with the checked-in ini file as a crummy stopgap so we could stand up C++ unittests on Android.

Updated

8 months ago
Summary: Generate cppunittests.ini at build time → Generate cppunittest.ini at build time
See Also: → bug 1378009
If the main reason for the hardcoded manifest is the skip-if conditions, we could define cppunittest.ini manifests in moz.build instead of the tests themselves. This would make cppunittests consistent with most of the other test harnesses.
I've marked bug 1378009 (Add build-time check that all cppunittest files are present in testing/cppunittest.ini) as this bug here is a better option.

But as Andrew said in bug 1378009 comment 1, if this bug here turns out to be difficult to implement, feel free to reopen bug 1378009 as an intermediate solution.
You need to log in before you can comment on or make changes to this bug.