test/tools/apt/Basics/apt.sh

Print this page




  26 # @test
  27 # @bug 4908512 5024825 4957203 4993280 4996963 6174696 6177059
  28 # @run shell ../verifyVariables.sh
  29 # @build Milk MethodAnnotations NestedClassAnnotations StaticFieldAnnotations StaticMethodAnnotations ParameterAnnotations 
  30 # @run shell apt.sh
  31 # @summary test consistency of annotation discovery
  32 # @author Joseph D. Darcy
  33 
  34 OS=`uname -s`;
  35 case "${OS}" in
  36         Windows* | CYGWIN* )
  37                 SEP=";"
  38         ;;
  39 
  40         * )
  41         SEP=":"
  42         ;;
  43 esac
  44 
  45 # Construct path to apt executable
  46 APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS}"
  47 
  48 printf "%s\n" "-classpath ${TESTCLASSES}"                    > options
  49 printf "%s\n" "-factorypath ./nullap.jar"                   >> options
  50 printf "%s\n" "-sourcepath ${TESTSRC} "                     >> options
  51 printf "%s\n" "-nocompile"                                  >> options
  52 printf "%s\n" "-XListAnnotationTypes"                       >> options
  53 
  54 printf "%s\n" "-classpath ${TESTCLASSES}"                    > options1
  55 printf "%s\n" "-factorypath ./nullap.jar"                   >> options1
  56 printf "%s\n" "-sourcepath ${TESTSRC} "                     >> options1
  57 printf "%s\n" "-nocompile"                                  >> options1
  58 printf "%s\n" "-XListAnnotationTypes"                       >> options1
  59 printf "%s\n" "-XclassesAsDecls"                            >> options1
  60 

  61 # Construct path to javac executable
  62 JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} -source 1.5 -sourcepath ${TESTSRC} -classpath ${TESTJAVA}/lib/tools.jar -d . "
  63 JAR="${TESTJAVA}/bin/jar "
  64 
  65 $JAVAC ${TESTSRC}/NullAPF.java \
  66 ${TESTSRC}/FreshnessApf.java  \
  67 ${TESTSRC}/TestGetTypeDeclarationApf.java \
  68 ${TESTSRC}/TestGetPackageApf.java
  69 RESULT=$?
  70 
  71 case "${RESULT}" in
  72         0  )
  73         ;;
  74 
  75         * )
  76         echo "Compilation failed."
  77         exit 1
  78 esac
  79 
  80 echo "Making services directory and copying services information."




  26 # @test
  27 # @bug 4908512 5024825 4957203 4993280 4996963 6174696 6177059
  28 # @run shell ../verifyVariables.sh
  29 # @build Milk MethodAnnotations NestedClassAnnotations StaticFieldAnnotations StaticMethodAnnotations ParameterAnnotations 
  30 # @run shell apt.sh
  31 # @summary test consistency of annotation discovery
  32 # @author Joseph D. Darcy
  33 
  34 OS=`uname -s`;
  35 case "${OS}" in
  36         Windows* | CYGWIN* )
  37                 SEP=";"
  38         ;;
  39 
  40         * )
  41         SEP=":"
  42         ;;
  43 esac
  44 
  45 # Construct path to apt executable
  46 APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -XDsuppress-tool-api-removal-message "
  47 
  48 printf "%s\n" "-classpath ${TESTCLASSES}"                    > options
  49 printf "%s\n" "-factorypath ./nullap.jar"                   >> options
  50 printf "%s\n" "-sourcepath ${TESTSRC} "                     >> options
  51 printf "%s\n" "-nocompile"                                  >> options
  52 printf "%s\n" "-XListAnnotationTypes"                       >> options
  53 
  54 printf "%s\n" "-classpath ${TESTCLASSES}"                    > options1
  55 printf "%s\n" "-factorypath ./nullap.jar"                   >> options1
  56 printf "%s\n" "-sourcepath ${TESTSRC} "                     >> options1
  57 printf "%s\n" "-nocompile"                                  >> options1
  58 printf "%s\n" "-XListAnnotationTypes"                       >> options1
  59 printf "%s\n" "-XclassesAsDecls"                            >> options1
  60 
  61 
  62 # Construct path to javac executable
  63 JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} -source 1.5 -sourcepath ${TESTSRC} -classpath ${TESTJAVA}/lib/tools.jar -d . "
  64 JAR="${TESTJAVA}/bin/jar "
  65 
  66 $JAVAC ${TESTSRC}/NullAPF.java \
  67 ${TESTSRC}/FreshnessApf.java  \
  68 ${TESTSRC}/TestGetTypeDeclarationApf.java \
  69 ${TESTSRC}/TestGetPackageApf.java
  70 RESULT=$?
  71 
  72 case "${RESULT}" in
  73         0  )
  74         ;;
  75 
  76         * )
  77         echo "Compilation failed."
  78         exit 1
  79 esac
  80 
  81 echo "Making services directory and copying services information."