Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: gcc/gcc/testsuite/ada/acats/run_acats

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/testsuite/README.QMTEST ('k') | gcc/gcc/testsuite/ada/acats/run_all.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/testsuite/ada/acats/run_acats
diff --git a/gcc/gcc/testsuite/ada/acats/run_acats b/gcc/gcc/testsuite/ada/acats/run_acats
index 05f3ff57df5d91fb7eee31ae8a846cc9d848b889..c389e6474226e57958644cbfcef8285cbf47297e 100755
--- a/gcc/gcc/testsuite/ada/acats/run_acats
+++ b/gcc/gcc/testsuite/ada/acats/run_acats
@@ -5,10 +5,25 @@ if [ "$testdir" = "" ]; then
exit 1
fi
+# Provide which replacement.
+#
+# 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.
+# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
+
+which () {
+ type -p $* 2>/dev/null && return 0
+ type $* 2>/dev/null | awk '{print $3}' && return 0
+ whence $* 2>/dev/null && return 0
+ return 1
+}
+
# Set up environment to use the Ada compiler from the object tree
-host_gnatchop=`type gnatchop | awk '{print $3}'`
-host_gnatmake=`type gnatmake | awk '{print $3}'`
+host_gnatchop=`which gnatchop`
+host_gnatmake=`which gnatmake`
ROOT=`${PWDCMD-pwd}`
BASE=`cd $ROOT/../../..; ${PWDCMD-pwd}`
@@ -52,4 +67,7 @@ echo exec gnatmake '"$@"' >> host_gnatmake
chmod +x host_gnatmake
-exec $testdir/run_all.sh ${1+"$@"}
+# Limit the stack to 16MB for stack checking
+ulimit -s 16384
+
+exec $SHELL $testdir/run_all.sh ${1+"$@"}
« no previous file with comments | « gcc/gcc/testsuite/README.QMTEST ('k') | gcc/gcc/testsuite/ada/acats/run_all.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698