386:2c20f17c429c | 387:f29068bfeaed |
---|---|
31 # @summary test consistency of annotation discovery | 31 # @summary test consistency of annotation discovery |
32 # @author Joseph D. Darcy | 32 # @author Joseph D. Darcy |
33 | 33 |
34 OS=`uname -s`; | 34 OS=`uname -s`; |
35 case "${OS}" in | 35 case "${OS}" in |
36 Windows* | CYGWIN* ) | 36 CYGWIN* ) |
37 SEP=";" | 37 DIFFOPTS="--strip-trailing-cr" |
38 ;; | 38 ;; |
39 | 39 |
40 * ) | 40 * ) |
41 SEP=":" | |
42 ;; | 41 ;; |
43 esac | 42 esac |
44 | 43 |
45 # Construct path to apt executable | 44 # Construct path to apt executable |
46 APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -XDsuppress-tool-api-removal-message " | 45 APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -XDsuppress-tool-api-removal-message " |
92 | 91 |
93 for i in ${ANNOTATION_FILES} | 92 for i in ${ANNOTATION_FILES} |
94 do | 93 do |
95 printf "%s\n" "Testing annotations on source file ${i}" | 94 printf "%s\n" "Testing annotations on source file ${i}" |
96 ${APT} @options ${i} 2> result.txt | 95 ${APT} @options ${i} 2> result.txt |
97 diff ${TESTSRC}/golden.txt result.txt | 96 diff ${DIFFOPTS} ${TESTSRC}/golden.txt result.txt |
98 | 97 |
99 RESULT=$? | 98 RESULT=$? |
100 case "$RESULT" in | 99 case "$RESULT" in |
101 0 ) | 100 0 ) |
102 ;; | 101 ;; |
107 esac | 106 esac |
108 | 107 |
109 CLASS=`basename ${i} .java` | 108 CLASS=`basename ${i} .java` |
110 printf "%s\n" "Testing annotations on class file ${CLASS}" | 109 printf "%s\n" "Testing annotations on class file ${CLASS}" |
111 ${APT} @options1 ${CLASS} 2> result2.txt | 110 ${APT} @options1 ${CLASS} 2> result2.txt |
112 diff ${TESTSRC}/golden.txt result2.txt | 111 diff ${DIFFOPTS} ${TESTSRC}/golden.txt result2.txt |
113 | 112 |
114 RESULT=$? | 113 RESULT=$? |
115 case "$RESULT" in | 114 case "$RESULT" in |
116 0 ) | 115 0 ) |
117 ;; | 116 ;; |