построение дерева версий результатов тестирования(еще с багами), и фикс мелкого бага

This commit is contained in:
2023-10-06 22:51:09 +03:00
parent 8f5945e560
commit 2eadbbd3fa
16 changed files with 227 additions and 37 deletions

15
.idea/workspace.xml generated
View File

@@ -8,9 +8,20 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment=""> <list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Utils/Files/ProjectsChooser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Files/ProjectsChooser.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Utils/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Project/db_project_info.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTask/SapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTask/SapforTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DeleteSapforScenario.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DeleteSapforScenario.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/TestingSystem/UserConnection.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/UserConnection.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateEmptyDirectory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateEmptyDirectory.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateEmptyProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateEmptyProject.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenCurrentProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenCurrentProject.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenSapforTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenSapforTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/PublishTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/PublishTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SSH/ConnectionPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SSH/ConnectionPass.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -12,15 +12,17 @@ public class Constants {
public static final String SAPFOR_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/sapfor"; public static final String SAPFOR_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/sapfor";
//-- //--
public static final String LOADED = "LOADED"; public static final String LOADED = "LOADED";
//--файлы-признаки //-файлы-признаки
public static final String ABORTED = "ABORTED"; public static final String ABORTED = "ABORTED";
public static final String INTERRUPT = "INTERRUPT"; //файл признак прерывания. public static final String INTERRUPT = "INTERRUPT"; //файл признак прерывания.
public final static String DONE = "DONE"; public final static String DONE = "DONE";
public final static String TIMEOUT = "TIMEOUT"; public final static String TIMEOUT = "TIMEOUT";
//- вывод задач //-вывод задач
public final static String out_file = "out.txt"; public final static String out_file = "out.txt";
public final static String err_file = "err.txt"; public final static String err_file = "err.txt";
public final static String time_file = "total_time"; public final static String time_file = "total_time";
//-служебные разделы проекта.
public static final String data = "visualiser_data";
//-- //--
//https://losst.ru/komandy-terminala-linux //https://losst.ru/komandy-terminala-linux
public static String[] linux_system_commands = new String[]{ public static String[] linux_system_commands = new String[]{

View File

@@ -1,6 +1,6 @@
package Common.Utils.Files; package Common.Utils.Files;
import Common.Constants;
import Common.Utils.Utils; import Common.Utils.Utils;
import ProjectData.Project.db_project_info;
import javax.swing.*; import javax.swing.*;
import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileFilter;
@@ -12,7 +12,7 @@ public class ProjectsChooser extends VFileChooser_ {
public boolean accept(File f) { public boolean accept(File f) {
return return
!Utils.ContainsCyrillic(f.getAbsolutePath()) && !Utils.ContainsCyrillic(f.getAbsolutePath()) &&
!f.getName().equalsIgnoreCase(db_project_info.data) !f.getName().equalsIgnoreCase(Constants.data)
; ;
} }
@Override @Override

View File

@@ -954,7 +954,7 @@ public class Utils {
return false; return false;
} }
public static boolean containsSource(File folder, boolean question) { public static boolean containsSource(File folder, boolean question) {
File visualiserData = new File(folder, db_project_info.data); File visualiserData = new File(folder, Constants.data);
if (visualiserData.exists()) { if (visualiserData.exists()) {
return true; return true;
} //есть папка с данными, значит его уже открывали, все хорошо. } //есть папка с данными, значит его уже открывали, все хорошо.

View File

@@ -51,7 +51,6 @@ public class db_project_info extends DBObject {
public static Vector<db_project_info> newVersions = new Vector<>(); public static Vector<db_project_info> newVersions = new Vector<>();
public static final String launch_script_name = "run"; public static final String launch_script_name = "run";
public static final String default_binary_name = "0"; public static final String default_binary_name = "0";
public static final String data = "visualiser_data";
public static final String spf = "spf.proj"; public static final String spf = "spf.proj";
public static final String options = "options"; public static final String options = "options";
public static final String gcov = "gcov"; public static final String gcov = "gcov";
@@ -261,7 +260,7 @@ public class db_project_info extends DBObject {
} }
//- //-
public static File get_db_file(File project_home) { public static File get_db_file(File project_home) {
return new File(Paths.get(project_home.toString(), data, return new File(Paths.get(project_home.toString(), Constants.data,
Global.properties.ProjectDBName).toString()); Global.properties.ProjectDBName).toString());
} }
public static String recommendAnalysis(PassCode_2021 code_in) { public static String recommendAnalysis(PassCode_2021 code_in) {
@@ -345,22 +344,22 @@ public class db_project_info extends DBObject {
return name + " " + Utils.DQuotes(description); return name + " " + Utils.DQuotes(description);
} }
public File getProjFile() { public File getProjFile() {
return Paths.get(Home.getAbsolutePath(), data, spf).toFile(); return Paths.get(Home.getAbsolutePath(), Constants.data, spf).toFile();
} }
public File getDataDirectory() { public File getDataDirectory() {
return Paths.get(Home.getAbsolutePath(), data).toFile(); return Paths.get(Home.getAbsolutePath(), Constants.data).toFile();
} }
public File getOptionsDirectory() { public File getOptionsDirectory() {
return Paths.get(Home.getAbsolutePath(), data, options).toFile(); return Paths.get(Home.getAbsolutePath(), Constants.data, options).toFile();
} }
public File getGCOVDirectory() { public File getGCOVDirectory() {
return Paths.get(Home.getAbsolutePath(), data, gcov).toFile(); return Paths.get(Home.getAbsolutePath(), Constants.data, gcov).toFile();
} }
public File getAttachmentsDirectory() { public File getAttachmentsDirectory() {
return Paths.get(Home.getAbsolutePath(), data, attachments).toFile(); return Paths.get(Home.getAbsolutePath(), Constants.data, attachments).toFile();
} }
public File getAnalyzerDirectory() { public File getAnalyzerDirectory() {
return Paths.get(Home.getAbsolutePath(), data, Global.PerformanceAnalyzer).toFile(); return Paths.get(Home.getAbsolutePath(), Constants.data, Global.PerformanceAnalyzer).toFile();
} }
public Vector<File> getScreenShots() { public Vector<File> getScreenShots() {
Vector<File> res = new Vector<>(); Vector<File> res = new Vector<>();
@@ -374,7 +373,7 @@ public class db_project_info extends DBObject {
return res; return res;
} }
public File getStatisticDirectory() { public File getStatisticDirectory() {
return Paths.get(Home.getAbsolutePath(), data, statistic).toFile(); return Paths.get(Home.getAbsolutePath(), Constants.data, statistic).toFile();
} }
public db_project_info find_version_r(File v_home) { public db_project_info find_version_r(File v_home) {
if (Home.equals(v_home)) return this; if (Home.equals(v_home)) return this;
@@ -960,7 +959,7 @@ public class db_project_info extends DBObject {
} }
public boolean isProjectDirectory(File dir) { public boolean isProjectDirectory(File dir) {
if (!dir.isDirectory()) return false; if (!dir.isDirectory()) return false;
if (dir.getName().equals(data)) return false; if (dir.getName().equals(Constants.data)) return false;
for (db_project_info version : versions.values()) { for (db_project_info version : versions.values()) {
if (version.Home.equals(dir)) return false; if (version.Home.equals(dir)) return false;
} }
@@ -1338,7 +1337,7 @@ public class db_project_info extends DBObject {
//определить проект ли данная папка. и выделить его подпапки. //определить проект ли данная папка. и выделить его подпапки.
for (File file : files_) { for (File file : files_) {
if (file.isDirectory()) { if (file.isDirectory()) {
if (file.getName().equals(data)) { if (file.getName().equals(Constants.data)) {
result = dir.equals(this.Home) ? this : new db_project_info(dir); result = dir.equals(this.Home) ? this : new db_project_info(dir);
result.node = new DefaultMutableTreeNode(result); //узел в древе версий. result.node = new DefaultMutableTreeNode(result); //узел в древе версий.
//не является нарушением разделения графики и данных. за графику все равно отвечает рендерер. //не является нарушением разделения графики и данных. за графику все равно отвечает рендерер.

View File

@@ -3,6 +3,9 @@ import Common.Constants;
import Common.Global; import Common.Global;
import Common.Utils.Utils; import Common.Utils.Utils;
import GlobalData.Tasks.TaskState; import GlobalData.Tasks.TaskState;
import ProjectData.Files.DBProjectFile;
import ProjectData.LanguageName;
import ProjectData.Messages.Errors.MessageError;
import ProjectData.Project.db_project_info; import ProjectData.Project.db_project_info;
import SapforTestingSystem.Json.SapforConfiguration_json; import SapforTestingSystem.Json.SapforConfiguration_json;
import SapforTestingSystem.Json.SapforVersion_json; import SapforTestingSystem.Json.SapforVersion_json;
@@ -18,6 +21,8 @@ import java.nio.file.Paths;
import java.util.Arrays; import java.util.Arrays;
import java.util.Comparator; import java.util.Comparator;
import java.util.Vector; import java.util.Vector;
import static java.lang.Character.isDigit;
public class PerformSapforTask extends Pass_2021<SapforTask> { public class PerformSapforTask extends Pass_2021<SapforTask> {
@Override @Override
public String getDescription() { public String getDescription() {
@@ -69,6 +74,9 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
if (line.contains("[ERROR]")) { if (line.contains("[ERROR]")) {
return false; return false;
} }
if (line.toLowerCase().contains("segmentation fault")) {
return false;
}
} }
return true; return true;
} }
@@ -76,7 +84,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
process = null; process = null;
exit_code = Constants.Nan; exit_code = Constants.Nan;
//--- //---
File data_workspace = new File(workspace, db_project_info.data); File data_workspace = new File(workspace, Constants.data);
Utils.CheckDirectory(data_workspace); Utils.CheckDirectory(data_workspace);
outputFile = new File(data_workspace, outName); outputFile = new File(data_workspace, outName);
errorsFile = new File(data_workspace, errName); errorsFile = new File(data_workspace, errName);
@@ -156,11 +164,171 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
target.state = TaskState.DoneWithErrors; target.state = TaskState.DoneWithErrors;
return false; return false;
} }
//-------------------------------------------------->>
public MessageError unpackMessage(String line_in) throws Exception {
MessageError res = new MessageError();
res.file = "";
res.line = Constants.Nan;
res.value = "";
String line = line_in.substring(9);
System.out.println(line);
int i = 0;
int s = 0;
String lexeme = "";
//#1020: red43.fdv: line 988]: Active DVM directives are not supported (turn on DVM-directive support option)
for (char c : line.toCharArray()) {
// System.out.print("<s=" + s + ">");
// System.out.println(c);
switch (s) {
case 0:
//поиск groups_s
if (c == '#') {
s = 1;
lexeme = "";
} else return null;
break;
case 1:
//group_s
if (isDigit(c)) {
res.group_s += c;
lexeme += c;
} else if (c == ':') {
s = 2;
res.group = Integer.parseInt(lexeme);
} else return null;
break;
case 2:
//поиск filename
if (c == ' ') {
s = 3;
} else return null;
break;
case 3:
//filename
if (c == ':') {
s = 4;
} else {
res.file += c;
}
break;
case 4:
//поиск line
if (c == ' ') {
s = 5;
lexeme = "";
} else return null;
break;
case 5:
//line
if (c == ' ') {
if (!lexeme.equals("line"))
return null;
else {
s = 6;
lexeme = "";
}
} else {
lexeme += c;
}
break;
case 6:
//line number
if (isDigit(c)) {
lexeme += c;
} else if (c == ']') {
res.line = Integer.parseInt(lexeme);
s = 7;
} else return null;
break;
case 7:
//Поиск value
if (c == ':') {
s = 8;
} else return null;
break;
case 8:
if (c == ' ') {
s = 9;
} else return null;
break;
case 9:
//value
res.value += c;
break;
}
;
++i;
}
//--
if (s != 9)
return null;
//--
return res;
}
public void readMessagesFromFileDump(File file, Vector<MessageError> messages) throws Exception {
//Образец запакованного сообщения
//ERROR - [#1020: red43.fdv: line 988]: Active DVM directives are not supported (turn on DVM-directive support option)
Vector<String> lines = new Vector<>(FileUtils.readLines(file));
if (!lines.isEmpty()) {
for (int i = lines.size() - 1; i >= 0; --i) {
String line = lines.get(i);
if (line.startsWith("ERROR - ")) {
MessageError message = unpackMessage(line);
if (message != null)
messages.add(message);
//--
} else break;
}
}
}
protected void checkVersion(SapforVersion_json version, boolean isTransformation) throws Exception {
db_project_info project = new db_project_info();
project.Home = new File(version.version);
project.name = project.Home.getName();
project.description = version.description;
project.languageName = LanguageName.fortran;
project.creationDate = Utils.getDateNumber();
//--
Vector<MessageError> messages = new Vector<>();
//--
if (isTransformation) {
File p_out = Paths.get(project.Home.getAbsolutePath(), Constants.data, "parse_out.txt").toFile();
File out = Paths.get(project.Home.getAbsolutePath(), Constants.data, "out.txt").toFile();
//--
if (p_out.exists()) {
project.Log += (FileUtils.readFileToString(p_out));
readMessagesFromFileDump(p_out, messages);
}
if (out.exists()) {
project.Log += "\n" + FileUtils.readFileToString(out);
readMessagesFromFileDump(out, messages);
}
//--
}
project.CreateVisualiserData();
//---
if (isTransformation && !messages.isEmpty()) {
project.Open();
project.db.BeginTransaction();
// System.out.println("messages size=" + messages.size());
for (MessageError m : messages) {
if (project.db.files.containsKey(m.file)) {
DBProjectFile file = project.db.files.Data.get(m.file);
file.CreateAndAddNewMessage(1, m.value, m.line, m.group);
//update file
project.db.Update(file);
}
}
project.db.Commit();
project.db.Disconnect();
}
}
//-------------------------------------------------->>
@Override @Override
protected void body() throws Exception { protected void body() throws Exception {
System.out.println(target.root + " " + Utils.Brackets(sapforConfiguration_json.flags));//!! System.out.println(target.root + " " + Utils.Brackets(sapforConfiguration_json.flags));//!!
for (PassCode_2021 code : sapforConfiguration_json.codes) { for (PassCode_2021 code : sapforConfiguration_json.codes) {
System.out.println(code); //!! // System.out.println(code); //!!
if (parse()) { if (parse()) {
if (code.equals(PassCode_2021.CreateParallelVariants)) if (code.equals(PassCode_2021.CreateParallelVariants))
variants(); variants();
@@ -170,7 +338,13 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
break; break;
} }
//теперь строим деревья версий. //теперь строим деревья версий.
//System.out.println("Построение дерева версий..");
checkVersion(new SapforVersion_json(target.root, "исходная"), true);
for (SapforVersion_json version : target.versions)
checkVersion(version, true);
for (SapforVersion_json version : target.variants)
checkVersion(version, false);
//---->>>>
//System.out.println("DONE");
} }
} }

View File

@@ -26,12 +26,11 @@ public class SapforTask extends DBObject {
@Description("DEFAULT 'Inactive'") @Description("DEFAULT 'Inactive'")
@Expose @Expose
public TaskState state = TaskState.Inactive; public TaskState state = TaskState.Inactive;
@Description("DEFAULT '0'")
public int versions_tree_built = 0;
//----------- //-----------
@Description("IGNORE") @Description("IGNORE")
@Expose @Expose
public Vector<SapforVersion_json> versions = new Vector<>(); public Vector<SapforVersion_json> versions = new Vector<>();
//----------
@Description("IGNORE") @Description("IGNORE")
@Expose @Expose
public Vector<SapforVersion_json> variants = new Vector<>(); public Vector<SapforVersion_json> variants = new Vector<>();

View File

@@ -1,11 +1,11 @@
package TestingSystem; package TestingSystem;
import Common.Constants;
import Common.Global; import Common.Global;
import Common.Utils.Utils; import Common.Utils.Utils;
import Common.Utils.Validators.ShellParser; import Common.Utils.Validators.ShellParser;
import GlobalData.Machine.Machine; import GlobalData.Machine.Machine;
import GlobalData.RemoteFile.RemoteFile; import GlobalData.RemoteFile.RemoteFile;
import GlobalData.User.User; import GlobalData.User.User;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.PassException; import Visual_DVM_2021.Passes.PassException;
import com.jcraft.jsch.ChannelSftp; import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.ChannelShell; import com.jcraft.jsch.ChannelShell;
@@ -186,7 +186,7 @@ public class UserConnection {
} }
if (local_subdirs != null) { if (local_subdirs != null) {
for (File lsd : local_subdirs) { for (File lsd : local_subdirs) {
if (!lsd.getName().equals(db_project_info.data)) { if (!lsd.getName().equals(Constants.data)) {
RemoteFile rsd = null; RemoteFile rsd = null;
if (!remote_subdirs.containsKey(lsd.getName())) if (!remote_subdirs.containsKey(lsd.getName()))
sftpChannel.mkdir((rsd = new RemoteFile(remote_dir.full_name, lsd.getName(), true)).full_name); sftpChannel.mkdir((rsd = new RemoteFile(remote_dir.full_name, lsd.getName(), true)).full_name);

View File

@@ -1,9 +1,9 @@
package Visual_DVM_2021.Passes.All; package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current; import Common.Current;
import Common.UI.UI; import Common.UI.UI;
import Common.UI.Windows.Dialog.Text.FileNameForm; import Common.UI.Windows.Dialog.Text.FileNameForm;
import Common.Utils.Utils; import Common.Utils.Utils;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.ChangeFilePass; import Visual_DVM_2021.Passes.ChangeFilePass;
import Visual_DVM_2021.Passes.PassException; import Visual_DVM_2021.Passes.PassException;
@@ -25,8 +25,8 @@ public class CreateEmptyDirectory extends ChangeFilePass {
Log.Writeln("Файл с именем " + Utils.Brackets(fileName) + " уже существует"); Log.Writeln("Файл с именем " + Utils.Brackets(fileName) + " уже существует");
return false; return false;
} }
if (fileName.equalsIgnoreCase(db_project_info.data)) { if (fileName.equalsIgnoreCase(Constants.data)) {
Log.Writeln(Utils.Brackets(db_project_info.data) + " является зарезервированным именем!"); Log.Writeln(Utils.Brackets(Constants.data) + " является зарезервированным именем!");
return false; return false;
} }
return true; return true;

View File

@@ -1,8 +1,8 @@
package Visual_DVM_2021.Passes.All; package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Global; import Common.Global;
import Common.UI.Windows.Dialog.Text.FileNameForm; import Common.UI.Windows.Dialog.Text.FileNameForm;
import Common.Utils.Utils; import Common.Utils.Utils;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.PassCode_2021; import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.PassException; import Visual_DVM_2021.Passes.PassException;
import Visual_DVM_2021.Passes.Pass_2021; import Visual_DVM_2021.Passes.Pass_2021;
@@ -35,7 +35,7 @@ public class CreateEmptyProject extends Pass_2021<File> {
} }
@Override @Override
protected void body() throws Exception { protected void body() throws Exception {
File data = new File(target, db_project_info.data); File data = new File(target, Constants.data);
if (!(target.mkdir()&&data.mkdir())) if (!(target.mkdir()&&data.mkdir()))
throw new PassException("Не удалось создать проект."); throw new PassException("Не удалось создать проект.");
} }

View File

@@ -19,7 +19,7 @@ public class EditSapforConfigurationCommand extends EditObjectPass<SapforConfig
} }
@Override @Override
protected boolean canStart(Object... args) throws Exception { protected boolean canStart(Object... args) throws Exception {
if (Current.Check(Log, Current.SapforConfiguration)) { if (Current.Check(Log, Current.SapforConfigurationCommand)) {
return getTable().ShowEditObjectDialog(target = (SapforConfigurationCommand) Current.get(Current.SapforConfigurationCommand)); return getTable().ShowEditObjectDialog(target = (SapforConfigurationCommand) Current.get(Current.SapforConfigurationCommand));
} }
return false; return false;

View File

@@ -1,4 +1,5 @@
package Visual_DVM_2021.Passes.All; package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current; import Common.Current;
import Common.Global; import Common.Global;
import Common.UI.DebugPrintLevel; import Common.UI.DebugPrintLevel;
@@ -67,7 +68,7 @@ public class OpenCurrentProject extends Pass_2021<db_project_info> {
Log.Writeln_(Utils.Brackets(dir) + "\е является папкой!"); Log.Writeln_(Utils.Brackets(dir) + "\е является папкой!");
return false; return false;
} }
if (dir.getName().equals(db_project_info.data)) { if (dir.getName().equals(Constants.data)) {
Log.Writeln_(Utils.Brackets(dir) + "\nявляется служебной папкой визуализатора!"); Log.Writeln_(Utils.Brackets(dir) + "\nявляется служебной папкой визуализатора!");
return false; return false;
} }

View File

@@ -169,8 +169,8 @@ public class OpenSapforTest extends Pass_2021<SapforTaskResult> {
Vector<MessageError> messages = new Vector<>(); Vector<MessageError> messages = new Vector<>();
//-- //--
if (isTransformation) { if (isTransformation) {
File p_out = Paths.get(project.Home.getAbsolutePath(), db_project_info.data, "parse_out.txt").toFile(); File p_out = Paths.get(project.Home.getAbsolutePath(), Constants.data, "parse_out.txt").toFile();
File out = Paths.get(project.Home.getAbsolutePath(), db_project_info.data, "out.txt").toFile(); File out = Paths.get(project.Home.getAbsolutePath(), Constants.data, "out.txt").toFile();
//-- //--
if (p_out.exists()) { if (p_out.exists()) {
project.Log += (FileUtils.readFileToString(p_out)); project.Log += (FileUtils.readFileToString(p_out));

View File

@@ -1,4 +1,5 @@
package Visual_DVM_2021.Passes.All; package Visual_DVM_2021.Passes.All;
import Common.Constants;
import Common.Current; import Common.Current;
import Common.UI.UI; import Common.UI.UI;
import Common.Utils.Utils; import Common.Utils.Utils;
@@ -90,7 +91,7 @@ public class PublishTest extends TestingSystemPass<Test> {
} }
project.Clone(src, false); project.Clone(src, false);
FileUtils.copyFile(project.db.getFile(), Paths.get(src.getAbsolutePath(), FileUtils.copyFile(project.db.getFile(), Paths.get(src.getAbsolutePath(),
db_project_info.data, project.db.getFile().getName()).toFile()); Constants.data, project.db.getFile().getName()).toFile());
//архивация. //архивация.
File archive = Utils.getTempFileName("test_archive"); File archive = Utils.getTempFileName("test_archive");
if (passes.get(PassCode_2021.ZipFolderPass).Do(src.getAbsolutePath(), archive.getAbsolutePath())) { if (passes.get(PassCode_2021.ZipFolderPass).Do(src.getAbsolutePath(), archive.getAbsolutePath())) {

View File

@@ -313,6 +313,8 @@ public enum PassCode_2021 {
switch (this) { switch (this) {
case Undefined: case Undefined:
return "?"; return "?";
case DeleteSapforScenario:
return "Удалить сценарий SAPFOR";
case DeleteServerSapfor: case DeleteServerSapfor:
return "Удалить версию SAPFOR"; return "Удалить версию SAPFOR";
case StartSapforTestsOnServer: case StartSapforTestsOnServer:

View File

@@ -1,4 +1,5 @@
package Visual_DVM_2021.Passes.SSH; package Visual_DVM_2021.Passes.SSH;
import Common.Constants;
import Common.Utils.Utils; import Common.Utils.Utils;
import Common.Utils.Validators.ShellParser; import Common.Utils.Validators.ShellParser;
import GlobalData.Machine.Machine; import GlobalData.Machine.Machine;
@@ -353,7 +354,7 @@ public abstract class ConnectionPass<T> extends Pass_2021<T> {
} }
if (local_subdirs != null) { if (local_subdirs != null) {
for (File lsd : local_subdirs) { for (File lsd : local_subdirs) {
if (!lsd.getName().equals(db_project_info.data)) { if (!lsd.getName().equals(Constants.data)) {
RemoteFile rsd = null; RemoteFile rsd = null;
if (!remote_subdirs.containsKey(lsd.getName())) if (!remote_subdirs.containsKey(lsd.getName()))
sftpChannel.mkdir((rsd = new RemoteFile(remote_dir.full_name, lsd.getName(), true)).full_name); sftpChannel.mkdir((rsd = new RemoteFile(remote_dir.full_name, lsd.getName(), true)).full_name);