]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
run_all.sh: Use sync when main not found.
authorLaurent GUERBY <laurent@guerby.net>
Fri, 5 May 2006 08:43:04 +0000 (08:43 +0000)
committerLaurent Guerby <guerby@gcc.gnu.org>
Fri, 5 May 2006 08:43:04 +0000 (08:43 +0000)
2005-05-05  Laurent GUERBY  <laurent@guerby.net>

       * ada/acats/run_all.sh: Use sync when main not found.

From-SVN: r113550

gcc/testsuite/ChangeLog
gcc/testsuite/ada/acats/run_all.sh

index abc3b7d0a1cb4d53f9c74f2f7544e61dd082bc16..c3cccc5e596fcdf6143d6a712d3e9481a6cb5765 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-05  Laurent GUERBY  <laurent@guerby.net>
+
+       * ada/acats/run_all.sh: Use sync when main not found.
+
 2006-05-04  Kazu Hirata  <kazu@codesourcery.com>
 
        PR target/26765
index 8a097936cf1b1c8a1229956e67bb7a3d17d48428..d5b6feea0450d8e14b8bc785c6f23060c728ea4d 100755 (executable)
@@ -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=""