]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Make-lang.in (ACATSCMD): New variable.
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 30 Apr 2016 10:42:14 +0000 (10:42 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 30 Apr 2016 10:42:14 +0000 (10:42 +0000)
ada/
* gcc-interface/Make-lang.in (ACATSCMD): New variable.
(check-acats): Use it.
(check_acats_targets): Likewise.
testsuite/
* ada/acats/run_acats: Rename into...
* ada/acats/run_acats.sh: ...this.  Only export BASE variable.
* ada/acats/run_all.sh: Remove redundant test.
(target_run): Move around.
(target_gnatchop): Use newly built executable.
(target_gnatmake): Likewise.
Check that the compilation of impbit succeeds.

From-SVN: r235678

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Make-lang.in
gcc/testsuite/ChangeLog
gcc/testsuite/ada/acats/run_acats.sh [moved from gcc/testsuite/ada/acats/run_acats with 93% similarity]
gcc/testsuite/ada/acats/run_all.sh

index cd0ec39fbf81d6bba42fc322eea3b62f0069317c..ebb3bb3a512e502d4430704d0341971ff3570057 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-30  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/Make-lang.in (ACATSCMD): New variable.
+       (check-acats): Use it.
+       (check_acats_targets): Likewise.
+
 2016-04-28  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR ada/70786
index a8ce6722491bc4b11e35cc1109f1d5999a639e15..fbfa6c62ea5a6a48c695e74d0882292282e149d5 100644 (file)
@@ -868,6 +868,7 @@ check-ada: check-acats check-gnat
 check-ada-subtargets: check-acats-subtargets check-gnat-subtargets
 
 ACATSDIR = $(TESTSUITEDIR)/ada/acats
+ACATSCMD = run_acats.sh
 
 check_acats_numbers0:=1 2 3 4 5 6 7 8 9
 check_acats_numbers1:=0 $(check_acats_numbers0)
@@ -892,7 +893,7 @@ check-acats:
          mkdir $(ACATSDIR)-parallel; \
          ( testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
            export testdir; \
-           cd $(ACATSDIR) && $(SHELL) $${testdir}/run_acats NONE ) \
+           cd $(ACATSDIR) && $(SHELL) $${testdir}/$(ACATSCMD) NONE ) \
            || exit 1; \
          GCC_RUNTEST_PARALLELIZE_DIR=$$rootme/$(ACATSDIR)-parallel; \
          export GCC_RUNTEST_PARALLELIZE_DIR; \
@@ -913,7 +914,7 @@ check-acats:
          exit 0; \
        fi; \
        testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
-       export testdir; cd $(ACATSDIR) && $(SHELL) $${testdir}/run_acats $(CHAPTERS)
+       export testdir; cd $(ACATSDIR) && $(SHELL) $${testdir}/$(ACATSCMD) $(CHAPTERS)
 
 check-acats-subtargets:
        @echo check-acats
@@ -925,7 +926,7 @@ $(check_acats_targets): check-acats%:
        fi; \
        test -d $(ACATSDIR)$* || mkdir -p $(ACATSDIR)$*; \
        testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
-       export testdir; cd $(ACATSDIR)$* && $(SHELL) $${testdir}/run_acats
+       export testdir; cd $(ACATSDIR)$* && $(SHELL) $${testdir}/$(ACATSCMD)
        touch $$GCC_RUNTEST_PARALLELIZE_DIR/finished
 
 .PHONY: check-acats $(check_acats_targets)
index 066e30c6300c9829fcd731cf5a682df5e929ea63..56bb64bef6ca69f37206726e0c73934419eeea6e 100644 (file)
@@ -1,3 +1,13 @@
+2016-04-30  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * ada/acats/run_acats: Rename into...
+       * ada/acats/run_acats.sh: ...this.  Only export BASE variable.
+       * ada/acats/run_all.sh: Remove redundant test.
+       (target_run): Move around.
+       (target_gnatchop): Use newly built executable.
+       (target_gnatmake): Likewise.
+       Check that the compilation of impbit succeeds.
+
 2016-04-30  Oleg Endo  <olegendo@gcc.gnu.org>
 
        * g++.old-deja/g++.jason/thunk3.C: Remove SH5 checks.
similarity index 93%
rename from gcc/testsuite/ada/acats/run_acats
rename to gcc/testsuite/ada/acats/run_acats.sh
index c1ed39f8555fa84f1fdb534e8f73a3cce984e90e..1a2c050bafdcca307b50e438040940b1d5b309f2 100755 (executable)
@@ -47,9 +47,7 @@ if [ ! -f $BASE/gnatmake ]; then
    exit 1
 fi
 
-GCC_DRIVER="$BASE/xgcc"
-GCC="$BASE/xgcc -B$BASE/"
-export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_DRIVER GCC LD_LIBRARY_PATH
+export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH BASE LD_LIBRARY_PATH
 
 echo '#!/bin/sh' > host_gnatchop
 echo PATH=`dirname $host_gnatchop`:'$PATH' >> host_gnatchop
index 658845a4101d9b464b760aed112545e3604573e4..764598398a28561d42812f31b45fc5a8d97e7fa3 100755 (executable)
 gccflags="-O2"
 gnatflags="-gnatws"
 
-target_run () {
-  eval $EXPECT -f $testdir/run_test.exp $*
-}
-
 # End of customization section.
 
 # Perform arithmetic evaluation on the ARGs, and store the result in the
@@ -52,29 +48,30 @@ log () {
 
 dir=`${PWDCMD-pwd}`
 
-if [ "$testdir" = "" ]; then
-   echo You must use make check or make check-ada
-   exit 1
-fi
-
 if [ "$dir" = "$testdir" ]; then
   echo "error: srcdir must be different than objdir, exiting."
   exit 1
 fi
 
+GCC="$BASE/xgcc -B$BASE/"
+
 target_gnatchop () {
-  gnatchop --GCC="$GCC_DRIVER" $*
+  $BASE/gnatchop --GCC="$BASE/xgcc" $*
 }
 
 target_gnatmake () {
-  echo gnatmake --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\"
-  gnatmake --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
+  echo $BASE/gnatmake --GNATBIND=$BASE/gnatbind --GNATLINK=$BASE/gnatlink --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
+  $BASE/gnatmake --GNATBIND=$BASE/gnatbind --GNATLINK=$BASE/gnatlink --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
 }
 
 target_gcc () {
   $GCC $gccflags $*
 }
 
+target_run () {
+  eval $EXPECT -f $testdir/run_test.exp $*
+}
+
 clean_dir () {
   rm -f "$binmain" *.o *.ali > /dev/null 2>&1
 }
@@ -128,6 +125,10 @@ cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/suppo
 
 # Find out the size in bit of an address on the target
 target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
+if [ $? -ne 0 ]; then
+   display "**** Failed to compile impbit"
+   exit 1
+fi
 target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
 target_bit=`cat $dir/support/impbit.out`
 echo target_bit="$target_bit" >> $dir/acats.log