From: Stefano Lattarini Date: Wed, 25 Jul 2012 10:40:10 +0000 (+0200) Subject: tests: avoid spurious failure when running as root X-Git-Tag: v1.12.3~32^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1a7148c7094f9d7bf188e90f072a01c7b5279ca;p=thirdparty%2Fautomake.git tests: avoid spurious failure when running as root Fixes automake bug#12041. * t/primary-prefix-couples-force-valid.sh: If run as root, don't expect a "test -x" on a non-executable files to fail: for root, all files are executable (as well as readable and writable), and at least on Solaris 10 that causes "test -x" to succeed also on non-executable files. Signed-off-by: Stefano Lattarini --- diff --git a/t/primary-prefix-couples-force-valid.sh b/t/primary-prefix-couples-force-valid.sh index 23b56c349..ac539a1e7 100755 --- a/t/primary-prefix-couples-force-valid.sh +++ b/t/primary-prefix-couples-force-valid.sh @@ -54,7 +54,12 @@ test: test -f '$(bindir)/libquux.a' ls -l '$(libexecdir)/bar.h' test -f '$(libexecdir)/bar.h' - test ! -x '$(libexecdir)/bar.h' +## If this test is run as root, "test -x" could suceed also for +## non-executable files, so we need to protect the next check. +## See automake bug#12041. + if test -x Makefile; then echo SKIP THIS; else \ + test ! -x '$(libexecdir)/bar.h'; \ + fi; END cat > foo.c <<'END'