конвертация стандартных тестов на стороне сервера. стало быстрее.

This commit is contained in:
2023-11-25 16:51:35 +03:00
parent f0fd9335c4
commit 93ccdc3522
5 changed files with 64 additions and 156 deletions

View File

@@ -76,7 +76,7 @@ public class Test extends riDBObject {
return new File(Global.TempDirectory, temp_project_name);
}
//--
public db_project_info packCode(File dir) throws Exception {
public db_project_info packCode(File dir, boolean create_archive) throws Exception {
temp_project_name = Utils.getDateName("test");
//-
File tempProject = getTempProject();
@@ -88,14 +88,16 @@ public class Test extends riDBObject {
db_project_info project = new db_project_info(tempProject);
project.Open();
project.Close();
// UI.Info("clear data for "+project.Home.getAbsolutePath());
// UI.Info("clear data for "+project.Home.getAbsolutePath());
project.clearData();
// UI.Info("DONE");
// UI.Info("DONE");
//--
ZipFolderPass zip = new ZipFolderPass();
if (zip.Do(tempProject.getAbsolutePath(), tempArchive.getAbsolutePath())) {
project_archive_bytes = Utils.packFile(tempArchive);
} else throw new PassException("Не удалось создать архив папки с кодом.");
if (create_archive) {
ZipFolderPass zip = new ZipFolderPass();
if (zip.Do(tempProject.getAbsolutePath(), tempArchive.getAbsolutePath())) {
project_archive_bytes = Utils.packFile(tempArchive);
} else throw new PassException("Не удалось создать архив папки с кодом.");
}
return project;
}
public boolean unpackProjectOnServer() throws Exception {