diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index b781c6b9..37565620 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,8 +7,15 @@
+
-
+
+
+
+
+
+
+
@@ -30,8 +37,8 @@
-
+
@@ -86,7 +93,7 @@
-
+
@@ -99,8 +106,8 @@
-
+
diff --git a/src/Repository/Component/Sapfor/Sapfor.java b/src/Repository/Component/Sapfor/Sapfor.java
index a1b0b319..5d7c22d2 100644
--- a/src/Repository/Component/Sapfor/Sapfor.java
+++ b/src/Repository/Component/Sapfor/Sapfor.java
@@ -450,7 +450,7 @@ public abstract class Sapfor extends OSDComponent {
FileUtils.write(file,
Utils.DQuotes(sapfor_drv)
+ (flags.isEmpty() ? "" : (" " + flags))
- + " -noLogo -spf"
+ + " -noLogo"
+ " " + command +
" 1>" +
Utils.DQuotes(outputFile.getAbsolutePath()) +
@@ -500,7 +500,7 @@ public abstract class Sapfor extends OSDComponent {
"parse",
sapfor_drv,
workspace,
- "-parse *.f *.for *.fdv *.f90 *.f77",
+ "-parse -spf *.f *.for *.fdv *.f90 *.f77",
flags,
Constants.parse_out_file,
Constants.parse_err_file)
diff --git a/src/Repository/Component/Visualiser.java b/src/Repository/Component/Visualiser.java
index ed2314fe..2478d0e6 100644
--- a/src/Repository/Component/Visualiser.java
+++ b/src/Repository/Component/Visualiser.java
@@ -62,7 +62,7 @@ public class Visualiser extends Component {
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
@Override
public void GetVersionInfo() {
- version = 1040;
+ version = 1041;
String pattern = "MMM dd yyyy HH:mm:ss";
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
date_text = df.format(getClassBuildTime());
diff --git a/src/TestingSystem/Common/TestingServer.java b/src/TestingSystem/Common/TestingServer.java
index dcf625a7..b4f29082 100644
--- a/src/TestingSystem/Common/TestingServer.java
+++ b/src/TestingSystem/Common/TestingServer.java
@@ -488,7 +488,7 @@ public class TestingServer extends RepositoryServer {
test.sender_name = account.name;
test.sender_address = account.email;
test.group_id = group.id;
- test.files=file.getName();
+ test.files = file.getName();
db.Insert(test);
testsIds.add(test);
//->>
@@ -512,8 +512,7 @@ public class TestingServer extends RepositoryServer {
//--
if (Sapfor.getMinMaxDim(Sapfor.getTempCopy(new File(sapfor.call_command)), tempProject, test)) {
db.Update(test);
- }
- else
+ } else
throw new RepositoryRefuseException("Не удалось определить размерность теста " + Utils.Brackets(test.description));
break;
case c:
diff --git a/src/TestingSystem/SAPFOR/Json/SapforVersionState.java b/src/TestingSystem/SAPFOR/Json/SapforVersionState.java
new file mode 100644
index 00000000..3c7cc084
--- /dev/null
+++ b/src/TestingSystem/SAPFOR/Json/SapforVersionState.java
@@ -0,0 +1,6 @@
+package TestingSystem.SAPFOR.Json;
+public enum SapforVersionState {
+ Empty, //версия оказалась пуста.
+ Normal, //версия построена
+ HasErrors //в журнале версии есть ошибки. то есть, не удалось построить следующую версию.
+}
diff --git a/src/TestingSystem/SAPFOR/Json/SapforVersion_json.java b/src/TestingSystem/SAPFOR/Json/SapforVersion_json.java
index 8dcd7c1d..b54cf881 100644
--- a/src/TestingSystem/SAPFOR/Json/SapforVersion_json.java
+++ b/src/TestingSystem/SAPFOR/Json/SapforVersion_json.java
@@ -25,7 +25,6 @@ public class SapforVersion_json implements Serializable {
public String version = "";
@Expose
public String description = "";
- public boolean success = true;
//поля для отображения деревьев.
public File Home = null;
public LinkedHashMap files = new LinkedHashMap<>();
@@ -50,7 +49,8 @@ public class SapforVersion_json implements Serializable {
public String toString() {
return Home.getName() + " : " + Utils.Brackets(description);
}
- public void init(File configurationRoot) {
+ public SapforVersionState init(File configurationRoot) {
+ SapforVersionState state = SapforVersionState.Empty;
String relativePath = Global.isWindows ? Utils.toW(version) : version;
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
files = new LinkedHashMap<>();
@@ -66,11 +66,14 @@ public class SapforVersion_json implements Serializable {
}
}
}
+ if (!files.isEmpty())
+ state = SapforVersionState.Normal;
}
parse_out = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.parse_out_file).toFile());
parse_err = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.parse_err_file).toFile());
out = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.out_file).toFile());
err = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.err_file).toFile());
+ return state;
}
public boolean isMatch(SapforVersion_json version_json) {
if (!description.equals(version_json.description)) {
diff --git a/src/TestingSystem/SAPFOR/PerformSapforTask.java b/src/TestingSystem/SAPFOR/PerformSapforTask.java
index f6e4c2e7..c0039566 100644
--- a/src/TestingSystem/SAPFOR/PerformSapforTask.java
+++ b/src/TestingSystem/SAPFOR/PerformSapforTask.java
@@ -20,7 +20,7 @@ public class PerformSapforTask extends Pass_2021 {
@Override
public String getDescription() {
return "";
- // "Запуск задачи SAPFOR"; Оставляем пустое описание чтобы не засорять журнал.
+ // "Запуск задачи SAPFOR"; Оставляем пустое описание чтобы не засорять журнал.
}
@Override
protected boolean needsAnimation() {
@@ -29,6 +29,7 @@ public class PerformSapforTask extends Pass_2021 {
//--
File sapfor_drv;
SapforConfiguration_json sapforConfiguration_json;
+ SapforVersion_json version_json;
//-----
File root;
File parentTask;
@@ -39,6 +40,7 @@ public class PerformSapforTask extends Pass_2021 {
sapfor_drv = (File) args[0];
sapforConfiguration_json = (SapforConfiguration_json) args[1];
target = (SapforTask) args[2];
+ version_json = null;
//--->>
parentTask = Paths.get(Global.Home, String.valueOf(sapforConfiguration_json.id), target.test_description).toFile();
root = new File(Global.Home, String.valueOf(sapforConfiguration_json.id));
@@ -47,9 +49,9 @@ public class PerformSapforTask extends Pass_2021 {
return true;
}
protected boolean parse() throws Exception {
- if (Sapfor.parse(sapfor_drv, parentTask, target.flags)){
+ if (Sapfor.parse(sapfor_drv, parentTask, target.flags)) {
return true;
- }else {
+ } else {
target.state = TaskState.DoneWithErrors;
return false;
}
@@ -59,7 +61,7 @@ public class PerformSapforTask extends Pass_2021 {
task = new File(parentTask, "v1");
Utils.CheckAndCleanDirectory(task); //папка для преобразования.
//если версия пустая, это тоже результат тестирования. Поэтому должна учитываться в древе.
- target.versions.add(new SapforVersion_json(
+ target.versions.add(version_json =new SapforVersion_json(
root.getAbsolutePath(),
task.getAbsolutePath(), code.getDescription()));
//---
@@ -97,7 +99,6 @@ public class PerformSapforTask extends Pass_2021 {
files.sort(Comparator.comparingInt(o -> Integer.parseInt(o.getName().substring(1))));
for (File file : files)
target.variants.add(
-
new SapforVersion_json(
root.getAbsolutePath(),
file.getAbsolutePath(), PassCode_2021.SPF_CreateParallelVariant.getDescription()));
@@ -107,7 +108,7 @@ public class PerformSapforTask extends Pass_2021 {
@Override
protected void body() throws Exception {
target.StartDate = new Date().getTime();
- target.versions.add(new SapforVersion_json(target.test_description, ""));
+ target.versions.add(version_json = new SapforVersion_json(target.test_description, ""));
for (PassCode_2021 code : sapforConfiguration_json.codes) {
if (parse()) {
if (code.equals(PassCode_2021.CreateParallelVariants))
diff --git a/src/TestingSystem/SAPFOR/SapforTask/SapforTask.java b/src/TestingSystem/SAPFOR/SapforTask/SapforTask.java
index 3e84b41e..94b0b3c4 100644
--- a/src/TestingSystem/SAPFOR/SapforTask/SapforTask.java
+++ b/src/TestingSystem/SAPFOR/SapforTask/SapforTask.java
@@ -4,6 +4,7 @@ import Common.Current;
import Common.Database.DBObject;
import Common.Utils.Utils;
import GlobalData.Tasks.TaskState;
+import TestingSystem.SAPFOR.Json.SapforVersionState;
import TestingSystem.SAPFOR.Json.SapforVersion_json;
import TestingSystem.SAPFOR.SapforTasksPackage.UI.VersionSummary;
import Visual_DVM_2021.Passes.PassCode_2021;
@@ -75,29 +76,31 @@ public class SapforTask extends DBObject {
public SapforTask() {
}
public DefaultMutableTreeNode getVersionsTree(File configurationRoot) {
- DefaultMutableTreeNode root = null;
- DefaultMutableTreeNode child = null;
- DefaultMutableTreeNode parent = null;
+ VersionSummary root = null;
+ VersionSummary child = null;
+ VersionSummary parent = null;
//--
for (SapforVersion_json version_json : versions) {
- version_json.init(configurationRoot);
version_json.task = this;
//-
- child = new VersionSummary(version_json);
+ child = new VersionSummary(version_json, version_json.init(configurationRoot));
if (parent == null) {
root = child;
parent = child;
} else {
- parent.add(child);
- parent = child;
+ if (!child.state.equals(SapforVersionState.Empty)) {
+ parent.add(child);
+ parent = child;
+ }
}
//-
}
if (parent != null) {
for (SapforVersion_json version_json : variants) {
- version_json.init(configurationRoot);
version_json.task = this;
- parent.add(new VersionSummary(version_json));
+ if (!child.state.equals(SapforVersionState.Empty)) {
+ parent.add(new VersionSummary(version_json, version_json.init(configurationRoot)));
+ }
}
}
//--
diff --git a/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/VersionSummary.java b/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/VersionSummary.java
index 308aba34..bd0739b5 100644
--- a/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/VersionSummary.java
+++ b/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/VersionSummary.java
@@ -1,20 +1,22 @@
package TestingSystem.SAPFOR.SapforTasksPackage.UI;
+import TestingSystem.SAPFOR.Json.SapforVersionState;
import TestingSystem.SAPFOR.Json.SapforVersion_json;
-public class VersionSummary extends SapforPackageTreeNode{
-
+public class VersionSummary extends SapforPackageTreeNode {
public String version_name = "";
public String version_description = "";
- public VersionSummary(SapforVersion_json version_json) {
+ public SapforVersionState state = SapforVersionState.Empty;
+ public VersionSummary(SapforVersion_json version_json, SapforVersionState state_in) {
setUserObject(version_json);
version_name = version_json.Home.getName();
version_description = version_json.description;
+ state = state_in;
}
@Override
public String getImageKey() {
- return "TestVersion";
+ return state.toString();
}
@Override
public String toString() {
- return version_name+ " : " +version_description;
+ return version_name + " : " + version_description;
}
}
diff --git a/src/TestingSystem/SAPFOR/SapforTasksPackageSupervisor/SapforTasksPackageSupervisor.java b/src/TestingSystem/SAPFOR/SapforTasksPackageSupervisor/SapforTasksPackageSupervisor.java
index beb51db5..a439a674 100644
--- a/src/TestingSystem/SAPFOR/SapforTasksPackageSupervisor/SapforTasksPackageSupervisor.java
+++ b/src/TestingSystem/SAPFOR/SapforTasksPackageSupervisor/SapforTasksPackageSupervisor.java
@@ -169,7 +169,9 @@ public class SapforTasksPackageSupervisor {
//Очистка
//очистка служебных файлов.
Utils.deleteFilesByExtensions(new File(sapforTasksPackage.workspace),
- "proj", "dep", "jar", "sh", "exe", "bat");
+ "proj", "dep", "jar"
+ // ,"sh", "exe", "bat"
+ );
}
public void Perform() throws Exception {
if (packageNeedsKill()) {
diff --git a/src/icons/versions/Empty.png b/src/icons/versions/Empty.png
new file mode 100644
index 00000000..cfbb7f31
Binary files /dev/null and b/src/icons/versions/Empty.png differ
diff --git a/src/icons/versions/HasErrors.png b/src/icons/versions/HasErrors.png
new file mode 100644
index 00000000..61747e72
Binary files /dev/null and b/src/icons/versions/HasErrors.png differ
diff --git a/src/icons/versions/TestVersion.png b/src/icons/versions/Normal.png
similarity index 100%
rename from src/icons/versions/TestVersion.png
rename to src/icons/versions/Normal.png