Open Bug 849900 Opened 11 years ago Updated 2 years ago

remove hacks to enable mozbase from the automation code when we are running all tests in a virtualenv

Categories

(Testing :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: jmaher, Unassigned)

References

Details

(Whiteboard: [mozbase])

in bug 827446, we are hacking the sys.path and our import statements for our harnesses to use mozbase modules outside of a virtualenv.  We need to ensure that these hacks are removed when the tests are always run from a virtualenv.
Whiteboard: [mozbase]
Blocks: 870532
See Also: → 707976
Is anything still blocking this?

I stumbled across the hack in mail/test/mozmill/runtest.py and saw that it deals with mozcrash. Bug 903616 is also about mozcrash, so I wonder whether there is a connection.

OR maybe automation.py requires the same hack somehow ...
My fuzz scripts will break if this hack is removed.  If I'm supposed to use virtualenv when calling automation.py (or its successor), I'll need help figuring out how to do that.
Our long-term goal is to neuter automation.py, and possibly remove it entirely. The replacement would be to use mozbase modules directly. The virtualenv requirement is mostly just to have the mozbase modules in the path. We could probably make a package out of what's left of automation.py with its own setup.py that you could run in a fresh virtualenv to get all the mozbase packages you need installed.
This has caused significant confusion in the past, and I just noticed some test packaging cruft associated with it I want to get rid of.

Jesse, is this still a concern for you?
Flags: needinfo?(jruderman)

I doubt it would break anything to remove this now, but surprisingly it's still in tree: https://searchfox.org/mozilla-central/rev/fca0be7e2cf2f922c9b927423ce28e8a04b3fd90/testing/xpcshell/runxpcshelltests.py#64

Flags: needinfo?(jruderman)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.