Closed Bug 1535048 Opened 6 years ago Closed 5 years ago

mach test browser/components/places/ doesn't run mochitest-chrome tests, exits with code 1

Categories

(Testing :: Mochitest, defect, P3)

Version 3
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: myk, Assigned: gbrown)

Details

(Whiteboard: dev-prod-2020)

mach test browser/components/places/ doesn't run the mochitest-chrome tests in browser/components/places/tests/chrome/, and it returns exit code 1, even though its "overall summary" suggests that the tests that it did run have all passed:

mach test browser/components/places/

Overall Summary
===============

mochitest-browser

Ran 1694 checks (1618 subtests, 76 tests)
Expected results: 1694
OK

xpcshell
~~~~~~~~
Ran 11 checks (11 tests)
Expected results: 11
OK
> echo $?
1

This is unexpected and can lead to the mistaken impression that the tests in that directory have all been run and passed, even though an entire suite of them haven't even been run. It also prevents subsequent commands from running if they depend on the success of that command, i.e.:

mach test browser/components/places/ && mach gtest … && …

Reading back in the log, it looks like "the mochitest command could not find any supported tests to run" at some point:

The mochitest command could not find any supported tests to run! The
following flavors and subsuites were found, but are either not supported on
firefox builds, or were excluded on the command line:

mochitest -f chrome (excluded by the command line)

Double check the command line you used, and make sure you are running in
context of the proper build. To switch build contexts, either run |mach|
from the appropriate objdir, or export the correct mozconfig:

$ export MOZCONFIG=path/to/mozconfig

But mach test browser/components/places/tests/chrome/ does run the mochitest-chrome tests:

mach test browser/components/places/tests/chrome/

Overall Summary
===============

mochitest-chrome

Ran 47 checks (41 subtests, 6 tests)
Expected results: 47
OK

So it isn't clear why it fails to do so when the test directory specified on the command line is browser/components/places.

Component: Python Test → Mochitest
Priority: -- → P3

I don't know what changed, but this works for me now. For example, I see browser/components/places/tests/chrome/test_0_bug510634.xhtml run when I run 'mach test browser/components/places'.

Assignee: nobody → gbrown
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Whiteboard: dev-prod-2020
You need to log in before you can comment on or make changes to this bug.