aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/ada
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2011-06-30 10:04:52 +0000
committerRainer Orth <ro@gcc.gnu.org>2011-06-30 10:04:52 +0000
commitf7069d58f6b79b685000544981eb4d05d8261bf9 (patch)
tree20f81b0b953f5cfba05b7e3bf319307423b737d1 /gcc/testsuite/ada
parent2f0c1df6f3e2be2b9e1aa7534444c657020ed63d (diff)
downloadgcc-f7069d58f6b79b685000544981eb4d05d8261bf9.zip
gcc-f7069d58f6b79b685000544981eb4d05d8261bf9.tar.gz
gcc-f7069d58f6b79b685000544981eb4d05d8261bf9.tar.bz2
re PR ada/49511 (acats test setup fails on HP-UX using posix shell)
PR ada/49511 * ada/acats/run_acats (which): Use last field of type -p output. From-SVN: r175690
Diffstat (limited to 'gcc/testsuite/ada')
-rwxr-xr-xgcc/testsuite/ada/acats/run_acats4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/ada/acats/run_acats b/gcc/testsuite/ada/acats/run_acats
index bb68e62..5d68e6c 100755
--- a/gcc/testsuite/ada/acats/run_acats
+++ b/gcc/testsuite/ada/acats/run_acats
@@ -10,11 +10,11 @@ fi
# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
# ksh93 and bash have it.
# type output format differs between ksh88 and ksh93, so avoid it if
-# type -p is present.
+# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
which () {
- path=`type -p $* 2>/dev/null` && { echo $path; return 0; }
+ path=`type -p $* 2>/dev/null | awk '{print $NF}'` && { echo $path; return 0; }
path=`type $* 2>/dev/null | awk '{print $NF}'` && { echo $path; return 0; }
path=`whence $* 2>/dev/null` && { echo $path; return 0; }
return 1