changeset 12606:84632483ee9d

8173158: [AOT] fix typo in jaotc --help output Reviewed-by: rbackman
author kvn
date Tue, 24 Jan 2017 17:19:01 -0800
parents 9e0a7b1cbdef
children 784fe0364e70
files src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java test/compiler/aot/AotCompiler.java test/compiler/aot/cli/jaotc/ClasspathOptionUnknownClassTest.java test/compiler/aot/cli/jaotc/CompileClassTest.java test/compiler/aot/cli/jaotc/ListOptionNotExistingTest.java test/compiler/aot/cli/jaotc/ListOptionTest.java test/compiler/aot/cli/jaotc/ListOptionWrongFileTest.java
diffstat 7 files changed, 39 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java	Tue Jan 24 08:51:07 2017 +0000
+++ b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java	Tue Jan 24 17:19:01 2017 -0800
@@ -141,6 +141,32 @@
             }
             task.options.outputName = name;
         }
+    }, new Option("  --class-name <class names> List of classes to compile", true, "--class-name", "--classname") {
+        @Override
+        void process(Main task, String opt, String arg) {
+            task.options.files.addAll(ClassSearch.makeList(ClassNameSourceProvider.TYPE, arg));
+        }
+    }, new Option("  --jar <jarfiles>           List of jar files to compile", true, "--jar") {
+        @Override
+        void process(Main task, String opt, String arg) {
+            task.options.files.addAll(ClassSearch.makeList(JarSourceProvider.TYPE, arg));
+        }
+    }, new Option("  --module <modules>         List of modules to compile", true, "--module") {
+        @Override
+        void process(Main task, String opt, String arg) {
+            task.options.files.addAll(ClassSearch.makeList(ModuleSourceProvider.TYPE, arg));
+        }
+    }, new Option("  --directory <dirs>         List of directories where to search for files to compile", true, "--directory") {
+        @Override
+        void process(Main task, String opt, String arg) {
+            task.options.files.addAll(ClassSearch.makeList(DirectorySourceProvider.TYPE, arg));
+        }
+    }, new Option("  --search-path <dirs>       List of directories where to search for specified files", true, "--search-path") {
+        @Override
+        void process(Main task, String opt, String arg) {
+            String[] elements = arg.split(":");
+            task.options.searchPath.add(elements);
+        }
     }, new Option("  --compile-commands <file>  Name of file with compile commands", true, "--compile-commands") {
         @Override
         void process(Main task, String opt, String arg) {
@@ -151,32 +177,12 @@
         void process(Main task, String opt, String arg) {
             TieredAOT.setValue(true);
         }
-    }, new Option("  --compile-with-assertions  Compile assertions", false, "--compile-with-assertions") {
+    }, new Option("  --compile-with-assertions  Compile with java assertions", false, "--compile-with-assertions") {
         @Override
         void process(Main task, String opt, String arg) {
             task.options.compileWithAssertions = true;
         }
-    }, new Option("  --classname <class names>> Class names to AOT compile (: separated list)", true, "--classname") {
-        @Override
-        void process(Main task, String opt, String arg) {
-            task.options.files.addAll(ClassSearch.makeList(ClassNameSourceProvider.TYPE, arg));
-        }
-    }, new Option("  --directory <directories>  Directories to search for class files. (: separated list)", true, "--directory") {
-        @Override
-        void process(Main task, String opt, String arg) {
-            task.options.files.addAll(ClassSearch.makeList(DirectorySourceProvider.TYPE, arg));
-        }
-    }, new Option("  --jar <jarfiles>           Jar files to search for class files. (: separated list)", true, "--jar") {
-        @Override
-        void process(Main task, String opt, String arg) {
-            task.options.files.addAll(ClassSearch.makeList(JarSourceProvider.TYPE, arg));
-        }
-    }, new Option("  --module <modules>         module names to AOT compile (: separated list)", true, "--module") {
-        @Override
-        void process(Main task, String opt, String arg) {
-            task.options.files.addAll(ClassSearch.makeList(ModuleSourceProvider.TYPE, arg));
-        }
-    }, new Option("  --threads <number>         Number of compilation threads to be used", true, "--threads") {
+    }, new Option("  --compile-threads <number> Number of compilation threads to be used", true, "--compile-threads", "--threads") {
         @Override
         void process(Main task, String opt, String arg) {
             int threads = Integer.parseInt(arg);
@@ -228,12 +234,6 @@
         void process(Main task, String opt, String arg) {
             task.options.version = true;
         }
-    }, new Option("  --search-path <name>       Where to search for jarfiles and modules", true, "--search-path") {
-        @Override
-        void process(Main task, String opt, String arg) {
-            String[] elements = arg.split(":");
-            task.options.searchPath.add(elements);
-        }
     }, new Option("  -J<flag>                   Pass <flag> directly to the runtime system", false, "-J") {
         @Override
         void process(Main task, String opt, String arg) {
@@ -639,17 +639,17 @@
     }
 
     private void showUsage() {
-        log.println("Usage: " + PROGNAME + " <options> list...");
+        log.println("Usage: " + PROGNAME + " <options> list");
         log.println("use --help for a list of possible options");
     }
 
     private void showHelp() {
-        log.println("Usage: " + PROGNAME + " <options> | <list...>");
+        log.println("Usage: " + PROGNAME + " <options> list");
         log.println();
-        log.println("  list       A list of class names, jar files or directories which");
-        log.println("             contains class files.");
+        log.println("  list       A : separated list of class names, modules, jar files");
+        log.println("             or directories which contain class files.");
         log.println();
-        log.println("where possible options include:");
+        log.println("where options include:");
         for (Option o : recognizedOptions) {
             String name = o.aliases[0].substring(1); // there must always be at least one name
             name = name.charAt(0) == '-' ? name.substring(1) : name;
--- a/test/compiler/aot/AotCompiler.java	Tue Jan 24 08:51:07 2017 +0000
+++ b/test/compiler/aot/AotCompiler.java	Tue Jan 24 17:19:01 2017 -0800
@@ -100,7 +100,7 @@
             args.add("--compile-commands");
             args.add(file.toString());
         }
-        args.add("--classname");
+        args.add("--class-name");
         args.add(item);
         return launchJaotc(args, extraopts);
     }
--- a/test/compiler/aot/cli/jaotc/ClasspathOptionUnknownClassTest.java	Tue Jan 24 08:51:07 2017 +0000
+++ b/test/compiler/aot/cli/jaotc/ClasspathOptionUnknownClassTest.java	Tue Jan 24 17:19:01 2017 -0800
@@ -39,7 +39,7 @@
 
 public class ClasspathOptionUnknownClassTest {
     public static void main(String[] args) {
-        OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--classname", "HelloWorldOne");
+        OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--class-name", "HelloWorldOne");
         Asserts.assertNE(oa.getExitValue(), 0, "Unexpected compilation exit code");
         File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
         Asserts.assertFalse(compiledLibrary.exists(), "Compiler library unexpectedly exists");
--- a/test/compiler/aot/cli/jaotc/CompileClassTest.java	Tue Jan 24 08:51:07 2017 +0000
+++ b/test/compiler/aot/cli/jaotc/CompileClassTest.java	Tue Jan 24 17:19:01 2017 -0800
@@ -41,7 +41,7 @@
 
 public class CompileClassTest {
     public static void main(String[] args) {
-        OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--classname", JaotcTestHelper
+        OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--class-name", JaotcTestHelper
                 .getClassAotCompilationName(HelloWorldOne.class));
         oa.shouldHaveExitValue(0);
         File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
--- a/test/compiler/aot/cli/jaotc/ListOptionNotExistingTest.java	Tue Jan 24 08:51:07 2017 +0000
+++ b/test/compiler/aot/cli/jaotc/ListOptionNotExistingTest.java	Tue Jan 24 17:19:01 2017 -0800
@@ -45,7 +45,7 @@
 
     public static void main(String[] args) {
         OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--compile-commands", "./notExisting.list",
-                "--classname", COMPILE_ITEM);
+                "--class-name", COMPILE_ITEM);
         int exitCode = oa.getExitValue();
         Asserts.assertNE(exitCode, 0, "Unexpected compilation exit code");
         File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
--- a/test/compiler/aot/cli/jaotc/ListOptionTest.java	Tue Jan 24 08:51:07 2017 +0000
+++ b/test/compiler/aot/cli/jaotc/ListOptionTest.java	Tue Jan 24 17:19:01 2017 -0800
@@ -66,7 +66,7 @@
             throw new Error("TESTBUG: can't write list file " + e, e);
         }
         OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--compile-commands", COMPILE_COMMAND_FILE.toString(),
-                "--classname", JaotcTestHelper.getClassAotCompilationName(HelloWorldOne.class));
+                "--class-name", JaotcTestHelper.getClassAotCompilationName(HelloWorldOne.class));
         oa.shouldHaveExitValue(0);
         File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
         Asserts.assertTrue(compiledLibrary.exists(), "Compiled library file missing");
--- a/test/compiler/aot/cli/jaotc/ListOptionWrongFileTest.java	Tue Jan 24 08:51:07 2017 +0000
+++ b/test/compiler/aot/cli/jaotc/ListOptionWrongFileTest.java	Tue Jan 24 17:19:01 2017 -0800
@@ -54,7 +54,7 @@
 
     public static void main(String[] args) {
         // expecting wrong file to be read but no compilation directive recognized, so, all compiled
-        OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--compile-commands", COMPILE_FILE, "--classname", COMPILE_ITEM);
+        OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--compile-commands", COMPILE_FILE, "--class-name", COMPILE_ITEM);
         oa.shouldHaveExitValue(0);
         File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
         Asserts.assertTrue(compiledLibrary.exists(), "Expected compiler library to exist");