[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: check if 'compress' is real of fake
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH] tests: check if 'compress' is real of fake |
Date: |
Thu, 09 Feb 2012 10:09:25 +0100 |
Hi Peter.
On 02/08/2012 10:24 PM, Peter Rosin wrote:
> On Cygwin, 'compress' is provided by sharutils and is just a
> dummy script that is not able to actually compress (it can
> only decompress).
>
Ouch. This doesn't sound as a smart move on their part (in this
situation, having just an 'uncompress' script would be clearer and
more "honest").
The patch is mostly OK, apart from the nits below. ACK with those
addressed.
> This fake 'compress' is not usable for our purpose - to create
> compressed tarballs.
>
> * tests/dist-formats.tap (missing_compressors): Count 'compress'
> as missing if it does not support the -c option.
> ---
> tests/dist-formats.tap | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/tests/dist-formats.tap b/tests/dist-formats.tap
> index dd9d896..629d615 100755
> --- a/tests/dist-formats.tap
> +++ b/tests/dist-formats.tap
> @@ -78,7 +78,11 @@ echo All compressors: $all_compressors
> # Assume gzip(1) is available on every reasonable portability target.
> missing_compressors=`
> for c in $all_compressors; do
> - test $c = gzip || $c --version </dev/null >&2 && continue
> + case $c in
> + gzip) continue;;
> + compress) $c -c </dev/null >/dev/null && continue;;
>
You should add the explanation given in the commit message here as
well:
# On Cygwin x.y.z, 'compress' is provided by sharutils and is
# just a dummy script that is not able to actually compress (it
# can only decompress). So check that the 'compress' program
# is actually able to compress input.
compress) $c -c </dev/null >/dev/null && continue;;
At which point you can also move the comment "Assume gzip(1) is
available on every reasonable portability target" just above the
"gzip)" entry, for consistency and clarity.
> + *) $c --version </dev/null >&2 && continue;;
> + esac
> echo $c
> done | tr "$nl" ' '`
> echo Missing compressors: $missing_compressors
Thanks,
Stefano