Open Bug 969817 Opened 10 years ago Updated 2 years ago

Cannot run cppunittests in a single directory

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect

Tracking

(Not tracked)

People

(Reporter: ehsan.akhgari, Unassigned)

References

Details

$ ./mach cppunittest mfbt/tests/
cppunittests INFO | Running test Makefile.in
['/Users/ehsan/moz/src/mfbt/tests/Makefile.in']
 0:00.09 Caught exception running cpp unit tests: [Errno 13] Permission denied
Component: mach → Build Config
The directory should be the path of binaries.
e.g., /home/user/obj-x86_64-unknown-linux-gnu/dist/bin/mytest/
The bit of the mach command is here:
http://hg.mozilla.org/mozilla-central/annotate/14a98501048c/testing/mach_commands.py#l259

It's currently calling extract_unittests_from_args:
http://hg.mozilla.org/mozilla-central/annotate/14a98501048c/testing/runcppunittests.py#l148

which simply takes paths to executable files or directories of executable files. We ought to allow srcdir-relative paths (using knowledge from moz.build to choose just the cppunittests from those directories) or paths to .cpp files (similarly). This is probably somewhat involved to fix, since I'm not sure if we have the information we need in a useful format right now.
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.