This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix `tail' invocation in the Ada testsuite
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 Jun 2005 20:16:15 +0100 (BST)
- Subject: [PATCH] Fix `tail' invocation in the Ada testsuite
Hello,
The Ada testsuite invokes `tail' with "-1", which is not an option
allowed by the current revision of the POSIX standard and is therefore
expected to fail on systems that comply to it. For example this is the
case with the `tail' implementation included in GNU coreutils 5.2.1 if
built on a glibc 2.3.x system (for older configurations you can force
POSIX compliance by setting the "_POSIX2_VERSION" environment variable to
"200112").
Here is an obvious fix.
2005-06-06 Maciej W. Rozycki <macro@linux-mips.org>
* ada/acats/run_all.sh: Use "-n 1" instead of "-1" for `tail'.
Please apply to HEAD.
Maciej
gcc-4.0.0-acats-tail.patch
diff -up --recursive --new-file gcc-4.0.0.macro/gcc/testsuite/ada/acats/run_all.sh gcc-4.0.0/gcc/testsuite/ada/acats/run_all.sh
--- gcc-4.0.0.macro/gcc/testsuite/ada/acats/run_all.sh 2004-04-26 21:15:54.000000000 +0000
+++ gcc-4.0.0/gcc/testsuite/ada/acats/run_all.sh 2005-06-05 03:34:19.000000000 +0000
@@ -229,7 +229,7 @@ for chapter in $chapters; do
ls ${i}?.adb > ${i}.lst 2> /dev/null
ls ${i}*m.adb >> ${i}.lst 2> /dev/null
ls ${i}.adb >> ${i}.lst 2> /dev/null
- main=`tail -1 ${i}.lst`
+ main=`tail -n 1 ${i}.lst`
binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
echo "BUILD $main" >> $dir/acats.log
EXTERNAL_OBJECTS=""