8164887: update tests to remove use of old-style options
authorjjg
Fri, 26 Aug 2016 15:54:36 -0700
changeset 40599 be40838eb215
parent 40598 821b945fc942
child 40600 3874367e6e6f
8164887: update tests to remove use of old-style options Reviewed-by: mchung
langtools/make/build.xml
langtools/make/diags-examples.xml
langtools/make/gendata/Gendata-jdk.compiler.gmk
langtools/make/intellij/runConfigurations/javah.xml
langtools/make/intellij/runConfigurations/javap.xml
langtools/make/intellij/runConfigurations/jshell.xml
langtools/make/intellij/runConfigurations/sjavac.xml
langtools/make/netbeans/langtools/build.xml
langtools/test/jdk/javadoc/doclet/testFramesNoFrames/TestFramesNoFrames.java
langtools/test/jdk/javadoc/doclet/testModules/TestModules.java
langtools/test/jdk/javadoc/tool/modules/FilterOptions.java
langtools/test/jdk/javadoc/tool/modules/Modules.java
langtools/test/jdk/javadoc/tool/modules/PackageOptions.java
langtools/test/tools/javac/VersionOpt.java
langtools/test/tools/javac/diags/examples/DirPathElementNotDirectory/modulesourcepath
langtools/test/tools/javac/diags/examples/ModuleNotFoundInModuleSourcePath/ModuleNotFoundInModuleSourcePath.java
langtools/test/tools/javac/diags/examples/XModuleWithModulePath/XModuleWithModulePath.java
langtools/test/tools/javac/file/LimitedImage.java
langtools/test/tools/javac/modules/GraphsTest.java
langtools/test/tools/javac/modules/ModuleSourcePathTest.java
langtools/test/tools/javac/modules/NPEEmptyFileTest.java
langtools/test/tools/jdeps/jdkinternals/RemovedJDKInternals.java
langtools/test/tools/jdeps/lib/CompilerUtils.java
--- a/langtools/make/build.xml	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/make/build.xml	Fri Aug 26 15:54:36 2016 -0700
@@ -88,18 +88,18 @@
         <dirset dir="${src.dir}" includes="*.*"/>
     </pathconvert>
 
-    <pathconvert property="xpatch.rest" pathsep=" -Xpatch:">
+    <pathconvert property="xpatch.rest" pathsep=" --patch-module=">
         <regexpmapper from="${file.separator}([^${file.separator}]+)$" to='\1="${build.modules}${file.separator}\1"' />
         <dirset dir="${src.dir}" includes="*.*"/>
     </pathconvert>
 
-    <pathconvert property="xpatch.noquotes.rest" pathsep=" -Xpatch:">
+    <pathconvert property="xpatch.noquotes.rest" pathsep=" --patch-module=">
         <regexpmapper from="${file.separator}([^${file.separator}]+)$" to="\1=${build.modules}${file.separator}\1" />
         <dirset dir="${src.dir}" includes="*.*"/>
     </pathconvert>
 
-    <property name="xpatch.cmd" value="-Xpatch:${xpatch.rest}"/>
-    <property name="xpatch.noquotes.cmd" value="-Xpatch:${xpatch.noquotes.rest}"/>
+    <property name="xpatch.cmd" value="--patch-module=${xpatch.rest}"/>
+    <property name="xpatch.noquotes.cmd" value="--patch-module=${xpatch.noquotes.rest}"/>
 
     <!-- java.marker is set to a marker file to check for within a Java install dir.
          The best file to check for across Solaris/Linux/Windows/MacOS is one of the
@@ -207,7 +207,7 @@
             <arg line="-source ${javac.source} -target ${javac.target}" />
             <arg value="-d" />
             <arg value="${build.modules}" />
-            <arg line="${javac.opts} -modulesourcepath ${src.dir}${file.separator}*${file.separator}share${file.separator}classes:${build.gensrc} -m ${modules.names}" />
+            <arg line="${javac.opts} --module-source-path ${src.dir}${file.separator}*${file.separator}share${file.separator}classes:${build.gensrc} -m ${modules.names}" />
         </exec>
         <delete>
             <fileset dir="${build.modules}" includes="**/module-info.class"/>
