[PATCH] autobuild: fix quoting of --restrict-tests

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

[PATCH] autobuild: fix quoting of --restrict-tests

Samba - samba-technical mailing list
Hi all,

Currently, one must use autobuild.py --restrict-tests="'test1 test2'".
Patch removes the need for the nested quoting. Review appreciated.

Thanks,
- Jamie

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] autobuild: fix quoting of --restrict-tests

Samba - samba-technical mailing list
*ahem*... here is the patch, which I obviously remembered to attach to
the initial email...

On 19/12/17 16:59, Jamie McClymont wrote:
> Hi all,
>
> Currently, one must use autobuild.py --restrict-tests="'test1 test2'".
> Patch removes the need for the nested quoting. Review appreciated.
>
> Thanks,
> - Jamie
>

samba-autobuild-quote.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] autobuild: fix quoting of --restrict-tests

Samba - samba-technical mailing list
hi Jamie,

Thanks, that is obviously right.

>> Currently, one must use autobuild.py --restrict-tests="'test1 test2'".
>> Patch removes the need for the nested quoting. Review appreciated.
>>
> --- a/script/autobuild.py
> +++ b/script/autobuild.py
> @@ -83,7 +83,7 @@ tasks = {
>  
>      "samba-test-only" : [ ("configure", "./configure.developer --with-selftest-prefix=./bin/ab  --abi-check-disable" + samba_configure_params, "text/plain"),
>                            ("make", "make -j", "text/plain"),
> -                          ("test", "make test FAIL_IMMEDIATELY=1 TESTS=${TESTS}", "text/plain") ],
> +                          ("test", "make test FAIL_IMMEDIATELY=1 TESTS=\"${TESTS}\"", "text/plain") ],
>  

though I would slightly prefer:

 +                          ("test", 'make test FAIL_IMMEDIATELY=1 TESTS="${TESTS}"', "text/plain") ],

using single quotes for the python string to avoid backslashes inside.

Either way, RB+ me.


Douglas

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] autobuild: fix quoting of --restrict-tests

Samba - samba-technical mailing list
On Tue, 19 Dec 2017 20:54:40 +1300
Douglas Bagnall via samba-technical <[hidden email]>
wrote:

> hi Jamie,
>
> Thanks, that is obviously right.
>
> >> Currently, one must use autobuild.py --restrict-tests="'test1
> >> test2'". Patch removes the need for the nested quoting. Review
> >> appreciated.
> >>
> > --- a/script/autobuild.py
> > +++ b/script/autobuild.py
> > @@ -83,7 +83,7 @@ tasks = {
> >  
> >      "samba-test-only" : [ ("configure", "./configure.developer
> > --with-selftest-prefix=./bin/ab  --abi-check-disable" +
> > samba_configure_params, "text/plain"), ("make", "make -j",
> > "text/plain"),
> > -                          ("test", "make test FAIL_IMMEDIATELY=1
> > TESTS=${TESTS}", "text/plain") ],
> > +                          ("test", "make test FAIL_IMMEDIATELY=1
> > TESTS=\"${TESTS}\"", "text/plain") ],
>
> though I would slightly prefer:
>
>  +                          ("test", 'make test FAIL_IMMEDIATELY=1
> TESTS="${TESTS}"', "text/plain") ],
>
> using single quotes for the python string to avoid backslashes inside.
>
> Either way, RB+ me.
>
>
> Douglas
>

Totally agree, except the line is over 80 characters ;-)

Rowland