From: Peter Rosin Date: Thu, 9 Feb 2012 09:25:20 +0000 (+0100) Subject: tests: check if 'compress' is real or fake X-Git-Tag: v1.11b~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dfdc96a81f384d8cbfb9d87212db1aec0a22d25;p=platform%2Fupstream%2Fautomake.git tests: check if 'compress' is real or fake On Cygwin, 'compress' is provided by sharutils and is just a dummy script that is not able to actually compress (it can only decompress). 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. --- diff --git a/tests/dist-formats.tap b/tests/dist-formats.tap index dd9d896..24d5955 100755 --- a/tests/dist-formats.tap +++ b/tests/dist-formats.tap @@ -75,10 +75,18 @@ all_compressors=` done | tr "$nl" ' '` 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 &2 && continue + case $c in + # Assume gzip(1) is available on every reasonable portability target. + gzip) continue;; + # On Cygwin, as of 9/2/2012, '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 && continue;; + *) $c --version &2 && continue;; + esac echo $c done | tr "$nl" ' '` echo Missing compressors: $missing_compressors