Cannot run cppunittests in a single directory

NEW
Unassigned

Status

()

Core
Build Config
4 years ago
2 years ago

People

(Reporter: Away for a while, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
$ ./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

Updated

4 years ago
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/
Duplicate of this bug: 1039777
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.
You need to log in before you can comment on or make changes to this bug.