File: gcok

package info (click to toggle)
guavac 1.2-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,728 kB
  • ctags: 2,387
  • sloc: cpp: 20,367; yacc: 1,664; makefile: 504; lex: 348; ansic: 286; sh: 263
file content (51 lines) | stat: -rwxr-xr-x 1,203 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
# $Id: gcok,v 1.2 1996/03/11 10:39:24 joke Rel $
#
# set this to your systems parameters:
guavac="0.1.4"
jdk="/EUnet/research/java/jdk-1.0"
path="/EUnet/research/java/jdk-1.0/lib"
#
tmp="/tmp/gcok.$$"
find $jdk -name '*.java' -print >$tmp
files="`cat $tmp`"
total=`cat $tmp | wc -l | tr -d ' \011'`
cores=0
ok=0
bugs=0
#
trap 'rm -f gcok.ok gcok.error $tmp; exit 1' 1 2 15
rm -f gcok.ok gcok.error
#
for i in $files ; do
  echo "gcok: checking: $i"
  class=`echo $i | sed -e 's|\.java|\.class|' -e 's|^.*/||'`
#
  ( guavac -classpath $path $i ) > /dev/null 2> $tmp
  if [ -r core ] ; then
    cores=`expr $cores + 1`
    rm -f core
    echo "`basename $i` triggers core.***"
  fi
#
  if [ -r $class ] ; then
    echo "$i Ok." >> gcok.ok
    ok=`expr $ok + 1`
    echo "`basename $i` compiles ok.***"
  else
    echo "$i Error:" >> gcok.error
    cat /tmp/gcok.$$ >> gcok.error
    echo "***" >> gcok.error
    bugs=`expr $bugs + 1`
    echo "`basename $i` triggers compiler error.***"
  fi
  rm -f *.class
done
#
echo "gcok: regression test for guavac version $guavac"
echo "gcok: total $total in $jdk"
echo "gcok: $ok compile ok. $bugs losers (with $cores core dumps)."
#
rm -f $tmp
exit 0
#