no message

This commit is contained in:
2024-10-14 12:54:52 +03:00
parent e1627badd3
commit e64a4f4c47
45 changed files with 211 additions and 200 deletions

View File

@@ -94,7 +94,7 @@ public class MachineProcess extends DBObject {
public void Start() {
try {
File workspace = getWorkspace();
Utils.CheckAndCleanDirectory(workspace);
Utils_.CheckAndCleanDirectory(workspace);
//копирование визуализатора
File src = new File(Utils_.getHomeDirectory(), "TestingSystem.jar");
File supervisor = new File(workspace, "VisualSapfor.jar");

View File

@@ -61,7 +61,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
} else if (object instanceof DVMPackage) {
DVMPackage dvmPackage = (DVMPackage) object;
//--
Utils.CheckAndCleanDirectory(dvmPackage.getLocalWorkspace());
Utils_.CheckAndCleanDirectory(dvmPackage.getLocalWorkspace());
//--
dvmPackage.saveJson();
dvmPackage.package_json = null; // объект больше не нужен.
@@ -74,8 +74,8 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
public void afterDeleteAction(DBObject object) throws Exception {
if (object instanceof Test) {
Test test = (Test) object;
Utils.forceDeleteWithCheck(test.getArchive());
Utils.forceDeleteWithCheck(test.getServerPath());
Utils_.forceDeleteWithCheck(test.getArchive());
Utils_.forceDeleteWithCheck(test.getServerPath());
} else if (object instanceof Group) {
Group group = (Group) object;
Vector<Test> tests = new Vector<>();
@@ -85,11 +85,11 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
}
for (Test group_test : tests) {
db.Delete(group_test);
Utils.forceDeleteWithCheck(group_test.getArchive());
Utils.forceDeleteWithCheck(group_test.getServerPath());
Utils_.forceDeleteWithCheck(group_test.getArchive());
Utils_.forceDeleteWithCheck(group_test.getServerPath());
}
} else if (object instanceof ServerSapfor) {
Utils.forceDeleteWithCheck(
Utils_.forceDeleteWithCheck(
new File(
((ServerSapfor) object).home_path
)
@@ -97,11 +97,11 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
} else if (object instanceof DVMPackage) {
DVMPackage dvmPackage = (DVMPackage) object;
File workspace = dvmPackage.getLocalWorkspace();
Utils.forceDeleteWithCheck(workspace);
Utils_.forceDeleteWithCheck(workspace);
} else if (object instanceof SapforPackage) {
SapforPackage sapforPackage = (SapforPackage) object;
File workspace = sapforPackage.getLocalWorkspace();
Utils.forceDeleteWithCheck(workspace);
Utils_.forceDeleteWithCheck(workspace);
} else if (object instanceof SapforSettings) {
SapforSettings sapforSettings = (SapforSettings) object;
Vector<SapforSettingsCommand> commands = new Vector<>();

View File

@@ -173,7 +173,7 @@ public class TestsDatabase extends SQLiteDatabase {
//--
public void SaveTestFromSingleFile(ServerSapfor sapfor, Group group, Test test, File file) throws Exception {
File testDirectory = new File(Global.TestsDirectory, String.valueOf(test.id));
Utils.CheckAndCleanDirectory(testDirectory);
Utils_.CheckAndCleanDirectory(testDirectory);
File testFile = Paths.get(testDirectory.getAbsolutePath(), file.getName()).toFile();
FileUtils.copyFile(file, testFile);
//----

View File

@@ -231,7 +231,7 @@ public class RemoteDVMTestingPlanner extends DVMTestingPlanner {
}
@Override
protected void DownloadResults() throws Exception {
Utils.CheckDirectory(packageLocalWorkspace);
Utils_.CheckDirectory(packageLocalWorkspace);
RemoteFile remote_results_archive = new RemoteFile(packageRemoteWorkspace, "results.zip");
File results_archive = new File(packageLocalWorkspace, "results.zip");
user.connection.performScript(packageRemoteWorkspace, "zip -r " + Utils_.DQuotes("results.zip") + " " + Utils_.DQuotes("results"));

View File

@@ -61,7 +61,7 @@ public class PerformSapforTask extends Pass<SapforTask> {
//слегка изменить подход.
protected boolean transformation(PassCode code) throws Exception {
task = new File(parentTask, "v1");
Utils.CheckAndCleanDirectory(task); //папка для преобразования.
Utils_.CheckAndCleanDirectory(task); //папка для преобразования.
//если версия пустая, это тоже результат тестирования. Поэтому должна учитываться в древе.
target.versions.add(version_json = new SapforVersion_json(
root.getAbsolutePath(),

View File

@@ -1,12 +1,11 @@
package _VisualDVM.TestingSystem.SAPFOR.SapforPackage;
import Common.CommonConstants;
import _VisualDVM.Current;
import Common.Utils.Utils_;
import Common.Database.Objects.DBObject;
import _VisualDVM.Global;
import _VisualDVM.ServerObjectsCache.ConfigurationCache;
import _VisualDVM.ServerObjectsCache.VisualCaches;
import Common.Utils.TextLog;
import _VisualDVM.Utils;
import _VisualDVM.GlobalData.Account.Account;
import _VisualDVM.GlobalData.Tasks.TaskState;
import _VisualDVM.TestingSystem.Common.TasksPackageState;
@@ -46,7 +45,7 @@ public class SapforPackage extends TestingPackage<SapforPackage_json> {
public void init() throws Exception {
for (SapforTask task : package_json.tasks)
task.sapfortaskspackage_id = id;
Utils.CheckAndCleanDirectory(getLocalWorkspace());
Utils_.CheckAndCleanDirectory(getLocalWorkspace());
saveJson();
package_json = null; // объект больше не нужен.
}

View File

@@ -81,7 +81,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
//--->>>
for (SapforTest_json test_json : set_json.tests) {
File test_root = new File(configurationWorkspace, test_json.description);
Utils.CheckAndCleanDirectory(test_root);
Utils_.CheckAndCleanDirectory(test_root);
FileUtils.copyDirectory(new File(Global.TestsDirectory, String.valueOf(test_json.id)), test_root);
}
}