+2011-07-23 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ 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 <stefano.lattarini@gmail.com>
tests: portability fixes in tests on amhello examples
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 </dev/null | grep GNU; then
+ LC_ALL=C sort tar.got > 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
: