Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
On Monday 05 September 2011, Peter Rosin wrote: > Den 2011-09-05 11:37 skrev Stefano Lattarini: > > Ouch! Silly me for not thinking about that. > > And the quoting was off too, should have been s/\././g to > do what you intended... :-) > Double ouch, you're right again! $ x=`echo a.b | sed 's/\./\\./g'`; printf '%s\n' "$x" a.b I should really give up attemping to understand how the `\' escaping works inside backticks... I've been burned so many times, sigh... :-( And maybe it's about time to write a configure check that looks for a POSIX shell, so that we can run our tests with it and dispense with the clumsy workarounds for exotic bugs and limitations; most of the framework is already in place anyway (e.g., automatic re-execing of tests with the configure-time shell), so that shouldn't be too difficult. But I'm cooking another patch right now, so this will have to wait. > Pushed now, thanks for looking! > Regards, Stefano
Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
Den 2011-09-05 11:37 skrev Stefano Lattarini: > On Monday 05 September 2011, Peter Rosin wrote: >> Den 2011-09-05 10:06 skrev Stefano Lattarini: >>> On Monday 05 September 2011, Peter Rosin wrote: Hi! >>> Hi Peter, thanks for the patch. >>> This fixes a fail on Cygwin (and others I suppose). I'm aware that the lax non-gnu-tar branch adds even more laxness since $EXEEXT normally contains a dot for the oddball cases when it's non-empty, but that's so minor that I didn't bother to code around it... Ok for maint? >>> I only have a minor nit: I'd prefer the extraction of `EXEEXT' from >>> Makefile to be done by something like this (avoiding use of "eval"): >>> >>> EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'` >>> >>> And BTW, this could also be improved to allow escaping of literal >>> dots, as in: >>> >>> EXEEXT=`sed -n '/^EXEEXT *=/{ s/^EXEEXT *= *//; s/\./\\./g; p; }'` >>> >>> WDYT? >> >> I'm ok with your first alternative, but the second is undefined >> according to posix (at least 'Limitations of usual tools' in >> Autoconf states so; you can't have semicolon after a '{' verb) >> > Ah right; thank you for digging that up. > >> and, even worse, it breaks for the gnu tar branch. >> > Ouch! Silly me for not thinking about that. And the quoting was off too, should have been s/\././g to do what you intended... :-) >> So, unless someone else chimes in I'm pushing with this >> >> EXEEXT=`sed -n -e 's/^EXEEXT *= *//p' < ../Makefile` >> >> sometime later today. >> > Fine by me. Pushed now, thanks for looking! Cheers, Peter
Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
On Monday 05 September 2011, Peter Rosin wrote: > Den 2011-09-05 10:06 skrev Stefano Lattarini: > > On Monday 05 September 2011, Peter Rosin wrote: > >> Hi! > >> > > Hi Peter, thanks for the patch. > > > >> This fixes a fail on Cygwin (and others I suppose). > >> > >> I'm aware that the lax non-gnu-tar branch adds even more laxness > >> since $EXEEXT normally contains a dot for the oddball cases when > >> it's non-empty, but that's so minor that I didn't bother to code > >> around it... Ok for maint? > >> > > I only have a minor nit: I'd prefer the extraction of `EXEEXT' from > > Makefile to be done by something like this (avoiding use of "eval"): > > > > EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'` > > > > And BTW, this could also be improved to allow escaping of literal > > dots, as in: > > > > EXEEXT=`sed -n '/^EXEEXT *=/{ s/^EXEEXT *= *//; s/\./\\./g; p; }'` > > > > WDYT? > > I'm ok with your first alternative, but the second is undefined > according to posix (at least 'Limitations of usual tools' in > Autoconf states so; you can't have semicolon after a '{' verb) > Ah right; thank you for digging that up. > and, even worse, it breaks for the gnu tar branch. > Ouch! Silly me for not thinking about that. > So, unless someone else chimes in I'm pushing with this > > EXEEXT=`sed -n -e 's/^EXEEXT *= *//p' < ../Makefile` > > sometime later today. > Fine by me. Thanks, Stefano
Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
Den 2011-09-05 10:06 skrev Stefano Lattarini: > On Monday 05 September 2011, Peter Rosin wrote: >> Hi! >> > Hi Peter, thanks for the patch. > >> This fixes a fail on Cygwin (and others I suppose). >> >> I'm aware that the lax non-gnu-tar branch adds even more laxness >> since $EXEEXT normally contains a dot for the oddball cases when >> it's non-empty, but that's so minor that I didn't bother to code >> around it... Ok for maint? >> > I only have a minor nit: I'd prefer the extraction of `EXEEXT' from > Makefile to be done by something like this (avoiding use of "eval"): > > EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'` > > And BTW, this could also be improved to allow escaping of literal > dots, as in: > > EXEEXT=`sed -n '/^EXEEXT *=/{ s/^EXEEXT *= *//; s/\./\\./g; p; }'` > > WDYT? I'm ok with your first alternative, but the second is undefined according to posix (at least 'Limitations of usual tools' in Autoconf states so; you can't have semicolon after a '{' verb) and, even worse, it breaks for the gnu tar branch. So, unless someone else chimes in I'm pushing with this EXEEXT=`sed -n -e 's/^EXEEXT *= *//p' < ../Makefile` sometime later today. Cheers, Peter
Re: * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
On Monday 05 September 2011, Peter Rosin wrote: > Hi! > Hi Peter, thanks for the patch. > This fixes a fail on Cygwin (and others I suppose). > > I'm aware that the lax non-gnu-tar branch adds even more laxness > since $EXEEXT normally contains a dot for the oddball cases when > it's non-empty, but that's so minor that I didn't bother to code > around it... Ok for maint? > I only have a minor nit: I'd prefer the extraction of `EXEEXT' from Makefile to be done by something like this (avoiding use of "eval"): EXEEXT=`sed -n -e 's/^EXEEXT *= *//p'` And BTW, this could also be improved to allow escaping of literal dots, as in: EXEEXT=`sed -n '/^EXEEXT *=/{ s/^EXEEXT *= *//; s/\./\\./g; p; }'` WDYT? Thanks, Stefano
* tests/amhello-binpkg.test: Add missing $EXEEXT usage.
Hi! This fixes a fail on Cygwin (and others I suppose). I'm aware that the lax non-gnu-tar branch adds even more laxness since $EXEEXT normally contains a dot for the oddball cases when it's non-empty, but that's so minor that I didn't bother to code around it... Ok for maint? Cheers, Peter 2011-09-05 Peter Rosin * tests/amhello-binpkg.test: Add missing $EXEEXT usage. >From 396f69c65ddc01ebbcfcccb59381a80b9c050b1a Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Mon, 5 Sep 2011 00:31:48 +0200 Subject: [PATCH] * tests/amhello-binpkg.test: Add missing $EXEEXT usage. Signed-off-by: Peter Rosin --- ChangeLog |6 +- tests/amhello-binpkg.test |8 +--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index add6c9c..b768311 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2011-09-04 Stefano Lattarini +2011-09-05 Peter Rosin + + * tests/amhello-binpkg.test: Add missing $EXEEXT usage. + +2011-09-04 Stefano Lattarini fix: list test 'vala-vpath.test' in XFAIL_TESTS * tests/Makefile.am (XFAIL_TESTS): Update. diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test index f11421f..165078c 100755 --- a/tests/amhello-binpkg.test +++ b/tests/amhello-binpkg.test @@ -34,16 +34,18 @@ cd inst find . -type f -print > ../files.lst tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > tar.got 2>&1 +eval `sed -n -e 's/^EXEEXT = /EXEEXT=/p' < ../Makefile` + if tar --version t mv -f t tar.got - diff - tar.got <<'END' -./usr/bin/hello + diff - tar.got <