--- a/langtools/make/diags-examples.xml	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/make/diags-examples.xml	Fri Aug 26 15:54:36 2016 -0700
@@ -80,12 +80,12 @@
             includeAntRuntime="no"
             debug="${javac.debug}"
             debuglevel="${javac.debuglevel}">
-            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
-            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
-            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/>
-            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
-            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
-            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
+            <compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
+            <compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
+            <compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/>
+            <compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
+            <compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
+            <compilerarg line="--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
         </javac>
     </target>
 
@@ -111,12 +111,12 @@
                 <arg value="-showFiles"/>
                 <arg value="-title"/>
                 <arg value="Examples of javac diagnostics"/>
-                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
-                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
-                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/>
-                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
-                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
-                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
+                <jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
+                <jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
+                <jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/>
+                <jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
+                <jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
+                <jvmarg line="--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
             </java>
             </sequential>
         </macrodef>
--- a/langtools/make/gendata/Gendata-jdk.compiler.gmk	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/make/gendata/Gendata-jdk.compiler.gmk	Fri Aug 26 15:54:36 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -41,9 +41,9 @@
 
 ifeq ($(BOOT_JDK_MODULAR), true)
   COMPILECREATESYMBOLS_ADD_EXPORTS := \
-      -XaddExports:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
-      -XaddExports:jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
-      -XaddExports:jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
+      --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
+      --add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
+      --add-exports=jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
 endif
 
 $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
--- a/langtools/make/intellij/runConfigurations/javah.xml	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/javah.xml	Fri Aug 26 15:54:36 2016 -0700
@@ -2,7 +2,7 @@
   <configuration default="false" name="javah" type="Application" factoryName="Application">
     <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
     <option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
-    <option name="VM_PARAMETERS" value='@XPATCH@ -XaddExports:jdk.compiler/com.sun.tools.javah=ALL-UNNAMED' />
+    <option name="VM_PARAMETERS" value='@XPATCH@ --add-exports=jdk.compiler/com.sun.tools.javah=ALL-UNNAMED' />
     <option name="PROGRAM_PARAMETERS" value="" />
     <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
     <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/javap.xml	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/javap.xml	Fri Aug 26 15:54:36 2016 -0700
@@ -2,7 +2,7 @@
   <configuration default="false" name="javap" type="Application" factoryName="Application">
     <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
     <option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
-    <option name="VM_PARAMETERS" value='@XPATCH@ -XaddExports:jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED' />
+    <option name="VM_PARAMETERS" value='@XPATCH@ --add-exports=jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED' />
     <option name="PROGRAM_PARAMETERS" value="" />
     <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
     <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/jshell.xml	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/jshell.xml	Fri Aug 26 15:54:36 2016 -0700
@@ -2,7 +2,7 @@
   <configuration default="false" name="jshell" type="Application" factoryName="Application">
     <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
     <option name="MAIN_CLASS_NAME" value="jdk.internal.jshell.tool.JShellTool" />
-    <option name="VM_PARAMETERS" value='@XPATCH@ -XaddExports:jdk.jshell/jdk.internal.jshell.tool=ALL-UNNAMED' />
+    <option name="VM_PARAMETERS" value='@XPATCH@ --add-exports=jdk.jshell/jdk.internal.jshell.tool=ALL-UNNAMED' />
     <option name="PROGRAM_PARAMETERS" value="" />
     <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
     <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/sjavac.xml	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/sjavac.xml	Fri Aug 26 15:54:36 2016 -0700
@@ -2,7 +2,7 @@
   <configuration default="false" name="sjavac" type="Application" factoryName="Application">
     <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
     <option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
-    <option name="VM_PARAMETERS" value='@XPATCH@ -XaddExports:jdk.compiler/com.sun.tools.sjavac=ALL-UNNAMED' />
+    <option name="VM_PARAMETERS" value='@XPATCH@ --add-exports=jdk.compiler/com.sun.tools.sjavac=ALL-UNNAMED' />
     <option name="PROGRAM_PARAMETERS" value="" />
     <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
     <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/netbeans/langtools/build.xml	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/make/netbeans/langtools/build.xml	Fri Aug 26 15:54:36 2016 -0700
@@ -218,11 +218,11 @@
 
             <sequential>
                 <java fork="true" jvm="${langtools.jdk.home}/bin/java" classname="@{mainclass}">
