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