Opened 11 years ago
Closed 9 years ago
#10511 closed enhancement (worksforme)
[patch]Allow doh runner.js to register module paths when used from rhino/runner.sh
Reported by: | Tom Elliott | Owned by: | haysmark |
---|---|---|---|
Priority: | low | Milestone: | tbd |
Component: | TestFramework | Version: | 1.4.0 |
Keywords: | Cc: | Tom Trenka | |
Blocked By: | Blocking: |
Description
Hey guys.
Not sure if I'm totally missing the point here, but I've been trying to run some tests from the commandline via rhino.
My directory structure is like: (See attached pic, trac was mangling all my ascii-art :(
Now, I want to run the tests in myProject/tests/module.js as part of our maven2 test cycle, i.e. from the commandline. Because myProject is not a sister to the src relesae of dojo I need to register the module. All good so far.
However, I can't figure out how to do this when running runner.sh from the command line.
I've modified runner.js to allow runner.sh to be run thus:
./runner.sh registerModulePaths=myProject,../../myProject:foo,../../foo testModule=myProject.tests.module
(So, you can register more than one module path splitting with a colon. However, it looks like you can only specify a single testModule so presumably that's redundant anyway?)
Patch is attached. If this isn't needed can someone tell me what I'm doing wrong :).
Thanks,
Tom
Attachments (2)
Change History (11)
Changed 11 years ago by
Attachment: | dojoDirStructure.png added |
---|
comment:1 Changed 11 years ago by
Component: | General → TestFramework |
---|---|
Owner: | changed from anonymous to alex |
Summary: | Allow doh runner.js to register module paths when used from rhino/runner.sh → [patch]Allow doh runner.js to register module paths when used from rhino/runner.sh |
comment:3 Changed 9 years ago by
Cc: | Tom Trenka added |
---|---|
Owner: | changed from dylan to Adam Peller |
Priority: | high → low |
Status: | new → assigned |
This looks to be a dupe of #5630 ; reassigning to peller (owner of the other ticket) and adding me as a cc.
comment:4 Changed 9 years ago by
I'm ok marking this as a dup, but I'm uncomfortable making changes to DOH and probably not able to apply these changes anytime soon
comment:5 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Duplicate of #5630.
comment:6 Changed 9 years ago by
The attached patch solves this problem for me, whereas the patch attached to #5630 seems to be solving a different issue.
comment:7 Changed 9 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:8 Changed 9 years ago by
Owner: | changed from Adam Peller to haysmark |
---|---|
Status: | reopened → assigned |
Mark, can you please take a look at these patches?
comment:9 Changed 9 years ago by
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
In AMD, instead of registering module paths, you load a loader script that sets dojoConfig with the required packages and then loads dojo.js. The following command will run the test in someModule:
java -jar ../shrinksafe/js.jar ../../myProject/loader.js baseUrl=../../dojo load=doh test=someModule/tests/module
loader.js:
dojoConfig={ packages:[{ name:"someModule", location:"../myProject/someModule" }] }; load("../../dojo/dojo.js");
We see precisely this sort of configuration in runner.html with _parseURLargs.js.
might be related to #5630