Patch for jigsaw tests to run on all platforms

mark.reinhold at oracle.com mark.reinhold at oracle.com
Mon Mar 14 13:06:30 PDT 2011


2011/3/12 18:13 -0800, mandy.chung at oracle.com:
> This patch fixes the jigsaw tests to run on all platforms and also
> replace calls to the java.io.File.renameTo method with
> java.nio.file.Files.move method since on windows File.renameTo
> fails if the target file exists.
> 
> Webrev at:
>   http://cr.openjdk.java.net/~mchung/jigsaw/webrevs/jigsaw-tests.00/

Thanks for working on these.

In several of the test scripts you've removed "|| exit" constructs that
were inserted to ensure an error exit if an intermediate step fails.  In
module-annotation.sh, e.g.:

  @@ -272,23 +272,23 @@
      mkdir z.modules.$ver

      $BIN/javac -d z.modules.$ver -modulepath z.modules.$ver -L z.lib \
  -        $(find z.src.$ver -name '*.java') \
  -        $(find z.src/test -name '*.java') || exit 10
  +        `find z.src.$ver -name '*.java'` \
  +        `find z.src/test -name '*.java'`

  -   $BIN/jmod -P z.lib -L $lib create  || exit 11
  -   $BIN/jmod -L $lib install z.modules.$ver test.foo.bar test || exit 12
  -   $BIN/java -L $lib -m test $lib || exit 13
  +   $BIN/jmod -L $lib -P z.lib create
  +   $BIN/jmod -L $lib install z.modules.$ver test.foo.bar test
  +   $BIN/java -L $lib -m test $lib
   }

   #
   # Create z.lib with foo and bar modules
   $BIN/javac -d z.modules -modulepath z.modules \
  -    $(find z.src/bar -name '*.java') \
  -    $(find z.src/foo -name '*.java') || exit 1
  +    `find z.src/bar -name '*.java'` \
  +    `find z.src/foo -name '*.java'`

  -$BIN/jmod -L z.lib create  || exit 2
  -$BIN/jmod -L z.lib install z.modules foo bar || exit 3
  -$BIN/java -L z.lib -m foo || exit 4
  +$BIN/jmod -L z.lib create
  +$BIN/jmod -L z.lib install z.modules foo bar
  +$BIN/java -L z.lib -m foo

   # Test ScalarTypes and ArrayTypes with default values
   run v1

If one of the JPRT machine's shell rejects this construct then the
behavior should somehow be preserved, perhaps with a full if statement:

  if ! $BIN/jmod -L z.zlib install z.modules foo bar; then exit 3; fi

More verbose, sadly, but at least behavior-preserving.

In hello-native.sh you changed "set -e" to "set -x", but these are
different.

In tester.sh you have a leftover "# set -x" line.

In tester.sh, why is it necessary to use the "\\" file separator on MKS?
Doesn't MKS accept forward slashes as well?

- Mark



More information about the jigsaw-dev mailing list