Ant task passing a file with the arguments

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Ant task passing a file with the arguments

Alexandru Popescu ☀

Hi all!

As some of you may know, in order to cope with the command line length
limitation, the Ant task is passing the TestNG arguments through a
file. However, I am wondering about the reasons why we have chosen to
put all arguments on a single line separated by space (and having to
deal with arguments that have inner spaces, like paths) instead of
passing one arg per line.

If there are no against arguments, I would like to make this change as
the code dealing with it is both ugly and still fragile.

BR,

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Ant task passing a file with the arguments

Hani Suleiman

Aren't quote marks the standard way of dealing with that?

On Feb 20, 2007, at 11:52 AM, Alexandru Popescu wrote:

>
> Hi all!
>
> As some of you may know, in order to cope with the command line length
> limitation, the Ant task is passing the TestNG arguments through a
> file. However, I am wondering about the reasons why we have chosen to
> put all arguments on a single line separated by space (and having to
> deal with arguments that have inner spaces, like paths) instead of
> passing one arg per line.
>
> If there are no against arguments, I would like to make this change as
> the code dealing with it is both ugly and still fragile.
>
> BR,
>
> ./alex
> --
> .w( the_mindstorm )p.
>   TestNG co-founder
> EclipseTestNG Creator
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Ant task passing a file with the arguments

Alexandru Popescu ☀

On 2/20/07, Hani Suleiman <[hidden email]> wrote:
>
> Aren't quote marks the standard way of dealing with that?
>

Yes it is the standard way, but my question is: why do I have to deal
with it as long as I don't have to. Do you see any benefit in having
in the arguments file:

-d "D:\tmp\out dir" -suitename "Ant tralala" -testname "Ant tralala 2"
"path to some class" "path to some class"

instead of:

-d
D:\tmp\out dir
-suitename
Ant tralala
-testname
Ant tralala 2
path to some class
path to some class

?

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

> On Feb 20, 2007, at 11:52 AM, Alexandru Popescu wrote:
>
> >
> > Hi all!
> >
> > As some of you may know, in order to cope with the command line length
> > limitation, the Ant task is passing the TestNG arguments through a
> > file. However, I am wondering about the reasons why we have chosen to
> > put all arguments on a single line separated by space (and having to
> > deal with arguments that have inner spaces, like paths) instead of
> > passing one arg per line.
> >
> > If there are no against arguments, I would like to make this change as
> > the code dealing with it is both ugly and still fragile.
> >
> > BR,
> >
> > ./alex
> > --
> > .w( the_mindstorm )p.
> >   TestNG co-founder
> > EclipseTestNG Creator
> >
> > >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Ant task passing a file with the arguments

Hani Suleiman


On Feb 20, 2007, at 11:56 AM, Alexandru Popescu wrote:

>
> On 2/20/07, Hani Suleiman <[hidden email]> wrote:
>>
>> Aren't quote marks the standard way of dealing with that?
>>
>
> Yes it is the standard way, but my question is: why do I have to deal
> with it as long as I don't have to. Do you see any benefit in having
> in the arguments file:
>
> -d "D:\tmp\out dir" -suitename "Ant tralala" -testname "Ant tralala 2"
> "path to some class" "path to some class"
>
> instead of:
>
> -d
> D:\tmp\out dir
> -suitename
> Ant tralala
> -testname
> Ant tralala 2
> path to some class
> path to some class
>
> ?

Yes, because it means it allows for paths with spaces in command line  
invocation, assuming the handling is centralized, not just when  
invoked via ant or via generated files.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Ant task passing a file with the arguments

Alexandru Popescu ☀

On 2/20/07, Hani Suleiman <[hidden email]> wrote:

>
>
> On Feb 20, 2007, at 11:56 AM, Alexandru Popescu wrote:
>
> >
> > On 2/20/07, Hani Suleiman <[hidden email]> wrote:
> >>
> >> Aren't quote marks the standard way of dealing with that?
> >>
> >
> > Yes it is the standard way, but my question is: why do I have to deal
> > with it as long as I don't have to. Do you see any benefit in having
> > in the arguments file:
> >
> > -d "D:\tmp\out dir" -suitename "Ant tralala" -testname "Ant tralala 2"
> > "path to some class" "path to some class"
> >
> > instead of:
> >
> > -d
> > D:\tmp\out dir
> > -suitename
> > Ant tralala
> > -testname
> > Ant tralala 2
> > path to some class
> > path to some class
> >
> > ?
>
> Yes, because it means it allows for paths with spaces in command line
> invocation, assuming the handling is centralized, not just when
> invoked via ant or via generated files.

Ha?

For a command line like:

test "some path to file"

the argument will always get to your code without the enclosing "", so
I fail to see what you mean.

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Ant task passing a file with the arguments

Hani Suleiman

On Feb 20, 2007, at 12:00 PM, Alexandru Popescu wrote:

> For a command line like:
>
> test "some path to file"
>
> the argument will always get to your code without the enclosing "", so
> I fail to see what you mean.
>

Oh oops ,forgot that the shell takes care of that sort of thing. Fair  
point!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---