From: Stefano Lattarini Date: Sat, 23 Jul 2011 13:09:23 +0000 (+0200) Subject: tests: relax a test on amhello examples to cater to Solaris tar X-Git-Tag: v1.11.1b~25^2~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3680f7deb922ec3128eb1a69788392984b856860;p=thirdparty%2Fautomake.git tests: relax a test on amhello examples to cater to Solaris tar * tests/amhello-binpkg.test: When the tar implementation in use is not GNU tar, relax the tests on tar output, to avoid spurious failures. For example, "tar cvf ..." with GNU tar can output lines like "./usr/bin/hello" on the standard output, while with Solaris tar it can output lines like "a ./usr/bin/hello 8K" on standard output, and with Heirloom tar it can output lines like "a ./usr/bin/hello 15 tape blocks" on standard error. --- diff --git a/ChangeLog b/ChangeLog index 888e95b50..76df2f25a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-07-23 Stefano Lattarini + + tests: relax a test on amhello examples to cater to Solaris tar + * tests/amhello-binpkg.test: When the tar implementation in use + is not GNU tar, relax the tests on tar output, to avoid spurious + failures. For example, "tar cvf ..." with GNU tar can output + lines like "./usr/bin/hello" on the standard output, while with + Solaris tar it can output lines like "a ./usr/bin/hello 8K" on + standard output, and with Heirloom tar it can output lines like + "a ./usr/bin/hello 15 tape blocks" on standard error. + 2011-07-08 Stefano Lattarini tests: portability fixes in tests on amhello examples diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test index 34600fe7e..34dc5194e 100755 --- a/tests/amhello-binpkg.test +++ b/tests/amhello-binpkg.test @@ -32,12 +32,19 @@ make make DESTDIR="`pwd`/inst" install cd inst find . -type f -print > ../files.lst -tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > t -LC_ALL=C sort t > tar.got +tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > tar.got 2>&1 -diff - tar.got <<'END' +if tar --version t + mv -f t tar.got + diff - tar.got <<'END' ./usr/bin/hello ./usr/share/doc/amhello/README END +else + : Be laxer with other tar implementations, to avoid spurious failures. + $EGREP '(^| )\./usr/bin/hello( |$)' tar.got + $EGREP '(^| )\./usr/share/doc/amhello/README( |$)' tar.got +fi :