aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/ada
diff options
context:
space:
mode:
authorLaurent GUERBY <laurent@guerby.net>2006-05-05 08:43:04 +0000
committerLaurent Guerby <guerby@gcc.gnu.org>2006-05-05 08:43:04 +0000
commit4b5d3f3f419ba55d63b378e6730f6cb932aee549 (patch)
tree288a774d327578a9213ef785cc1f1d815bbfcfcd /gcc/testsuite/ada
parentb11382213a2e25a0b0ccd70783641b33b6dc51f1 (diff)
downloadgcc-4b5d3f3f419ba55d63b378e6730f6cb932aee549.zip
gcc-4b5d3f3f419ba55d63b378e6730f6cb932aee549.tar.gz
gcc-4b5d3f3f419ba55d63b378e6730f6cb932aee549.tar.bz2
run_all.sh: Use sync when main not found.
2005-05-05 Laurent GUERBY <laurent@guerby.net> * ada/acats/run_all.sh: Use sync when main not found. From-SVN: r113550
Diffstat (limited to 'gcc/testsuite/ada')
-rwxr-xr-xgcc/testsuite/ada/acats/run_all.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/testsuite/ada/acats/run_all.sh b/gcc/testsuite/ada/acats/run_all.sh
index 8a09793..d5b6fee 100755
--- a/gcc/testsuite/ada/acats/run_all.sh
+++ b/gcc/testsuite/ada/acats/run_all.sh
@@ -64,6 +64,13 @@ clean_dir () {
rm -f "$binmain" *.o *.ali > /dev/null 2>&1
}
+find_main () {
+ 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`
+}
+
EXTERNAL_OBJECTS=""
# Global variable to communicate external objects to link with.
@@ -230,10 +237,12 @@ for chapter in $chapters; do
fi
target_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
- 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=""
+ find_main
+ if [ "$main" == "" ]; then
+ sync
+ find_main
+ fi
binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
echo "BUILD $main" >> $dir/acats.log
EXTERNAL_OBJECTS=""