>From 50d5ef104a889520aa8bbd14f42dbc8708771681 Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Sun, 22 Jan 2012 10:06:24 +0100 Subject: [PATCH] dist tests: missing "compress" program was causing spurious failures Fixes automake bug#10575. The "compress" tool is becoming anachronistic, and thus is not installed by default on modern distros (e.g., Fedora 16). We can't thus unconditionally assume it exists on every reasonable portability target. * tests/dist-formats.tap ($missing_compressors): When defining this, don't assume anymore that compress(1) is unconditionally available. (Parallel compression): Skip this sub-test if compress(1) is unavailable. Since we are at it, fix a couple of unrelated buglets: a typo in a test name (s/distcheck/ark-exists/), and some attempts to remove directories with "rm -f". --- tests/dist-formats.tap | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/dist-formats.tap b/tests/dist-formats.tap index 34399bc..dd9d896 100755 --- a/tests/dist-formats.tap +++ b/tests/dist-formats.tap @@ -75,12 +75,10 @@ all_compressors=` done | tr "$nl" ' '` echo All compressors: $all_compressors -# Assume gzip(1) and compress(1) are available on every reasonable -# portability target. +# Assume gzip(1) is available on every reasonable portability target. missing_compressors=` for c in $all_compressors; do - test $c = compress || test $c = gzip || $c --version &2 \ - && continue + test $c = gzip || $c --version &2 && continue echo $c done | tr "$nl" ' '` echo Missing compressors: $missing_compressors @@ -147,7 +145,7 @@ can_compress () command_ok_if_have_compressor "'make dist-$format' work by default" \ eval ' - rm -f *$tarname* \ + rm -rf *$tarname* \ && make dist-$format \ && test -f $tarname-1.0.$suffix \ && ls -l *$tarname* \ @@ -170,7 +168,7 @@ command_ok_ "default [make distcheck]" $MAKE distcheck command_ok_ "'make dist' only builds *.tar.gz by default" \ test "`ls *defaults*`" = defaults-1.0.tar.gz -rm -f *defaults* +rm -rf *defaults* for fmt in $all_compression_formats; do can_compress defaults $fmt @@ -249,7 +247,7 @@ END command_ok_ "$desc [configure]" ./configure command_ok_ "$desc [ark-name]" $MAKE check-ark-name command_ok_if_have_compressor "$desc [distcheck]" $MAKE distcheck - command_ok_if_have_compressor "$desc [distcheck]" $MAKE check-ark-exists + command_ok_if_have_compressor "$desc [ark-exists]" $MAKE check-ark-exists command_ok_ "$desc [no .tar.gz]" $MAKE check-no-tar-gz unset desc @@ -310,6 +308,7 @@ check_tarball () command_ok_ "$desc [automake]" $AUTOMAKE skip_reason= +have_compressor compress || skip_reason="'compress' not available" have_compressor bzip2 || skip_reason="'bzip2' not available" if test "$MAKE_j4" = false; then test -z "$skip_reason" || skip_reason="$skip_reason and " -- 1.7.7.3