промежуточный. ликвидировал велосипед с копированием папок
This commit is contained in:
@@ -1036,25 +1036,5 @@ public class Utils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static void copyDirectory(File src, File dst) throws Exception {
|
||||
int code = Constants.Nan;
|
||||
String command =
|
||||
Global.isWindows ?
|
||||
("xcopy " +
|
||||
Utils.DQuotes(src.getAbsolutePath()) + " " +
|
||||
Utils.DQuotes(dst.getAbsolutePath()) + " /e")
|
||||
:
|
||||
("cp -r " + Utils.DQuotes(src.getAbsolutePath()) + " " +
|
||||
Utils.DQuotes(dst.getAbsolutePath())
|
||||
);
|
||||
try {
|
||||
code = Runtime.getRuntime().exec(command).waitFor();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
throw new PassException("Команда " + command + " завершилась с исключением.");
|
||||
}
|
||||
if (code != 0)
|
||||
throw new PassException("Команда " + command + " завершилась с кодом " + code);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ public class StartSapforTests extends Pass_2021<SapforScenario> {
|
||||
File taskWorkspace = new File(sapforTasksPackage.workspace, test.description);
|
||||
Utils.CheckAndCleanDirectory(taskWorkspace);
|
||||
//--
|
||||
Utils.copyDirectory(new File(Global.TestsDirectory, test.id), taskWorkspace);
|
||||
FileUtils.copyDirectory(new File(Global.TestsDirectory, test.id), taskWorkspace);
|
||||
}
|
||||
}
|
||||
Global.db.Update(sapforTasksPackage);
|
||||
|
||||
Reference in New Issue
Block a user