checkNotEmpty(perfTest.getScriptName(), "perfTest should have script name"),
getSafe(perfTest.getScriptRevision())), "script should exist");
// Get all files in the script path
ScriptHandler handler = scriptHandlerFactory.getHandler(scriptEntry);
ProcessingResultPrintStream processingResult = new ProcessingResultPrintStream(new ByteArrayOutputStream());
handler.prepareDist(perfTest.getId(), user, scriptEntry, perfTestDistDirectory, config.getControllerProperties(),
processingResult);
LOGGER.info("File write is completed in {}", perfTestDistDirectory);
if (!processingResult.isSuccess()) {
File logDir = new File(getLogFileDirectory(perfTest), "distribution_log.txt");
try {
FileUtils.writeByteArrayToFile(logDir, processingResult.getLogByteArray());
} catch (IOException e) {
noOp();
}
throw processException("Error while file distribution is prepared.");
}