From: Stefano Lattarini Date: Wed, 6 Jul 2011 08:31:03 +0000 (+0200) Subject: tests: portability fixes in tests on amhello examples X-Git-Tag: v1.11.1b~26^2~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e58e5f493fa0856d6782549d978c3f1d5f24de8f;p=thirdparty%2Fautomake.git tests: portability fixes in tests on amhello examples * tests/amhello-binpkg.test: Don't use "tar xzf too.tag.gz" to extract a gzip-compressed tarball, that's unportable to some tar implementations; use the "gzip -dc fo.tar.gz | tar xf -" idiom instead. * tests/amhello-cflags.test: Likewise. * tests/amhello-cross-compile.test: Likewise. Suggestion from Ralf Wildenhues. --- diff --git a/ChangeLog b/ChangeLog index c77326d2f..888e95b50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-07-08 Stefano Lattarini + + tests: portability fixes in tests on amhello examples + * tests/amhello-binpkg.test: Don't use "tar xzf too.tag.gz" to + extract a gzip-compressed tarball, that's unportable to some + tar implementations; use the "gzip -dc fo.tar.gz | tar xf -" + idiom instead. + * tests/amhello-cflags.test: Likewise. + * tests/amhello-cross-compile.test: Likewise. + Suggestion from Ralf Wildenhues. + 2011-07-01 Stefano Lattarini docs, tests: synchronize examples from docs to tests diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test index 8085a232f..34600fe7e 100755 --- a/tests/amhello-binpkg.test +++ b/tests/amhello-binpkg.test @@ -24,7 +24,7 @@ set -e cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ || fatal_ "cannot get amhello tarball" -tar zxf amhello-1.0.tar.gz +gzip -dc amhello-1.0.tar.gz | tar xf - cd amhello-1.0 ./configure --prefix /usr diff --git a/tests/amhello-cflags.test b/tests/amhello-cflags.test index 1c3e5160e..56f772942 100755 --- a/tests/amhello-cflags.test +++ b/tests/amhello-cflags.test @@ -26,8 +26,9 @@ set -e cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ || fatal_ "cannot get amhello tarball" -tar zxf amhello-1.0.tar.gz +gzip -dc amhello-1.0.tar.gz | tar xf - cd amhello-1.0 + mkdir debug optim cd debug ../configure CFLAGS='-g -O0' diff --git a/tests/amhello-cross-compile.test b/tests/amhello-cross-compile.test index 862a0793d..6db91ba9d 100755 --- a/tests/amhello-cross-compile.test +++ b/tests/amhello-cross-compile.test @@ -30,7 +30,7 @@ build=`"$testsrcdir"/../lib/config.guess` && test -n "$build" \ || fatal_ "cannot guess build platform" case $build in *mingw*) skip_ "build system is MinGW too";; esac -tar zxf amhello-1.0.tar.gz +gzip -dc amhello-1.0.tar.gz | tar xf - cd amhello-1.0 ./configure --build "$build" --host "$host" > stdout \