Relative paths

96 views
Skip to first unread message

Prashant Jain

unread,
Sep 28, 2012, 6:47:26 PM9/28/12
to js-test...@googlegroups.com
In my config file, I have to specify relative path the .js files. E.g. - ../../folderx/filey.js . I noticed that relative path do not work. On research, I learnt that this problem was fixed in an earlier version but re-introduced in 1.3.4.b. 

Is this true? Are there any eta's when this is expected to be fixed?

Fritz Stelluto

unread,
Nov 12, 2012, 1:33:03 PM11/12/12
to js-test...@googlegroups.com
Having the same problem with 1.3.5 with relative AND absolute path

Structure:
A
+B
+-C
+--jtd.conf
+D
+-file.js

jtd.conf includes 
load
 - ../../D/file.js
it fails with
java.lang.RuntimeException: Impossible to read file: /A/B/ObjFramework.js

if I change jtd.conf to  
 - ../../../D/file.js
it fails with
java.lang.RuntimeException: Impossible to read file: /A/B/ObjFramework.js
Cannot read [
/A/B/C/./../../../D/file.js

if I change to absolute path
/A/D/file.js
it fails with
java.lang.RuntimeException: Impossible to read file: /A/B/ObjFramework.js
Cannot read [
/A/B/C/./D/file.js

I used to get this error a year or so ago, then it was fixed. It now seems to be back! Quite frustrating
Hardly any development and regression creeping in all the time.
After having recommended it for a while, I am ready to give up on JSTD. 


Cheers
Fritz

Cory Smith

unread,
Nov 12, 2012, 3:43:34 PM11/12/12
to js-test...@googlegroups.com
Are you setting a base path?
> --
> You received this message because you are subscribed to the Google Groups
> "JsTestDriver" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/js-test-driver/-/RYFkuS0eQZcJ.
>
> To post to this group, send email to js-test...@googlegroups.com.
> To unsubscribe from this group, send email to
> js-test-drive...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/js-test-driver?hl=en.

Fritz Stelluto

unread,
Nov 13, 2012, 6:05:52 AM11/13/12
to js-test...@googlegroups.com
Hi

calling JST with " --basePath . " fixes the issue. Is this a new development? It seems that should be the default behaviour.
Anyway, thanks for helping me get it to work.

Cheers
fritz

Cory Smith

unread,
Nov 13, 2012, 11:49:41 AM11/13/12
to js-test...@googlegroups.com
It's complicated, due to some legacy functionality: if there is no
basePath, it uses the parent directory of the configuration file.

By declaring "--basePath ." it uses the directory of the invocation.

Just noticed the fact the docs do not reflect this. Damn. Might have
lost something in the migration to git.
Reply all
Reply to author
Forward
0 new messages