Currently shared test libraries must exist in the same directory subtree as the tests, at least if you don't want to do something horrible with nsIEnvironment and RELATIVE_ROOT. This is limiting. Thunderbird wants to be able allow its mozmill test driver and shared utility modules to be used for testing extensions that do not live in-tree (and are not installed into the tree as part of the process). The collector mechanism is more than capable of explicitly scanning certain directories, so this is mainly a question of adding the appropriate command line arg to mozmill and relaying it across the jsbridge. (I am going to do this.)
In combination with bug 515341 that would be perfect.
I've pushed such a thing to my github repo: http://github.com/asutherland/mozmill/commit/fa889dd7695ce7bceff37919ef6b5f035ba9acfe Sadly there is some whitespace noise in there.
Hey Andrew, I've looked over this patch and tested it, and I think I'd like to take it for Mozmill 1.4.2. Can you give me a version without the whitespace changes?
I get this traceback when running without specifying the argument: Traceback (most recent call last): File "/usr/local/bin/mozmill", line 8, in <module> load_entry_point('mozmill==1.4.2b1', 'console_scripts', 'mozmill')() File "/Users/harth/mozmill/mozmill/mozmill/__init__.py", line 731, in cli CLI().run() File "/Users/harth/mozmill/mozmill/mozmill/__init__.py", line 688, in run self.mozmill.run_tests(self.options.test) File "/Users/harth/mozmill/mozmill/mozmill/__init__.py", line 272, in run_tests frame.runTestFile(test, False, self.libdirs) AttributeError: 'MozMill' object has no attribute 'libdirs' my command line is: mozmill -t ~/mozmill-tests/firefox/testAddons/testSearchAddons.js
Andrew, so this bug is about passing a command line option which specifies an external library folder to the tests?
The underlying goal is for a developer to be able to write a Thunderbird extension and test it using Thunderbird's mozmill test driver and having access to Thunderbird's shared mozmill-based modules. (Namely those found in comm-central/mail/test/mozmill/shared-modules.) I was accomplishing that in this case by allowing the test directory to be set to a path in the user's extension while it pulled the shared modules out of the thunderbird subtree. The solution could work another way, and maybe you already have this in hand, in which case feel free to close this.
Thanks Andrew. While reading you last comment I think this bug is similar to bug 581004. And exactly this missing feature has been fixed with CommonJS.
Marking as given by the last comments.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.