changeset 1129:7c2b3d0880da

7901297: JMH CLI runner should set non-zero exit code when failOnError(true) and benchmarks fail
author shade
date Fri, 13 Feb 2015 12:27:39 +0300
parents 1bb680b3d89a
children 63844ec679a4
files jmh-core/src/main/java/org/openjdk/jmh/Main.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/Main.java	Fri Feb 13 01:18:19 2015 +0300
+++ b/jmh-core/src/main/java/org/openjdk/jmh/Main.java	Fri Feb 13 12:27:39 2015 +0300
@@ -75,14 +75,17 @@
                 } else {
                     runner.list();
                 }
+                System.exit(1);
             } catch (RunnerException e) {
                 System.err.print("ERROR: ");
                 e.printStackTrace(System.err);
+                System.exit(1);
             }
 
         } catch (CommandLineOptionException e) {
             System.err.println("Error parsing command line:");
             System.err.println(" " + e.getMessage());
+            System.exit(1);
         }
     }