Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » Guidelines for delimiters in paths (desperately need to be able to run tests on WIN and UNIX platforms but delimiters are different. When do I have to deal with this in ECL. How can I make the delimiter coorespond to the current OS)
Guidelines for delimiters in paths [message #1714323] Wed, 11 November 2015 13:14 Go to next message
Eclipse UserFriend
I have to test on both WIn and Unix hosts and not feasible to create and maintain separate testing. The only issue so far is that file locations obviously use a different delimiter. I need to be able to make these delimiters dependent on the host OS anywhere that ECL is sensitive to this. Does ECL have the ability to translate the delimiters to the correct one at run time. If not then when does the ECL use the string as coded regardless of host.
Re: Guidelines for delimiters in paths [message #1714397 is a reply to message #1714323] Thu, 12 November 2015 06:35 Go to previous messageGo to next message
Eclipse UserFriend
Hey mate probably is not the best solution but you can :

1. Use a java program
System.getProperty("os.name");
to get the system and write it in csv file

2. To run the program described in the step before you can use /exec-process -command while to get the result you can write in csv and get the data using read-csv-file.

3. Change the path you need in base of the results (Just an if statement)

You can also create a procedure, insert in ECL script context with the scope to call it from different files.

[Updated on: Thu, 12 November 2015 06:38] by Moderator

Re: Guidelines for delimiters in paths [message #1714731 is a reply to message #1714397] Mon, 16 November 2015 04:43 Go to previous messageGo to next message
Eclipse UserFriend
Hi Walter, Angelo,

In addition to all mentioned above I would recommend to use get-by-os ECL Command: https://hudson.eclipse.org/rcptt/job/rcptt-all/ws/releng/doc/target/doc/ecl/index.html#get-by-os

Kind regards,
Ulyana.
Re: Guidelines for delimiters in paths [message #1714732 is a reply to message #1714397] Mon, 16 November 2015 04:43 Go to previous messageGo to next message
Eclipse UserFriend
Hi Walt, Angelo,

In addition to all mentioned above I would recommend to use get-by-os ECL Command: https://hudson.eclipse.org/rcptt/job/rcptt-all/ws/releng/doc/target/doc/ecl/index.html#get-by-os

Kind regards,
Ulyana.
Re: Guidelines for delimiters in paths [message #1714741 is a reply to message #1714731] Mon, 16 November 2015 05:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ulyana,
Good to know, in this way using get-by-os ECL Command is less complicated.
You RoCK
Thank you.
Angelo Luciani

Walt put this thread as solved, please.
Re: Guidelines for delimiters in paths [message #1714934 is a reply to message #1714741] Tue, 17 November 2015 12:53 Go to previous message
Eclipse UserFriend
I used get-by-os to set a delimiter value but didn't always get the correct parsing of the path by the ECL. It seems that in certain circumstances I would still have the issue of once the value is substituted it will be parsed again as a backslash, so sorry, not solved. I didn't give you enough details I guess. I don't know the path until run time as it is constructed using several run time values and I need to build the path to be used during execution, so when building the complete path I have to supply the delimiter. In addition the windows backslash is an escape in other os so for example if I use the backslash delimiter in a parameter how many times do I have to account for the escape? Java/JavaScript handles this if I use the property value for the delimiter but does ECL always treat a string parameter backslash from a variable as an escape or maybe ECL handle path parameters as URI and the delimiter is converted for me? i.e. if I use a forward slash in windows os does it substitutes the backslash as needed? I know this is a frustrating issue when using both windows and unix but that's the world we live in.
Previous Topic:can the skipexecution tag be used with the runner when executing a suite?
Next Topic:[SOLVED] Failed to execute goal org.eclipse.rcptt:rcptt-maven-plugin:2.0.0:execute
Goto Forum:
  


Current Time: Fri Jun 20 16:59:39 EDT 2025

Powered by FUDForum. Page generated in 0.04026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top