RunTestExecutable runTask = tasks.create(namingScheme.getTaskName("run"), RunTestExecutable.class);
final Project project = runTask.getProject();
runTask.setDescription(String.format("Runs the %s", binary));
final InstallExecutable installTask = binary.getTasks().withType(InstallExecutable.class).iterator().next();
runTask.getInputs().files(installTask.getOutputs().getFiles());
runTask.setExecutable(installTask.getRunScript().getPath());
runTask.setOutputDir(new File(project.getBuildDir(), "/test-results/" + namingScheme.getOutputDirectoryBase()));
}
}