Cannot run cppunittests in a single directory

NEW
Unassigned

Status

5 years ago
11 months ago

People

(Reporter: Ehsan, Unassigned)

Tracking

Trunk
x86
macOS

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 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
Component: mach → Build Config

Comment 1

5 years ago
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.

Updated

11 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.