-                    <jvmarg line="-Xpatch:java.compiler=@{build.modules}/java.compiler"/>
-                    <jvmarg line="-Xpatch:jdk.compiler=@{build.modules}/jdk.compiler"/>
-                    <jvmarg line="-Xpatch:jdk.javadoc=@{build.modules}/jdk.javadoc"/>
-                    <jvmarg line="-Xpatch:jdk.jdeps=@{build.modules}/jdk.jdeps"/>
-                    <jvmarg line="-Xpatch:jdk.jshell=@{build.modules}/jdk.jshell"/>
+                    <jvmarg line="--patch-module=java.compiler=@{build.modules}/java.compiler"/>
+                    <jvmarg line="--patch-module=jdk.compiler=@{build.modules}/jdk.compiler"/>
+                    <jvmarg line="--patch-module=jdk.javadoc=@{build.modules}/jdk.javadoc"/>
+                    <jvmarg line="--patch-module=jdk.jdeps=@{build.modules}/jdk.jdeps"/>
+                    <jvmarg line="--patch-module=jdk.jshell=@{build.modules}/jdk.jshell"/>
                     <jvmarg line="@{jpda.jvmargs}"/>
                     <arg line="@{args}"/>
                 </java>
--- a/langtools/test/jdk/javadoc/doclet/testFramesNoFrames/TestFramesNoFrames.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testFramesNoFrames/TestFramesNoFrames.java	Fri Aug 26 15:54:36 2016 -0700
@@ -204,7 +204,7 @@
     @Test
     void testModules(Path base, FrameKind fKind, OverviewKind oKind, HtmlKind hKind) throws IOException {
         javadoc(base, fKind, oKind, hKind,
-            "-modulesourcepath", gensrcModules.toString(),
+            "--module-source-path", gensrcModules.toString(),
             "--module", "m1,m2,m3");
 
         new Checker(fKind, oKind, hKind)
--- a/langtools/test/jdk/javadoc/doclet/testModules/TestModules.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testModules/TestModules.java	Fri Aug 26 15:54:36 2016 -0700
@@ -160,8 +160,8 @@
     @Test
     void testModuleSummary() {
         javadoc("-d", "out-moduleSummary", "-use",
-                "-modulesourcepath", testSrc,
-                "-addmods", "module1,module2",
+                "--module-source-path", testSrc,
+                "--add-modules", "module1,module2",
                 "testpkgmdl1", "testpkgmdl2", "module2/testpkg2mdl2");
         checkExit(Exit.OK);
         checkModuleSummary();
@@ -174,8 +174,8 @@
     @Test
     void testModuleFilesAndLinks() {
         javadoc("-d", "out-modulelinks",
-                "-modulesourcepath", testSrc,
-                "-addmods", "module1",
+                "--module-source-path", testSrc,
+                "--add-modules", "module1",
                 "testpkgmdl1");
         checkExit(Exit.OK);
         checkModuleFilesAndLinks(true);
--- a/langtools/test/jdk/javadoc/tool/modules/FilterOptions.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/jdk/javadoc/tool/modules/FilterOptions.java	Fri Aug 26 15:54:36 2016 -0700
@@ -27,7 +27,6 @@
  * @summary Tests elements filtering options
  * @modules
  *      jdk.javadoc/jdk.javadoc.internal.api
- *      jdk.javadoc/jdk.javadoc.internal.doclets.standard
  *      jdk.javadoc/jdk.javadoc.internal.tool
  *      jdk.compiler/com.sun.tools.javac.api
  *      jdk.compiler/com.sun.tools.javac.main
@@ -60,7 +59,7 @@
 
     @Test
     public void testDefault(Path base) throws Exception {
-        execTask("-modulesourcepath", src, "--module", "m1");
+        execTask("--module-source-path", src, "--module", "m1");
 
         checkModulesSpecified("m1");
         checkModulesIncluded("m1");
@@ -70,7 +69,7 @@
 
     @Test
     public void testModuleModeApi(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1", "--show-module-contents:api");
 
         checkModuleMode("API");
@@ -78,7 +77,7 @@
 
     @Test
     public void testModuleModeAll(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1", "--show-module-contents:all");
 
         checkModuleMode("ALL");
@@ -86,7 +85,7 @@
 
     @Test
     public void testShowPackagesExported(Path base)  throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-packages:exported"); // default
 
@@ -98,7 +97,7 @@
 
     @Test
     public void testShowPackagesAll(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-packages:all");
         checkModulesSpecified("m1");
@@ -111,7 +110,7 @@
 
     @Test
     public void testShowTypesPrivate(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-types:private");
 
@@ -128,7 +127,7 @@
 
     @Test
     public void testShowTypesPackage(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-types:package");
 
@@ -144,7 +143,7 @@
 
     @Test
     public void testShowTypesProtected(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-types:protected");
 
@@ -161,7 +160,7 @@
 
     @Test
     public void testShowTypesPublic(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-types:public");
 
@@ -178,7 +177,7 @@
 
     @Test
     public void testShowMembersPrivate(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-members:private");
 
@@ -187,7 +186,7 @@
 
     @Test
     public void testShowMembersPackage(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-members:package");
 
@@ -196,7 +195,7 @@
 
     @Test
     public void testShowMembersProtected(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-members:protected");
 
@@ -205,7 +204,7 @@
 
     @Test
     public void testShowMembersPublic(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "--show-members:public");
 
@@ -214,7 +213,7 @@
 
     @Test
     public void testLegacyPublic(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "-public");
 
@@ -229,7 +228,7 @@
 
     @Test
     public void testLegacyDefault(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1");
 
         checkModuleMode("API");
@@ -243,7 +242,7 @@
 
     @Test
     public void testLegacyProtected(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "-protected");
 
@@ -258,7 +257,7 @@
 
     @Test
     public void testLegacyPackage(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "-package");
 
@@ -277,7 +276,7 @@
 
     @Test
     public void testLegacyPrivate(Path base) throws Exception {
-        execTask("-modulesourcepath", src,
+        execTask("--module-source-path", src,
                 "--module", "m1",
                 "-private");
 
--- a/langtools/test/jdk/javadoc/tool/modules/Modules.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/jdk/javadoc/tool/modules/Modules.java	Fri Aug 26 15:54:36 2016 -0700
@@ -27,7 +27,6 @@
  * @summary Tests primarily the module graph computations.
  * @modules
  *      jdk.javadoc/jdk.javadoc.internal.api
- *      jdk.javadoc/jdk.javadoc.internal.doclets.standard
  *      jdk.javadoc/jdk.javadoc.internal.tool
  *      jdk.compiler/com.sun.tools.javac.api
  *      jdk.compiler/com.sun.tools.javac.main
@@ -58,7 +57,7 @@
                 .classes("package pub; /** Klass A */ public class A {}")
                 .classes("package pro; /** Klass B */ public class B {}")
                 .write(src);
-        execTask("-modulesourcepath", src.toString(),
+        execTask("--module-source-path", src.toString(),
                  "--module", "m1");
         checkModulesSpecified("m1");
         checkPackagesIncluded("pub");
@@ -83,7 +82,7 @@
                 .classes("package m2pub; /** Klass A */ public class A {}")
                 .classes("package m2pro; /** Klass B */ public class B {}")
                 .write(src);
-        execTask("-modulesourcepath", src.toString(),
+        execTask("--module-source-path", src.toString(),
             "--module", "m1,m2");
         checkModulesSpecified("m1", "m2");
         checkPackagesIncluded("m1pub", "m2pub");
@@ -109,7 +108,7 @@
                 .classes("package m2pub; /** Klass A */ public class A {}")
                 .classes("package m2pro; /** Klass B */ public class B {}")
                 .write(src);
-        execTask("-modulesourcepath", src.toString(),
+        execTask("--module-source-path", src.toString(),
             "--module", "m1",
             "--module", "m2");
         checkModulesSpecified("m1", "m2");
@@ -152,7 +151,7 @@
                 .classes("package p; public class Main { openO.O o; openN.N n; openL.L l; }")
                 .write(src);
 
-        execTask("-modulesourcepath", src.toString(),
+        execTask("--module-source-path", src.toString(),
                 "--module", "M");
 
         checkModulesSpecified("M");
@@ -176,7 +175,7 @@
                 .classes("package p; public class Main { openO.O o; openN.N n; openL.L l; }")
                 .write(src);
 
-        execTask("-modulesourcepath", src.toString(),
+        execTask("--module-source-path", src.toString(),
                 "--module", "M",
                 "--expand-requires:public");
 
@@ -201,7 +200,7 @@
                 .classes("package p; public class Main { openO.O o; openN.N n; openL.L l; }")
                 .write(src);
 
-        execTask("-modulesourcepath", src.toString(),
+        execTask("--module-source-path", src.toString(),
                 "--module", "M",
                 "--expand-requires:all");
 
@@ -229,7 +228,7 @@
                 .classes("package p; public class Main { openO.O o; openN.N n; openL.L l; }")
                 .write(src);
 
-        execNegativeTask("-modulesourcepath", src.toString(),
+        execNegativeTask("--module-source-path", src.toString(),
                 "--module", "MIA",
                 "--expand-requires:all");
 
@@ -251,7 +250,7 @@
                 .classes("package p; public class Main { openO.O o; openN.N n; openL.L l; }")
                 .write(src);
 
-        execNegativeTask("-modulesourcepath", src.toString(),
+        execNegativeTask("--module-source-path", src.toString(),
                 "--module", "M,N,L,MIA,O,P",
                 "--expand-requires:all");
 
--- a/langtools/test/jdk/javadoc/tool/modules/PackageOptions.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/jdk/javadoc/tool/modules/PackageOptions.java	Fri Aug 26 15:54:36 2016 -0700
@@ -27,7 +27,6 @@
  * @summary Test modules with packages and subpackages filtering
  * @modules
  *      jdk.javadoc/jdk.javadoc.internal.api
- *      jdk.javadoc/jdk.javadoc.internal.doclets.standard
  *      jdk.javadoc/jdk.javadoc.internal.tool
  *      jdk.compiler/com.sun.tools.javac.api
  *      jdk.compiler/com.sun.tools.javac.main
@@ -52,8 +51,8 @@
 
     @Test
     public void testExportedNonQualifiedPackagesLegacyMode(Path base)  throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
-                "-addmods", "m1",
+        execTask("--module-source-path", createSources(base.resolve("src")),
+                "--add-modules", "m1",
                 "m1pub");
 
         checkModulesNotSpecified("m1");
@@ -64,8 +63,8 @@
 
     @Test
     public void testExportedQualifiedPackagesLegacyMode(Path base)  throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
-                "-addmods", "m1",
+        execTask("--module-source-path", createSources(base.resolve("src")),
+                "--add-modules", "m1",
                 "m1/m1pub");
 
         checkModulesNotSpecified("m1");
@@ -76,8 +75,8 @@
 
     @Test
     public void testNonExportedQualifedPackagesLegacyMode(Path base)  throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
-                "-addmods", "m1",
+        execTask("--module-source-path", createSources(base.resolve("src")),
+                "--add-modules", "m1",
                 "m1/m1pro.pro1" /* not exported, therefore qualify with module */);
 
         checkModulesNotSpecified("m1");
@@ -92,8 +91,8 @@
     public void testTypesLegacyMode(Path base) throws Exception {
         Path srcPath = base.resolve("src");
         Path typPath = srcPath.resolve("m1/m1pub/A.java");
-        execTask("-modulesourcepath", createSources(srcPath),
-                "-addmods", "m1",
+        execTask("--module-source-path", createSources(srcPath),
+                "--add-modules", "m1",
                 typPath.toString());
         checkModulesNotSpecified("m1");
         checkModulesIncluded("m1");
@@ -109,8 +108,8 @@
     public void testSubclassedTypesLegacyMode(Path base) throws Exception {
         Path srcPath = base.resolve("src");
         Path typPath = srcPath.resolve("m1/m1pub/B.java");
-        execTask("-modulesourcepath", createSources(srcPath),
-                "-addmods", "m1",
+        execTask("--module-source-path", createSources(srcPath),
+                "--add-modules", "m1",
                 typPath.toString());
         checkModulesNotSpecified("m1");
         checkModulesIncluded("m1");
@@ -124,7 +123,7 @@
 
     @Test
     public void testDefaultPackages(Path base) throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
+        execTask("--module-source-path", createSources(base.resolve("src")),
                 "--module", "m1");
 
         checkModulesSpecified("m1");
@@ -149,20 +148,20 @@
             // I/O error encounted during the iteration
             throw ex.getCause();
         }
-        execTask("-modulesourcepath", src.toString(),
+        execTask("--module-source-path", src.toString(),
                 "-subpackages", "m1/m1pro");
 
         checkPackagesSpecified("m1pro", "m1pro.pro1", "m1pro.pro2");
 
         // empty package directory should cause an error
-        execNegativeTask("-modulesourcepath", src.toString(),
+        execNegativeTask("--module-source-path", src.toString(),
                          "m1/m1pro");
 
     }
 
     @Test
     public void testExportedQualifiedSubpackageWithMultipleModules(Path base) throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src"), 2),
+        execTask("--module-source-path", createSources(base.resolve("src"), 2),
                 "--module", "m1",
                 "-subpackages", "m1/m1pro.pro1:m1/m1pro.pro2:m2/m2pub.pub1");
 
@@ -177,7 +176,7 @@
 
     @Test
     public void testUnexportedUnqualifiedSubpackages(Path base) throws Exception {
-        execNegativeTask("-modulesourcepath", createSources(base.resolve("src")),
+        execNegativeTask("--module-source-path", createSources(base.resolve("src")),
                          "--module", "m1",
                          "-subpackages", "m1pub.pub1:pro");
 
@@ -186,7 +185,7 @@
 
     @Test
     public void testUnexportedQualifiedPackage(Path base) throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
+        execTask("--module-source-path", createSources(base.resolve("src")),
                 "--module", "m1",
                 "m1/m1pro");
 
@@ -201,7 +200,7 @@
 
     @Test
     public void testUnexportedQualifiedSubpackage(Path base) throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
+        execTask("--module-source-path", createSources(base.resolve("src")),
                 "--module", "m1",
                 "-subpackages", "m1/m1pro");
 
@@ -216,7 +215,7 @@
 
     @Test
     public void testUnexportedQualifiedSubpackageExcludeQualified(Path base) throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
+        execTask("--module-source-path", createSources(base.resolve("src")),
                 "--module", "m1",
                 "-subpackages", "m1/m1pro",
                 "-exclude", "m1/m1pro.pro1.pro11:m1/m1pro.pro2.pro21");
@@ -233,7 +232,7 @@
 
     @Test
     public void testUnexportedQualifiedSubpackageExcludeUnqualified(Path base) throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
+        execTask("--module-source-path", createSources(base.resolve("src")),
                 "--module", "m1",
                 "-subpackages", "m1/m1pro",
                 "-exclude", "m1pro.pro1.pro11:m1pro.pro2.pro21");
@@ -250,7 +249,7 @@
 
     @Test
     public void testUnexportedQualifiedSubpackages(Path base) throws Exception {
-        execTask("-modulesourcepath", createSources(base.resolve("src")),
+        execTask("--module-source-path", createSources(base.resolve("src")),
                 "--module", "m1",
                 "-subpackages", "m1/m1pro.pro1:m1/m1pro.pro2");
 
--- a/langtools/test/tools/javac/VersionOpt.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/javac/VersionOpt.java	Fri Aug 26 15:54:36 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
         // Test functions by comparing the version string from javac against
         // a "golden" version generated automatically from the underlying JVM.
         // As such, it is only effective in testing the "standard" compiler,
-        // and not any development version being tested via -Xpatch.
+        // and not any development version being tested via --patch-modules.
         // Check the version of the compiler being used, and let the test pass
         // automatically if is is a development version.
         Class<?> javacClass = com.sun.tools.javac.Main.class;
--- a/langtools/test/tools/javac/diags/examples/DirPathElementNotDirectory/modulesourcepath	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/javac/diags/examples/DirPathElementNotDirectory/modulesourcepath	Fri Aug 26 15:54:36 2016 -0700
@@ -21,5 +21,5 @@
  * questions.
  */
 
-// a file to be passed in where a directory is expected (-modulesourcepath option)
+// a file to be passed in where a directory is expected (--module-source-path option)
 // to trigger an error deliberately.
--- a/langtools/test/tools/javac/diags/examples/ModuleNotFoundInModuleSourcePath/ModuleNotFoundInModuleSourcePath.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/javac/diags/examples/ModuleNotFoundInModuleSourcePath/ModuleNotFoundInModuleSourcePath.java	Fri Aug 26 15:54:36 2016 -0700
@@ -22,6 +22,6 @@
  */
 
 // key: compiler.err.module.not.found.in.module.source.path
-// options: -m m1 -modulesourcepath src
+// options: -m m1 --module-source-path src
 
 class ModuleNotFoundInModuleSourcePath {}
--- a/langtools/test/tools/javac/diags/examples/XModuleWithModulePath/XModuleWithModulePath.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/javac/diags/examples/XModuleWithModulePath/XModuleWithModulePath.java	Fri Aug 26 15:54:36 2016 -0700
@@ -22,6 +22,6 @@
  */
 
 // key: compiler.err.xmodule.no.module.sourcepath
-// options: -Xmodule:java.compiler -modulesourcepath src
+// options: -Xmodule:java.compiler --module-source-path src
 
 class XModuleWithModulePath {}
--- a/langtools/test/tools/javac/file/LimitedImage.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/javac/file/LimitedImage.java	Fri Aug 26 15:54:36 2016 -0700
@@ -28,7 +28,7 @@
  * @library /tools/lib
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.main
- * @run main/othervm -limitmods jdk.compiler LimitedImage
+ * @run main/othervm --limit-modules jdk.compiler LimitedImage
  */
 
 import java.io.IOException;
@@ -133,4 +133,4 @@
         }
     }
 
-}
\ No newline at end of file
+}
--- a/langtools/test/tools/javac/modules/GraphsTest.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/javac/modules/GraphsTest.java	Fri Aug 26 15:54:36 2016 -0700
@@ -194,7 +194,7 @@
                 .write(modSrc);
         String log = new JavacTask(tb)
                 .options("-XDrawDiagnostics",
-                        "-modulesourcepath", modSrc.toString())
+                        "--module-source-path", modSrc.toString())
                 .outdir(Files.createDirectories(base.resolve("negative")))
                 .files(findJavaFiles(modSrc))
                 .run(Task.Expect.FAIL)
--- a/langtools/test/tools/javac/modules/ModuleSourcePathTest.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/javac/modules/ModuleSourcePathTest.java	Fri Aug 26 15:54:36 2016 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @summary tests for -modulesourcepath
+ * @summary tests for --module-source-path
  * @library /tools/lib
  * @modules
  *      jdk.compiler/com.sun.tools.javac.api
--- a/langtools/test/tools/javac/modules/NPEEmptyFileTest.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/javac/modules/NPEEmptyFileTest.java	Fri Aug 26 15:54:36 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @summary NPE while compiling empty javafile with -modulesourcepath option
+ * @summary NPE while compiling empty source file with --module-source-path option
  * @library /tools/lib
  * @modules
  *      jdk.compiler/com.sun.tools.javac.api
--- a/langtools/test/tools/jdeps/jdkinternals/RemovedJDKInternals.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/jdeps/jdkinternals/RemovedJDKInternals.java	Fri Aug 26 15:54:36 2016 -0700
@@ -73,7 +73,7 @@
         // patch jdk.unsupported and set -cp to codec types
         assertTrue(CompilerUtils.compile(Paths.get(TEST_SRC, "src", "p"),
                                          CLASSES_DIR,
-                                         "-Xpatch:jdk.unsupported=" + patchDir,
+                                         "--patch-module", "jdk.unsupported=" + patchDir,
                                          "-cp", codecDest.toString()));
     }
 
--- a/langtools/test/tools/jdeps/lib/CompilerUtils.java	Fri Aug 26 11:36:08 2016 -0700
+++ b/langtools/test/tools/jdeps/lib/CompilerUtils.java	Fri Aug 26 15:54:36 2016 -0700
@@ -100,7 +100,7 @@
         }
 
         Stream<String> opts = Arrays.stream(new String[] {
-            "-modulesourcepath", source.toString(), "-m", moduleName
+            "--module-source-path", source.toString(), "-m", moduleName
         });
         List<String> javacOpts = Stream.concat(opts, Arrays.stream(options))
                                         .collect(Collectors.toList());