Closed
Bug 568727
Opened 15 years ago
Closed 14 years ago
Update packaging for automation scripts
Categories
(Mozilla QA Graveyard :: Mozmill Automation, defect)
Mozilla QA Graveyard
Mozmill Automation
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: whimboo, Assigned: whimboo)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
k0scist
:
review+
|
Details | Diff | Splinter Review |
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
Comment 1•15 years ago
|
||
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
Assignee | ||
Comment 2•15 years ago
|
||
(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.
Assignee | ||
Updated•14 years ago
|
Component: Mozmill → Mozmill Tests
QA Contact: mozmill → mozmilltests
Summary: [mozmill] Update packaging for automation scripts → Update packaging for automation scripts
Assignee | ||
Comment 3•14 years ago
|
||
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
Assignee | ||
Comment 4•14 years ago
|
||
Simply fix to correctly use the packaging method of Python.
Updated•14 years ago
|
Attachment #506786 -
Flags: review?(jhammel) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•