Closed Bug 568727 Opened 15 years ago Closed 14 years ago

Update packaging for automation scripts

Categories

(Mozilla QA Graveyard :: Mozmill Automation, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

()

Details

Attachments

(1 file)

Right now we are using a really messy method to load necessary modules from a sub folder which is not in the system path. As Jeff mentioned I will have to look at http://k0s.org/portfolio/packaging.html
For e.g. http://github.com/whimboo/mozmill/blob/firefox-automation/scripts/firefox-automation/testrun_bft.py this should be easy. Instead of doing {{{ base_path = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(base_path, 'libs')) from testrun import BftTestRun }}} Add a __init__.py file to the 'libs' subdirectory (it can be an empty file, as long as it's there), then just make it `from libs.testrun import BftTestRun`. I'm not sure why things are organized the way they are (e.g., libs seems counter-intuitive to me), but I haven't had a chance to really study this code, but that's another issue
(In reply to comment #1) > Add a __init__.py file to the 'libs' subdirectory (it can be an empty file, as > long as it's there), then just make it `from libs.testrun import BftTestRun`. Lets see if that works. > I'm not sure why things are organized the way they are (e.g., libs seems > counter-intuitive to me), but I haven't had a chance to really study this code, > but that's another issue Shall I call it testrun? The reason is that I do not want to clutter the root where all the scripts are located you can execute.
Component: Mozmill → Mozmill Tests
QA Contact: mozmill → mozmilltests
Summary: [mozmill] Update packaging for automation scripts → Update packaging for automation scripts
Move of Mozmill related project bugs to newly created components. You can filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Component: Mozmill Tests → Mozmill Automation
Product: Testing → Mozilla QA
QA Contact: mozmill-tests → mozmill-automation
Whiteboard: [mozmill-automation]
Version: Trunk → unspecified
Attached patch Patch v1 (deleted) — Splinter Review
Simply fix to correctly use the packaging method of Python.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Attachment #506786 - Flags: review?(jhammel)
Attachment #506786 - Flags: review?(jhammel) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: