Closed Bug 907552 Opened 11 years ago Closed 11 years ago

Running mochitests via manual runtests.py invocation is still broken

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: bzbarsky, Assigned: ahal)

References

Details

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #899849 +++ CHANGESET: 342c800534ab STEPS TO REPRODUCE: mozilla% ../obj-firefox/_virtualenv/bin/python ../obj-firefox/_tests/testing/mochitest/runtests.py --test-path=content/base/test/test_nodelist_holes.html EXPECTED RESULTS: run the test ACTUAL RESULTS: Traceback (most recent call last): File "../obj-firefox/_tests/testing/mochitest/runtests.py", line 729, in <module> main() File "../obj-firefox/_tests/testing/mochitest/runtests.py", line 713, in main options = parser.verifyOptions(options, mochitest) File "/Users/bzbarsky/mozilla/vanilla/obj-firefox/_tests/testing/mochitest/mochitest_options.py", line 346, in verifyOptions options.app = build_obj.get_binary_path() File "/Users/bzbarsky/mozilla/vanilla/mozilla/python/mozbuild/mozbuild/base.py", line 280, in get_binary_path substs = self.substs File "/Users/bzbarsky/mozilla/vanilla/mozilla/python/mozbuild/mozbuild/base.py", line 240, in substs return self.config_environment.substs File "/Users/bzbarsky/mozilla/vanilla/mozilla/python/mozbuild/mozbuild/base.py", line 227, in config_environment raise Exception('config.status not available. Run configure.') Exception: config.status not available. Run configure. Looks just like bug 899849 (including the steps to reproduce), except with a slightly different stack... I have no idea whether this was fixed and then regressed or was never fixed; this is the first time I've tried to run tests locally with a pull that includes the fix for bug 899849.
Summary: Properly resolve build environment when running inside virtualenv → Running mochitests via manual runtests.py invocation is still broken
Tried the STR both within the objdir and the topsrcdir and can't reproduce. Looks like the objdir is outside of topsrcdir. Maybe that combined with running from topsrcdir is having a weird interaction.
> Looks like the objdir is outside of topsrcdir. Yes, absolutely, in my case. They're siblings.
I fixed this specific case in bug 899849, this is what my srcdir/objdir look like as well. Did we regress this already?
So I just tried pulling rev 0feed139b856 (which was the changeset that was checked in for bug 899849). In a build from that changeset, I still see this proble therem, with the stack from bug 899849...
I can't reproduce this so this is untested, but I *think* this should work for bz's case. Boris, can you give this patch a spin (shouldn't need to rebuild)? If this doesn't work, do you have MOZCONFIG set? If not, does setting it work?
Flags: needinfo?(bzbarsky)
Andrew, that patch makes things work for me.
Flags: needinfo?(bzbarsky)
Comment on attachment 794133 [details] [diff] [review] Add ability to pass cwd into MozbuildObject.from_environment() Ted, are you ok taking this patch? I don't think it should break any other workflows.. but I might be wrong.
Attachment #794133 - Flags: review?(ted)
Attachment #794133 - Flags: review?(ted) → review+
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Thank you!
This broke mochitests for me and :smirea. The common thread: we both have mach installed in $PATH. (~/bin in my case). cwd is being set as ~/bin by the logic in mochitest_options.py and we thus fail to find the mozinfo.py file or a source dir.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I realized that this should have been changed after I pushed the last patch (and actually was planning to land the fix along with bug 908874), but for expediency, here is the fix on its own.
Attachment #795441 - Flags: review?(gps)
Attachment #795441 - Flags: review?(gps) → review+
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: