Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / gcc-aux / files / diff-ada-testsuite
blob1ef31b75e77bfb4c8efab5b6171187dbb888e257
1 --- gcc/testsuite/ada/acats/run_acats.orig
2 +++ gcc/testsuite/ada/acats/run_acats
3 @@ -5,20 +5,6 @@
4     exit 1
5  fi
6  
7 -# Provide which replacement.
8 -#
9 -# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
10 -# ksh93 and bash have it.
11 -# type output format differs between ksh88 and ksh93, so avoid it if
12 -# type -p is present.  Unfortunately, HP-UX /bin/sh ignores -p with type.
13 -# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
15 -which () {
16 -    path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
17 -    path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
18 -    path=`whence $* 2>/dev/null` && { echo $path; return 0; }
19 -    return 1
22  # Set up environment to use the Ada compiler from the object tree
24 --- gcc/testsuite/ada/acats/run_all.sh.orig
25 +++ gcc/testsuite/ada/acats/run_all.sh
26 @@ -35,6 +35,14 @@
27    echo "$@" >> $dir/acats.log
28  }
30 +inform () {
31 +  printf "%04d    %7s" $1 $2
34 +disinform () {
35 +  printf "\r"
38  dir=`${PWDCMD-pwd}`
40  if [ "$testdir" = "" ]; then
41 @@ -197,6 +205,18 @@
42  glob_countn=0
43  glob_countok=0
44  glob_countu=0
45 +countdown=0
47 +for chapter in $chapters; do
48 +   if [ -d $dir/tests/$chapter ]; then
49 +      cd $dir/tests/$chapter
50 +      ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
51 +      cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
52 +        > $dir/tests/$chapter/${chapter}.lst
53 +      countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
54 +      countdown=`expr $countdown + $countn`
55 +   fi
56 +done
58  for chapter in $chapters; do
59     display Running chapter $chapter ...
60 @@ -207,10 +227,6 @@
61        continue
62     fi
64 -   cd $dir/tests/$chapter
65 -   ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
66 -   cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \
67 -     > $dir/tests/$chapter/${chapter}.lst 
68     countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
69     glob_countn=`expr $glob_countn + $countn`
70     counti=0
71 @@ -233,10 +249,13 @@
72        if [ $? -eq 0 ]; then
73           extraflags="$extraflags -gnat95"
74        fi
75 +      inform $countdown $i
76 +      countdown=`expr $countdown - 1`
77        test=$dir/tests/$chapter/$i
78        mkdir $test && cd $test >> $dir/acats.log 2>&1
80        if [ $? -ne 0 ]; then
81 +         disinform
82           display "FAIL:        $i"
83           failed="${failed}${i} "
84           clean_dir
85 @@ -257,8 +276,10 @@
86          cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
87          ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
88          ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
89 +        cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
90        esac
91        if [ "$main" = "" ]; then
92 +         disinform
93           display "FAIL:        $i"
94           failed="${failed}${i} "
95           clean_dir
96 @@ -267,6 +288,7 @@
98        target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
99        if [ $? -ne 0 ]; then
100 +         disinform
101           display "FAIL:        $i"
102           failed="${failed}${i} "
103           clean_dir
104 @@ -281,6 +303,7 @@
105        target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
106        cd $dir/tests/$chapter/$i
107        cat ${i}.log >> $dir/acats.log
108 +      disinform
109        egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
110        if [ $? -ne 0 ]; then
111           grep 'tasking not implemented' ${i}.log > /dev/null 2>&1
112 --- gcc/testsuite/gnat.dg/test_raise_from_pure.adb.orig
113 +++ gcc/testsuite/gnat.dg/test_raise_from_pure.adb
114 @@ -1,4 +1,4 @@
115 --- { dg-do run { xfail arm*-*-* } }
116 +-- { dg-do run { xfail arm*-*-* *-*-openbsd* } }
117  -- { dg-options "-O2" }
119  -- This is an optimization test and its failure is only a missed optimization.
120 --- gcc/testsuite/gnat.dg/unchecked_convert5.adb.orig
121 +++ gcc/testsuite/gnat.dg/unchecked_convert5.adb
122 @@ -1,22 +0,0 @@
123 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
125 -with Unchecked_Conversion;
127 -procedure Unchecked_Convert5 is
129 -  subtype c_1 is string(1..1);
131 -  function int2c1 is  -- { dg-warning "different sizes" }
132 -    new unchecked_conversion (source => integer, target => c_1);
134 -  c1 : c_1;
136 -begin
138 -  c1 := int2c1(16#12#);
140 -  if c1 (1) /= ASCII.Nul then
141 -    raise Program_Error;
142 -  end if;
144 -end;
145 --- gcc/testsuite/gnat.dg/unchecked_convert6.adb.orig
146 +++ gcc/testsuite/gnat.dg/unchecked_convert6.adb
147 @@ -1,22 +0,0 @@
148 --- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } }
150 -with Unchecked_Conversion;
152 -procedure Unchecked_Convert6 is
154 -  subtype c_5 is string(1..5);
156 -  function int2c5 is  -- { dg-warning "different sizes" }
157 -    new unchecked_conversion (source => integer, target => c_5);
159 -  c5 : c_5;
161 -begin
163 -  c5 := int2c5(16#12#);
165 -  if c5 (4) /= ASCII.DC2 then
166 -    raise Program_Error;
167 -  end if;
169 -end;