diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-25 12:40:10 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-25 12:40:10 +0200 |
commit | d1a7148c7094f9d7bf188e90f072a01c7b5279ca (patch) | |
tree | e666281dba084c144f7399136f207357cedce20a /t/primary-prefix-couples-force-valid.sh | |
parent | fd2524171194ab00e7f7cad768bd6753a38ecab9 (diff) | |
download | automake-d1a7148c7094f9d7bf188e90f072a01c7b5279ca.tar.gz |
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 <stefano.lattarini@gmail.com>
Diffstat (limited to 't/primary-prefix-couples-force-valid.sh')
-rwxr-xr-x | t/primary-prefix-couples-force-valid.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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' |