6876755: apt tests fail on Windows
Reviewed-by: darcy
This commit is contained in:
parent
ba8c7416f8
commit
57102e24d4
@ -33,12 +33,11 @@
|
||||
|
||||
OS=`uname -s`;
|
||||
case "${OS}" in
|
||||
Windows* | CYGWIN* )
|
||||
SEP=";"
|
||||
CYGWIN* )
|
||||
DIFFOPTS="--strip-trailing-cr"
|
||||
;;
|
||||
|
||||
* )
|
||||
SEP=":"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -94,7 +93,7 @@ for i in ${ANNOTATION_FILES}
|
||||
do
|
||||
printf "%s\n" "Testing annotations on source file ${i}"
|
||||
${APT} @options ${i} 2> result.txt
|
||||
diff ${TESTSRC}/golden.txt result.txt
|
||||
diff ${DIFFOPTS} ${TESTSRC}/golden.txt result.txt
|
||||
|
||||
RESULT=$?
|
||||
case "$RESULT" in
|
||||
@ -109,7 +108,7 @@ do
|
||||
CLASS=`basename ${i} .java`
|
||||
printf "%s\n" "Testing annotations on class file ${CLASS}"
|
||||
${APT} @options1 ${CLASS} 2> result2.txt
|
||||
diff ${TESTSRC}/golden.txt result2.txt
|
||||
diff ${DIFFOPTS} ${TESTSRC}/golden.txt result2.txt
|
||||
|
||||
RESULT=$?
|
||||
case "$RESULT" in
|
||||
|
@ -32,12 +32,11 @@
|
||||
|
||||
OS=`uname -s`;
|
||||
case "${OS}" in
|
||||
Windows* | CYGWIN* )
|
||||
SEP=";"
|
||||
CYGWIN* )
|
||||
DIFFOPTS="--strip-trailing-cr"
|
||||
;;
|
||||
|
||||
* )
|
||||
SEP=":"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -88,7 +87,7 @@ done
|
||||
# check for mutliple methods and no static initializer
|
||||
|
||||
${APT} -XclassesAsDecls -cp ${TESTCLASSES} -print Aggregate > aggregate.txt
|
||||
diff aggregate.txt ${TESTSRC}/goldenAggregate.txt
|
||||
diff ${DIFFOPTS} aggregate.txt ${TESTSRC}/goldenAggregate.txt
|
||||
|
||||
RESULT=$?
|
||||
case "$RESULT" in
|
||||
|
@ -57,7 +57,12 @@ TestFile() {
|
||||
|
||||
OS=`uname -s`;
|
||||
case "${OS}" in
|
||||
Windows* | CYGWIN* )
|
||||
Windows* )
|
||||
SEP=";"
|
||||
;;
|
||||
|
||||
CYGWIN* )
|
||||
DIFFOPTS="--strip-trailing-cr"
|
||||
SEP=";"
|
||||
;;
|
||||
|
||||
@ -150,7 +155,7 @@ ${APT} @options2 2> output
|
||||
|
||||
TestNoFile "HelloWorld.class"
|
||||
|
||||
diff output ${TESTSRC}/golden.txt
|
||||
diff ${DIFFOPTS} output ${TESTSRC}/golden.txt
|
||||
|
||||
RESULT=$?
|
||||
case "$RESULT" in
|
||||
@ -180,7 +185,7 @@ printf "%s\n" "-cp ${TESTCLASSES}" >> options3
|
||||
printf "%s\n" "HelloAnnotation.java" >> options3
|
||||
${APT} @options3 2> output
|
||||
|
||||
diff output ${TESTSRC}/goldenWarn.txt
|
||||
diff ${DIFFOPTS} output ${TESTSRC}/goldenWarn.txt
|
||||
|
||||
RESULT=$?
|
||||
case "$RESULT" in
|
||||
@ -485,7 +490,7 @@ printf "%s\n" "-d ./class" >> options8
|
||||
printf "%s\n" "${TESTSRC}/Dummy1.java" >> options8
|
||||
${APT} @options8 > multiRoundOutput 2> multiRoundError
|
||||
|
||||
diff multiRoundOutput ${TESTSRC}/goldenFactory.txt
|
||||
diff ${DIFFOPTS} multiRoundOutput ${TESTSRC}/goldenFactory.txt
|
||||
|
||||
RESULT=$?
|
||||
case "$RESULT" in
|
||||
|
Loading…
Reference in New Issue
Block a user