Building with MOZ_OBJDIR set breaks mach if there is an unclobbered build built without MOZ_OBJDIR




2 years ago
2 years ago


(Reporter: ng, Unassigned)



Firefox Tracking Flags

(firefox46 affected)




2 years ago
If one builds without setting MOZ_OBJDIR and then again with MOZ_OBJDIR set, mach fails to run tests, and seems generally confused.

Steps to reproduce:

1) perform an "in place" build via './mach build' (MOZ_OBJDIR is not set)
2) set MOZ_OBJDIR to another location in mozconfig
3) perform another build via './mach build'
4) attempt to run mochitests via './mach mochitests'

Expected result:
The mochitests run

Actual result:
A mach trace (see below)

Additional possibly related failures:
* I have seen but not captured other errors where tests were not able to find something/something/XPCshell.ini which may have been related.
* Builds were completing but the binary would not be in the expected place in MOZ_OBJDIR (if it was placed anywhere)

Unsetting the MOZ_OBJDIR, clobbering via './mach clobber' and resetting seems to fix things.

Mach trace:

### Now running mochitest-a11y.

Checking for orphan ssltunnel processes...
Checking for orphan xpcshell processes...
Error running mach:


The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error

The details of the failure are as follows:


  File "/Users/ngrunbaum/hg/mozilla-central/testing/mochitest/", line 551, in run_mochitest_general
  File "/Users/ngrunbaum/hg/mozilla-central/testing/mochitest/", line 302, in run_desktop_test
    result = mochitest.run_test_harness(options)
  File "/tmp/debug.moz/Users/ngrunbaum/hg/mozilla-central/obj-x86_64-apple-darwin15.0.0/_tests/testing/mochitest/", line 2595, in run_test_harness
    result = runner.runTests(options)
  File "/tmp/debug.moz/Users/ngrunbaum/hg/mozilla-central/obj-x86_64-apple-darwin15.0.0/_tests/testing/mochitest/", line 2140, in runTests
    testsToRun = self.getTestsToRun(options)
  File "/tmp/debug.moz/Users/ngrunbaum/hg/mozilla-central/obj-x86_64-apple-darwin15.0.0/_tests/testing/mochitest/", line 2076, in getTestsToRun
    tests = self.getActiveTests(options)
  File "/tmp/debug.moz/Users/ngrunbaum/hg/mozilla-central/obj-x86_64-apple-darwin15.0.0/_tests/testing/mochitest/", line 1088, in getActiveTests
    assert pathAbs.startswith(self.testRootAbs)
You need to log in before you can comment on or make changes to this bug.