@Test public void shouldNotAppendCoverageArgumentToOptsByDefault() { Map<String, String> env = ImmutableMap.of(); Configuration config = Configuration.create(new HashMap<String, String>()); AbstractBuildExecutor.appendCoverageArgumentToOpts(env, config, "SONAR_OPTS"); }
static void appendCoverageArgumentToOpts(Map<String, String> environmentVariables, Configuration config, String optsVariableName) { String jaCoCoArgument = JaCoCoArgumentsBuilder.getJaCoCoArgument(config); if (jaCoCoArgument != null) { if (environmentVariables.containsKey(optsVariableName)) { String opts = environmentVariables.get(optsVariableName) + " " + jaCoCoArgument; environmentVariables.put(optsVariableName, opts); } else { environmentVariables.put(optsVariableName, jaCoCoArgument); } } if (environmentVariables.containsKey(optsVariableName)) { LOG.info("{}: {}", optsVariableName, environmentVariables.get(optsVariableName)); } }
AbstractBuildExecutor { static void appendCoverageArgumentToOpts(Map<String, String> environmentVariables, Configuration config, String optsVariableName) { String jaCoCoArgument = JaCoCoArgumentsBuilder.getJaCoCoArgument(config); if (jaCoCoArgument != null) { if (environmentVariables.containsKey(optsVariableName)) { String opts = environmentVariables.get(optsVariableName) + " " + jaCoCoArgument; environmentVariables.put(optsVariableName, opts); } else { environmentVariables.put(optsVariableName, jaCoCoArgument); } } if (environmentVariables.containsKey(optsVariableName)) { LOG.info("{}: {}", optsVariableName, environmentVariables.get(optsVariableName)); } } }
AbstractBuildExecutor { static void appendCoverageArgumentToOpts(Map<String, String> environmentVariables, Configuration config, String optsVariableName) { String jaCoCoArgument = JaCoCoArgumentsBuilder.getJaCoCoArgument(config); if (jaCoCoArgument != null) { if (environmentVariables.containsKey(optsVariableName)) { String opts = environmentVariables.get(optsVariableName) + " " + jaCoCoArgument; environmentVariables.put(optsVariableName, opts); } else { environmentVariables.put(optsVariableName, jaCoCoArgument); } } if (environmentVariables.containsKey(optsVariableName)) { LOG.info("{}: {}", optsVariableName, environmentVariables.get(optsVariableName)); } }  }
AbstractBuildExecutor { static void appendCoverageArgumentToOpts(Map<String, String> environmentVariables, Configuration config, String optsVariableName) { String jaCoCoArgument = JaCoCoArgumentsBuilder.getJaCoCoArgument(config); if (jaCoCoArgument != null) { if (environmentVariables.containsKey(optsVariableName)) { String opts = environmentVariables.get(optsVariableName) + " " + jaCoCoArgument; environmentVariables.put(optsVariableName, opts); } else { environmentVariables.put(optsVariableName, jaCoCoArgument); } } if (environmentVariables.containsKey(optsVariableName)) { LOG.info("{}: {}", optsVariableName, environmentVariables.get(optsVariableName)); } }   }
AbstractBuildExecutor { static void appendCoverageArgumentToOpts(Map<String, String> environmentVariables, Configuration config, String optsVariableName) { String jaCoCoArgument = JaCoCoArgumentsBuilder.getJaCoCoArgument(config); if (jaCoCoArgument != null) { if (environmentVariables.containsKey(optsVariableName)) { String opts = environmentVariables.get(optsVariableName) + " " + jaCoCoArgument; environmentVariables.put(optsVariableName, opts); } else { environmentVariables.put(optsVariableName, jaCoCoArgument); } } if (environmentVariables.containsKey(optsVariableName)) { LOG.info("{}: {}", optsVariableName, environmentVariables.get(optsVariableName)); } }    }