no message
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package _VisualDVM.TestingSystem.Common.Configuration;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Utils.TextLog;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Json.GroupsJson;
|
||||
import _VisualDVM.TestingSystem.Common.Settings.Json.SettingsArrayJson;
|
||||
@@ -25,6 +25,13 @@ public class Configuration extends riDBObject {
|
||||
public int autoTesting = 0;
|
||||
@Description("DEFAULT 1")
|
||||
public int kernels = 1; //ядра
|
||||
//--
|
||||
@Description("DEFAULT ''")
|
||||
public String packedGroupsJson = "";
|
||||
@Description("DEFAULT ''")
|
||||
public String packedTestsJson = "";
|
||||
@Description("DEFAULT ''")
|
||||
public String packedSettingsJson = "";
|
||||
//----
|
||||
public String printAuto() {
|
||||
return autoTesting > 0 ? "Да" : "Нет";
|
||||
@@ -36,13 +43,6 @@ public class Configuration extends riDBObject {
|
||||
return Utils_.getIcon("/Common/icons/" + (autoTesting == 1 ? "RedPick" : "NotPick") + ".png");
|
||||
}
|
||||
//--
|
||||
@Description("DEFAULT ''")
|
||||
public String packedGroupsJson = "";
|
||||
@Description("DEFAULT ''")
|
||||
public String packedTestsJson = "";
|
||||
@Description("DEFAULT ''")
|
||||
public String packedSettingsJson = "";
|
||||
//--
|
||||
public void saveGroupsAsJson(Vector<Group> groups) {
|
||||
packedGroupsJson = Utils_.gson.toJson(new GroupsJson(groups));
|
||||
}
|
||||
|
||||
@@ -8,9 +8,10 @@ public class ConfigurationJson implements Serializable {
|
||||
public int id;
|
||||
@Expose
|
||||
public String description;
|
||||
public ConfigurationJson(Configuration configuration){
|
||||
id=configuration.id;
|
||||
description= configuration.description;
|
||||
public ConfigurationJson(Configuration configuration) {
|
||||
id = configuration.id;
|
||||
description = configuration.description;
|
||||
}
|
||||
public ConfigurationJson() {
|
||||
}
|
||||
public ConfigurationJson(){}
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ import java.util.List;
|
||||
import java.util.Vector;
|
||||
public class ConfigurationsJson implements Serializable {
|
||||
@Expose
|
||||
public List<ConfigurationJson> array =new Vector<>();
|
||||
public ConfigurationsJson(){
|
||||
public List<ConfigurationJson> array = new Vector<>();
|
||||
public ConfigurationsJson() {
|
||||
}
|
||||
//при создании пакета.
|
||||
public ConfigurationsJson(Vector<? extends Configuration> configurations){
|
||||
array =new Vector<>();
|
||||
for (Configuration configuration:configurations)
|
||||
public ConfigurationsJson(Vector<? extends Configuration> configurations) {
|
||||
array = new Vector<>();
|
||||
for (Configuration configuration : configurations)
|
||||
array.add(new ConfigurationJson(configuration));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package _VisualDVM.TestingSystem.Common.Group;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.ProjectData.Files.ProjectFile;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
import _VisualDVM.TestingSystem.Common.Test.TestType;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -20,35 +19,11 @@ public class Group extends riDBObject {
|
||||
public TestType type = TestType.Default;
|
||||
@Description("DEFAULT 'fortran'")
|
||||
public LanguageName language = LanguageName.fortran;
|
||||
//--
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return (!GroupsDBTable.filterMyOnly || Global.mainModule.getAccount().email.equals(sender_address)) &&
|
||||
Global.testingServer.db.groups.applyFilters(this);
|
||||
}
|
||||
public String getSummary() {
|
||||
return description + " " + language.getDescription();
|
||||
}
|
||||
//-
|
||||
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
Group g = (Group) src;
|
||||
type = g.type;
|
||||
language = g.language;
|
||||
}
|
||||
public Group(Group group) {
|
||||
this.SynchronizeFields(group);
|
||||
}
|
||||
public Group() {
|
||||
}
|
||||
@Override
|
||||
public void select(boolean flag) {
|
||||
super.select(flag);
|
||||
if (UI_.isActive())
|
||||
UI.getMainWindow().ShowCheckedTestsCount();
|
||||
}
|
||||
//--
|
||||
//-
|
||||
public static void generateForLanguage(
|
||||
@@ -94,6 +69,29 @@ public class Group extends riDBObject {
|
||||
bodies.add(module_body);
|
||||
}
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return (!GroupsDBTable.filterMyOnly || Global.mainModule.getAccount().email.equals(sender_address)) &&
|
||||
Global.testingServer.db.groups.applyFilters(this);
|
||||
}
|
||||
public String getSummary() {
|
||||
return description + " " + language.getDescription();
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
Group g = (Group) src;
|
||||
type = g.type;
|
||||
language = g.language;
|
||||
}
|
||||
@Override
|
||||
public void select(boolean flag) {
|
||||
super.select(flag);
|
||||
if (UI_.isActive())
|
||||
UI.getMainWindow().ShowCheckedTestsCount();
|
||||
}
|
||||
public String GenerateMakefile(Test test, String dvm_drv, String flags_in) {
|
||||
//----->>
|
||||
LinkedHashMap<LanguageName, Vector<ProjectFile>> programs = test.getPrograms();
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package _VisualDVM.TestingSystem.Common.Group;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Tables.FKBehaviour;
|
||||
import Common.Database.Tables.FKCurrentObjectBehaviuor;
|
||||
import Common.Database.Tables.FKDataBehaviour;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DBObjectFilter;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.DataSetFilter;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.TestingSystem.Common.Group.UI.GroupFields;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
@@ -51,7 +51,6 @@ public class GroupsDBTable extends iDBTable<Group> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "группа тестов";
|
||||
@@ -138,10 +137,10 @@ public class GroupsDBTable extends iDBTable<Group> {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public Group getGroupByDescription(LanguageName language_in,String description_in) {
|
||||
public Group getGroupByDescription(LanguageName language_in, String description_in) {
|
||||
for (Group group : Data.values()) {
|
||||
if (group.sender_address.equals("vmk-post@yandex.ru")&&
|
||||
group.language.equals(language_in)&&group.description.equalsIgnoreCase(description_in))
|
||||
if (group.sender_address.equals("vmk-post@yandex.ru") &&
|
||||
group.language.equals(language_in) && group.description.equalsIgnoreCase(description_in))
|
||||
return group;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package _VisualDVM.TestingSystem.Common.Group;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.Common.Group.UI.AddGroupMenu;
|
||||
import _VisualDVM.TestingSystem.Common.Group.UI.EditGroupMenu;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
public class GroupsMenuBar extends DataMenuBar {
|
||||
@@ -13,7 +13,7 @@ public class GroupsMenuBar extends DataMenuBar {
|
||||
super("группы",
|
||||
PassCode.SynchronizeTests,
|
||||
PassCode.ConvertCorrectnessTests
|
||||
);
|
||||
);
|
||||
addMenus(new AddGroupMenu(), new EditGroupMenu());
|
||||
addPasses(PassCode.DeleteGroup);
|
||||
add(new JSeparator());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.Common.Group.UI;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenu;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenu;
|
||||
public class AddGroupMenu extends VisualiserMenu {
|
||||
public AddGroupMenu() {
|
||||
super("", "/icons/RedAdd.png");
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package _VisualDVM.TestingSystem.Common.Group.UI;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenu;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenu;
|
||||
public class EditGroupMenu extends VisualiserMenu {
|
||||
public EditGroupMenu() {
|
||||
super("", "/icons/Edit.png" );
|
||||
super("", "/icons/Edit.png");
|
||||
addPasses(PassCode.EditGroup, PassCode.ReplaceTestsFromFiles);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import Common.Database.Objects.DBObject;
|
||||
import Common.Mode;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.GlobalProperties;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalProperties;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||
import _VisualDVM.Utils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -6,13 +6,13 @@ import java.util.List;
|
||||
import java.util.Vector;
|
||||
public class SettingsArrayJson {
|
||||
@Expose
|
||||
public List<SettingsJson> array =new Vector<>();
|
||||
public SettingsArrayJson(){
|
||||
public List<SettingsJson> array = new Vector<>();
|
||||
public SettingsArrayJson() {
|
||||
}
|
||||
//при создании пакета.
|
||||
public SettingsArrayJson(Vector<? extends Settings> settings_in){
|
||||
array =new Vector<>();
|
||||
for (Settings settings: settings_in)
|
||||
public SettingsArrayJson(Vector<? extends Settings> settings_in) {
|
||||
array = new Vector<>();
|
||||
for (Settings settings : settings_in)
|
||||
array.add(new SettingsJson(settings));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,14 @@ import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.TextLog;
|
||||
//предопределенный набор настроек тестируемой системы. сохраняется для упрощения.
|
||||
public abstract class Settings extends riDBObject {
|
||||
public String flags="";
|
||||
public String flags = "";
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
Settings s = (Settings) src;
|
||||
flags=s.flags;
|
||||
flags = s.flags;
|
||||
}
|
||||
public boolean validate(TextLog Log) {
|
||||
return true;
|
||||
}
|
||||
public boolean validate(TextLog Log){return true;}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ public class TaskThread extends Thread {
|
||||
super(() -> {
|
||||
while (!task_.state.isComplete()) {
|
||||
task_.Reset();
|
||||
new PerformSapforTask().Do(task_,sapfor_drv);
|
||||
new PerformSapforTask().Do(task_, sapfor_drv);
|
||||
}
|
||||
});
|
||||
task = task_;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.Common;
|
||||
import Common.Visual.StatusEnum;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.StatusEnum;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Vector;
|
||||
@@ -29,8 +29,7 @@ public enum TasksPackageState implements StatusEnum {
|
||||
Done,
|
||||
Aborted,
|
||||
ConnectionError,
|
||||
DoneWithErrors
|
||||
;
|
||||
DoneWithErrors;
|
||||
public boolean isActive() {
|
||||
switch (this) {
|
||||
case Inactive:
|
||||
@@ -53,7 +52,6 @@ public enum TasksPackageState implements StatusEnum {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisualiserFonts getFont() {
|
||||
switch (this) {
|
||||
@@ -115,9 +113,7 @@ public enum TasksPackageState implements StatusEnum {
|
||||
return StatusEnum.super.getDescription();
|
||||
}
|
||||
}
|
||||
|
||||
public Vector<TasksPackageState> getHigherStates(){
|
||||
public Vector<TasksPackageState> getHigherStates() {
|
||||
return Arrays.stream(values()).filter(state -> state.ordinal() > this.ordinal()).collect(Collectors.toCollection(Vector::new));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,9 @@ import java.io.Serializable;
|
||||
public class TestJson implements Serializable {
|
||||
@Expose
|
||||
public int id;
|
||||
public TestJson(Test test){
|
||||
id=test.id;
|
||||
public TestJson(Test test) {
|
||||
id = test.id;
|
||||
}
|
||||
public TestJson() {
|
||||
}
|
||||
public TestJson(){}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.Passes.All.UnzipFolderPass;
|
||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||
import _VisualDVM.ProjectData.Files.FileState;
|
||||
import _VisualDVM.ProjectData.Files.FileType;
|
||||
import _VisualDVM.ProjectData.Files.ProjectFile;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.Repository.RepositoryRefuseException;
|
||||
import _VisualDVM.Passes.All.UnzipFolderPass;
|
||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -29,15 +29,6 @@ public class Test extends riDBObject {
|
||||
public String args = ""; //аргументы командной строки. на всякий случай поле зарезервирую. пусть будут.
|
||||
@Description("DEFAULT -1")
|
||||
public int group_id = CommonConstants.Nan;
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
Test t = (Test) src;
|
||||
min_dim = t.min_dim;
|
||||
max_dim = t.max_dim;
|
||||
args = t.args;
|
||||
group_id = t.group_id;
|
||||
}
|
||||
@Description("DEFAULT ''")
|
||||
public String files = ""; //файлы теста
|
||||
//--------------------------------------------->>>
|
||||
@@ -52,6 +43,15 @@ public class Test extends riDBObject {
|
||||
public Test() {
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
Test t = (Test) src;
|
||||
min_dim = t.min_dim;
|
||||
max_dim = t.max_dim;
|
||||
args = t.args;
|
||||
group_id = t.group_id;
|
||||
}
|
||||
@Override
|
||||
public void select(boolean flag) {
|
||||
super.select(flag);
|
||||
if (UI_.isActive())
|
||||
@@ -60,7 +60,7 @@ public class Test extends riDBObject {
|
||||
//---
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Group,group_id);
|
||||
return Global.mainModule.matchCurrentID(Current.Group, group_id);
|
||||
}
|
||||
//-
|
||||
public File getArchive() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
import _VisualDVM.TestingSystem.Common.Test.UI.TestFields;
|
||||
@@ -106,8 +106,8 @@ public class TestDBTable extends iDBTable<Test> {
|
||||
}
|
||||
public Test getTestByDescription(int group_id_in, String description_in) {
|
||||
for (Test test : Data.values()) {
|
||||
if (test.sender_address.equals("vmk-post@yandex.ru")&&
|
||||
(test.group_id==group_id_in)&&(test.description.equalsIgnoreCase(description_in)))
|
||||
if (test.sender_address.equals("vmk-post@yandex.ru") &&
|
||||
(test.group_id == group_id_in) && (test.description.equalsIgnoreCase(description_in)))
|
||||
return test;
|
||||
}
|
||||
return null;
|
||||
@@ -122,6 +122,6 @@ public class TestDBTable extends iDBTable<Test> {
|
||||
if (test.isSelected()) selectedTests.add(test);
|
||||
}
|
||||
}
|
||||
return selectedTests.isEmpty()?allTests:selectedTests;
|
||||
return selectedTests.isEmpty() ? allTests : selectedTests;
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,8 @@ public enum TestType {
|
||||
Performance,
|
||||
SAPFOR,
|
||||
;
|
||||
public String getDescription(){
|
||||
switch (this){
|
||||
public String getDescription() {
|
||||
switch (this) {
|
||||
case Correctness:
|
||||
return "Корректность";
|
||||
case Performance:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.Common.Test.UI.AddTestMenu;
|
||||
import _VisualDVM.TestingSystem.Common.Test.UI.EditTestMenu;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
public class TestsMenuBar extends DataMenuBar {
|
||||
public TestsMenuBar() {
|
||||
super("тесты");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test.UI;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenu;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenu;
|
||||
public class AddTestMenu extends VisualiserMenu {
|
||||
public AddTestMenu() {
|
||||
super("Добавление теста", "/icons/RedAdd.png", false);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test.UI;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenu;
|
||||
public class EditTestMenu extends VisualiserMenu {
|
||||
public EditTestMenu() {
|
||||
super("Редактирование теста", "/icons/Edit.png", false);
|
||||
add( Global.mainModule.getPass(PassCode.EditTest).createMenuItem());
|
||||
add( Global.mainModule.getPass(PassCode.ReplaceTestProject).createMenuItem());
|
||||
add(Global.mainModule.getPass(PassCode.EditTest).createMenuItem());
|
||||
add(Global.mainModule.getPass(PassCode.ReplaceTestProject).createMenuItem());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,13 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class TestFields implements DialogFields {
|
||||
public JTextField tfName;
|
||||
private JPanel content;
|
||||
public JSpinner sMinDim;
|
||||
public JSpinner sMaxDim;
|
||||
private JPanel content;
|
||||
public TestFields() {
|
||||
sMinDim.setModel(new SpinnerNumberModel(1, 0, 16, 1));
|
||||
sMaxDim.setModel(new SpinnerNumberModel(1, 0, 16, 1));
|
||||
}
|
||||
@Override
|
||||
public Component getContent() {
|
||||
return content;
|
||||
@@ -17,8 +21,4 @@ public class TestFields implements DialogFields {
|
||||
// TODO: place custom component creation code here
|
||||
tfName = new StyledTextField();
|
||||
}
|
||||
public TestFields(){
|
||||
sMinDim.setModel(new SpinnerNumberModel(1, 0, 16,1));
|
||||
sMaxDim.setModel(new SpinnerNumberModel(1, 0, 16,1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
package _VisualDVM.TestingSystem.Common;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Visual.Menus.VisualiserMenuBar;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class TestingBar extends VisualiserMenuBar {
|
||||
// public JLabel KernelsLabel;
|
||||
// public JLabel KernelsLabel;
|
||||
public JButton autorefreshButton;
|
||||
JSpinner sCheckTime;
|
||||
// JSpinner sKernels;
|
||||
// JSpinner sKernels;
|
||||
JLabel serverAdminLabel;
|
||||
public TestingBar() {
|
||||
//-
|
||||
// KernelsLabel = addLabel("", "/icons/Kernels.png");
|
||||
// KernelsLabel.setHorizontalTextPosition(JLabel.LEFT);
|
||||
// KernelsLabel.setToolTipText("количество ядер, задействованное при тестировании");
|
||||
// KernelsLabel = addLabel("", "/icons/Kernels.png");
|
||||
// KernelsLabel.setHorizontalTextPosition(JLabel.LEFT);
|
||||
// KernelsLabel.setToolTipText("количество ядер, задействованное при тестировании");
|
||||
/*
|
||||
add(sKernels = new JSpinner());
|
||||
sKernels.setPreferredSize(new Dimension(60, 26));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package _VisualDVM.TestingSystem.Common.TestingPackage;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.TestingSystem.Common.Configuration.Configuration;
|
||||
import _VisualDVM.TestingSystem.Common.Configuration.Json.ConfigurationsJson;
|
||||
import _VisualDVM.TestingSystem.Common.TasksPackageState;
|
||||
@@ -28,6 +28,14 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
public TasksPackageState state = TasksPackageState.Draft;
|
||||
@Description("DEFAULT ''")
|
||||
public String packedConfigurationsJson = "";
|
||||
//json где хранятся задачи----------------------------------
|
||||
@Description("IGNORE")
|
||||
public J package_json = null;
|
||||
public TestingPackage(TestingPackage p) {
|
||||
SynchronizeFields(p);
|
||||
}
|
||||
public TestingPackage() {
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
@@ -46,12 +54,7 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
connectionErrosCount = tp.connectionErrosCount;
|
||||
state = tp.state;
|
||||
//--
|
||||
packedConfigurationsJson= tp.packedConfigurationsJson;
|
||||
}
|
||||
public TestingPackage(TestingPackage p) {
|
||||
SynchronizeFields(p);
|
||||
}
|
||||
public TestingPackage() {
|
||||
packedConfigurationsJson = tp.packedConfigurationsJson;
|
||||
}
|
||||
public File getLocalWorkspace() {
|
||||
return new File(getHomeDirectory(), String.valueOf(id));
|
||||
@@ -59,9 +62,6 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
public boolean isLoaded() {
|
||||
return new File(getLocalWorkspace(), Constants.LOADED).exists();
|
||||
}
|
||||
//json где хранятся задачи----------------------------------
|
||||
@Description("IGNORE")
|
||||
public J package_json = null;
|
||||
public abstract Class getJsonClass();
|
||||
public abstract File getHomeDirectory();
|
||||
public File getJsonFile() {
|
||||
@@ -84,7 +84,6 @@ public abstract class TestingPackage<J> extends riDBObject {
|
||||
packedConfigurationsJson = Utils_.gson.toJson(new ConfigurationsJson(configurations));
|
||||
}
|
||||
//определить завершен пакет с ошибками или нет.
|
||||
public void checkFinishState() throws Exception{
|
||||
|
||||
public void checkFinishState() throws Exception {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package _VisualDVM.TestingSystem.Common;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Loggable;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Repository.EmailMessage;
|
||||
import _VisualDVM.Repository.RepositoryClient;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
import _VisualDVM.TestingSystem.Common.TestingPackage.TestingPackage;
|
||||
import _VisualDVM.TestingSystem.Common.TestingPackageToKill.TestingPackageToKill;
|
||||
import _VisualDVM.Repository.RepositoryClient;
|
||||
import Common.Utils.Loggable;
|
||||
import _VisualDVM.Utils;
|
||||
import javafx.util.Pair;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -26,6 +26,49 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
protected File supervisorHome = null;
|
||||
protected Machine machine = null;
|
||||
protected User user = null;
|
||||
//---
|
||||
public TestingPlanner() {
|
||||
}
|
||||
public TestingPlanner(String... args) {
|
||||
//---
|
||||
String machineAddress = args[0];
|
||||
int machinePort = Integer.parseInt(args[1]);
|
||||
String userName = args[2];
|
||||
String userPassword = args[3];
|
||||
String userWorkspace = args[4];
|
||||
String testingSystemRoot = args[5];
|
||||
serverName = args[6];
|
||||
supervisorHome = Utils_.getHomeDirectory(); //при инициализации это текущая папка.
|
||||
//---
|
||||
Utils_.MainLog = new Loggable() {
|
||||
@Override
|
||||
public String getLogHomePath() {
|
||||
return supervisorHome.getAbsolutePath();
|
||||
}
|
||||
@Override
|
||||
public String getLogName() {
|
||||
return Global.mode.toString();
|
||||
}
|
||||
};
|
||||
Utils_.MainLog.ClearLog();
|
||||
//--
|
||||
Utils_.setHomePath(testingSystemRoot);
|
||||
Global.CheckTestingSystemDirectories();
|
||||
//---
|
||||
machine = new Machine(machineAddress, machineAddress, machinePort, MachineType.Server);
|
||||
user = new User(userName, userPassword, userWorkspace);
|
||||
//---
|
||||
Print("machineAddress=" + Utils_.Brackets(machineAddress));
|
||||
Print("machinePort=" + Utils_.Brackets(String.valueOf(machinePort)));
|
||||
Print("userName=" + Utils_.Brackets(userName));
|
||||
Print("userPassword=" + Utils_.Brackets(userPassword));
|
||||
Print("userWorkspace=" + Utils_.Brackets(userWorkspace));
|
||||
Print("root=" + Utils_.Brackets(Utils_.getHomePath()));
|
||||
Print("serverName=" + serverName);
|
||||
Print("=====");
|
||||
//----
|
||||
Utils.createEmptyFile(Constants.STARTED);
|
||||
}
|
||||
//----
|
||||
protected void UpdatePackageState(TasksPackageState state_in) throws Exception {
|
||||
testingPackage.state = state_in;
|
||||
@@ -62,8 +105,8 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
void EmailPackage() throws Exception {
|
||||
if (testingPackage.needsEmail == 1) {
|
||||
EmailMessage message = new EmailMessage();
|
||||
message.subject = "Состояние пакета тестирования "+packageDescription()+ " "+
|
||||
Utils_.Brackets(testingPackage.id) + " изменилось на " + Utils_.Brackets(testingPackage.state.getDescription());
|
||||
message.subject = "Состояние пакета тестирования " + packageDescription() + " " +
|
||||
Utils_.Brackets(testingPackage.id) + " изменилось на " + Utils_.Brackets(testingPackage.state.getDescription());
|
||||
message.text = testingPackage.description;
|
||||
message.targets.add(testingPackage.sender_address);
|
||||
ServerCommand(ServerCode.Email, message);
|
||||
@@ -76,10 +119,11 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
protected void InitSessionCredentials() {
|
||||
}
|
||||
protected abstract void TestsSynchronize() throws Exception;
|
||||
;
|
||||
protected abstract void PackageWorkspaceCreation() throws Exception;
|
||||
protected void AnalyseResults() throws Exception {
|
||||
UpdatePackageState(TasksPackageState.Done);
|
||||
};
|
||||
}
|
||||
protected abstract void PackageStart() throws Exception;
|
||||
protected abstract boolean CheckNextState() throws Exception;
|
||||
protected abstract void DownloadResults() throws Exception;
|
||||
@@ -116,7 +160,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
ServerCommand(ServerCode.DeleteObjectByPK, new Pair(TestingPackageToKill.class, ptk_id));
|
||||
} else {
|
||||
//--
|
||||
System.out.println(testingPackage.id+":"+testingPackage.state.getDescription());
|
||||
System.out.println(testingPackage.id + ":" + testingPackage.state.getDescription());
|
||||
switch (testingPackage.state) {
|
||||
case TestsSynchronize:
|
||||
TestsSynchronize();
|
||||
@@ -184,48 +228,6 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
public String getPlanner() {
|
||||
return String.join("/", user.workspace, "modules", "planner");
|
||||
}
|
||||
//---
|
||||
public TestingPlanner(){}
|
||||
public TestingPlanner(String... args) {
|
||||
//---
|
||||
String machineAddress = args[0];
|
||||
int machinePort = Integer.parseInt(args[1]);
|
||||
String userName = args[2];
|
||||
String userPassword = args[3];
|
||||
String userWorkspace = args[4];
|
||||
String testingSystemRoot = args[5];
|
||||
serverName = args[6];
|
||||
supervisorHome = Utils_.getHomeDirectory(); //при инициализации это текущая папка.
|
||||
//---
|
||||
Utils_.MainLog = new Loggable() {
|
||||
@Override
|
||||
public String getLogHomePath() {
|
||||
return supervisorHome.getAbsolutePath();
|
||||
}
|
||||
@Override
|
||||
public String getLogName() {
|
||||
return Global.mode.toString();
|
||||
}
|
||||
};
|
||||
Utils_.MainLog.ClearLog();
|
||||
//--
|
||||
Utils_.setHomePath(testingSystemRoot);
|
||||
Global.CheckTestingSystemDirectories();
|
||||
//---
|
||||
machine = new Machine(machineAddress, machineAddress, machinePort, MachineType.Server);
|
||||
user = new User(userName, userPassword, userWorkspace);
|
||||
//---
|
||||
Print("machineAddress=" + Utils_.Brackets(machineAddress));
|
||||
Print("machinePort=" + Utils_.Brackets(String.valueOf(machinePort)));
|
||||
Print("userName=" + Utils_.Brackets(userName));
|
||||
Print("userPassword=" + Utils_.Brackets(userPassword));
|
||||
Print("userWorkspace=" + Utils_.Brackets(userWorkspace));
|
||||
Print("root=" + Utils_.Brackets(Utils_.getHomePath()));
|
||||
Print("serverName=" + serverName);
|
||||
Print("=====");
|
||||
//----
|
||||
Utils.createEmptyFile(Constants.STARTED);
|
||||
}
|
||||
/*
|
||||
void CheckLocal() {
|
||||
local = false;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package _VisualDVM.TestingSystem.Common;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.TextLog;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.TextLog;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.Account.Account;
|
||||
import _VisualDVM.Passes.All.DownloadRepository;
|
||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.Repository.Component.Sapfor.Sapfor;
|
||||
import _VisualDVM.Repository.EmailMessage;
|
||||
@@ -31,9 +33,7 @@ import _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand.SapforSettingsComma
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforTestingPlanner;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapforState;
|
||||
import _VisualDVM.Passes.All.DownloadRepository;
|
||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Utils;
|
||||
import javafx.util.Pair;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -45,8 +45,39 @@ import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
public String name = "?";
|
||||
public static MachineProcessSet machinesProcesses = new MachineProcessSet();
|
||||
//------>>>
|
||||
public static Timer checkTimer = null;
|
||||
public String name = "?";
|
||||
DVMTestingChecker dvmTestingChecker = new DVMTestingChecker();
|
||||
SapforTestingPlanner sapforTestingPlanner = new SapforTestingPlanner();
|
||||
//--
|
||||
protected Thread testingThread = new Thread(() -> {
|
||||
while (true) {
|
||||
dvmTestingChecker.Perform();
|
||||
sapforTestingPlanner.Perform();
|
||||
Utils_.sleep(5000);
|
||||
}
|
||||
});
|
||||
public TestingServer() {
|
||||
super(TestsDatabase.class);
|
||||
name = Utils_.getDateName("testingServer");
|
||||
System.out.println("ServerName=" + Utils_.Brackets(name));
|
||||
}
|
||||
public static void TimerOn() {
|
||||
checkTimer = new Timer(Global.properties.CheckTestingIntervalSeconds * 1000, e -> {
|
||||
Global.mainModule.getPass(PassCode.ActualizePackages).Do();
|
||||
});
|
||||
checkTimer.start();
|
||||
}
|
||||
public static void TimerOff() {
|
||||
if (checkTimer != null)
|
||||
checkTimer.stop();
|
||||
}
|
||||
public static void ResetTimer() {
|
||||
TimerOff();
|
||||
TimerOn();
|
||||
}
|
||||
@Override
|
||||
public void afterPublishAction(DBObject object) throws Exception {
|
||||
if (object instanceof Test) {
|
||||
@@ -94,7 +125,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
((ServerSapfor) object).home_path
|
||||
)
|
||||
);
|
||||
} else if (object instanceof DVMPackage) {
|
||||
} else if (object instanceof DVMPackage) {
|
||||
DVMPackage dvmPackage = (DVMPackage) object;
|
||||
File workspace = dvmPackage.getLocalWorkspace();
|
||||
Utils_.forceDeleteWithCheck(workspace);
|
||||
@@ -106,7 +137,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
SapforSettings sapforSettings = (SapforSettings) object;
|
||||
Vector<SapforSettingsCommand> commands = new Vector<>();
|
||||
for (SapforSettingsCommand command : db.sapforSettingsCommands.Data.values()) {
|
||||
if (command.sapforsettings_id== sapforSettings.id)
|
||||
if (command.sapforsettings_id == sapforSettings.id)
|
||||
commands.add(command);
|
||||
}
|
||||
for (SapforSettingsCommand command : commands) {
|
||||
@@ -124,11 +155,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
throw new RepositoryRefuseException("Актуальная версия SAPFOR " + max_installed_version + " уже установлена");
|
||||
}
|
||||
}
|
||||
public TestingServer() {
|
||||
super(TestsDatabase.class);
|
||||
name = Utils_.getDateName("testingServer");
|
||||
System.out.println("ServerName=" + Utils_.Brackets(name));
|
||||
}
|
||||
//основа
|
||||
@Override
|
||||
public int getPort() {
|
||||
@@ -139,32 +165,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
protected void startAdditionalThreads() {
|
||||
testingThread.start();
|
||||
}
|
||||
DVMTestingChecker dvmTestingChecker = new DVMTestingChecker();
|
||||
SapforTestingPlanner sapforTestingPlanner = new SapforTestingPlanner();
|
||||
//--
|
||||
protected Thread testingThread = new Thread(() -> {
|
||||
while (true) {
|
||||
dvmTestingChecker.Perform();
|
||||
sapforTestingPlanner.Perform();
|
||||
Utils_.sleep(5000);
|
||||
}
|
||||
});
|
||||
//------>>>
|
||||
public static Timer checkTimer = null;
|
||||
public static void TimerOn() {
|
||||
checkTimer = new Timer(Global.properties.CheckTestingIntervalSeconds * 1000, e -> {
|
||||
Global.mainModule.getPass(PassCode.ActualizePackages).Do();
|
||||
});
|
||||
checkTimer.start();
|
||||
}
|
||||
public static void TimerOff() {
|
||||
if (checkTimer != null)
|
||||
checkTimer.stop();
|
||||
}
|
||||
public static void ResetTimer() {
|
||||
TimerOff();
|
||||
TimerOn();
|
||||
}
|
||||
@Override
|
||||
protected void Session() throws Exception {
|
||||
Test test;
|
||||
@@ -178,7 +178,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
EmailMessage message = Log.isEmpty() ?
|
||||
new EmailMessage(
|
||||
"Запущено автоматическое тестирование версии " + request.arg + " системы SAPFOR",
|
||||
"Пакет "+ Utils_.Brackets(autoPackage.id), new Vector<>()) :
|
||||
"Пакет " + Utils_.Brackets(autoPackage.id), new Vector<>()) :
|
||||
new EmailMessage(
|
||||
"Не удалось запустить автоматическое тестирование версии " + request.arg + " системы SAPFOR",
|
||||
Log.toString(),
|
||||
@@ -296,7 +296,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
&& !pathname.getName().equals("settings")
|
||||
&& !pathname.getName().equals("test-analyzer.sh")
|
||||
&& Utils_.getExtension(pathname).startsWith(languageName.getDVMCompile()));
|
||||
;
|
||||
if (files != null) {
|
||||
groupFiles = new Vector<>(Arrays.asList(files));
|
||||
groupFiles.sort(Comparator.comparing(File::getName));
|
||||
@@ -488,7 +487,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
File json = dvmPackage.getJsonFile();
|
||||
if (!json.exists())
|
||||
throw new RepositoryRefuseException("Не найден JSON файл для пакета задач DVM " + Utils_.Brackets(package_id));
|
||||
jsons.add((DVMPackage_json) Utils_.jsonFromFile(json, DVMPackage_json.class));
|
||||
jsons.add(Utils_.jsonFromFile(json, DVMPackage_json.class));
|
||||
}
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = jsons;
|
||||
@@ -503,7 +502,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
File json = sapforPackage.getJsonFile();
|
||||
if (!json.exists())
|
||||
throw new RepositoryRefuseException("Не найден JSON файл для пакета задач SAPFOR " + Utils_.Brackets(package_id));
|
||||
jsons.add((SapforPackage_json) Utils_.jsonFromFile(json, SapforPackage_json.class));
|
||||
jsons.add(Utils_.jsonFromFile(json, SapforPackage_json.class));
|
||||
}
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = jsons;
|
||||
@@ -614,8 +613,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
account.email = Constants.MailAddress;
|
||||
//-
|
||||
int sapforId = Integer.parseInt(request.arg);
|
||||
System.out.println("Sapfor_id = "+request.arg);
|
||||
|
||||
System.out.println("Sapfor_id = " + request.arg);
|
||||
if (!db.serverSapfors.containsKey(sapforId)) {
|
||||
Log.Writeln_("Версия SAPFOR " + sapforId + " не существует.");
|
||||
return null;
|
||||
@@ -646,6 +644,5 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//--
|
||||
return target;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package _VisualDVM.TestingSystem.Common;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.SQLITE.SQLiteDatabase;
|
||||
import Common.Utils.TextLog;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import Common.Database.SQLITE.SQLiteDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.TextLog;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.Account.Account;
|
||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.Component.Sapfor.Sapfor;
|
||||
import _VisualDVM.Repository.RepositoryRefuseException;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
@@ -27,8 +28,7 @@ import _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand.SapforSettingsComma
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapforState;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.ServerSapfor.ServerSapforsDBTable;
|
||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Utils;
|
||||
import javafx.util.Pair;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class TestsDatabase extends SQLiteDatabase {
|
||||
addTable(serverSapfors = new ServerSapforsDBTable());
|
||||
addTable(sapforSettings = new SapforSettingsDBTable());
|
||||
addTable(sapforSettingsCommands = new SapforSettingsCommandsDBTable());
|
||||
addTable(dvmSettings=new DVMSettingsDBTable());
|
||||
addTable(dvmSettings = new DVMSettingsDBTable());
|
||||
}
|
||||
@Override
|
||||
public PassCode getSynchronizePassCode() {
|
||||
@@ -286,7 +286,6 @@ public class TestsDatabase extends SQLiteDatabase {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
public Integer getInstalledSapforMaxVersion() {
|
||||
int max_version = CommonConstants.Nan;
|
||||
@@ -315,16 +314,14 @@ public class TestsDatabase extends SQLiteDatabase {
|
||||
tests.CheckAll(false);
|
||||
dvm_configurations.CheckAll(false);
|
||||
}
|
||||
|
||||
public void CheckTestsPackagesDependencies(Vector<Integer> testsIds, TextLog Log){
|
||||
public void CheckTestsPackagesDependencies(Vector<Integer> testsIds, TextLog Log) {
|
||||
//определить есть ли активные пакеты в которые входят упомянутые тесты
|
||||
//если есть выписать группа/тест причина - находится в активном пакете
|
||||
}
|
||||
|
||||
public void RefreshTestNameInConfigurations(Integer testId){
|
||||
public void RefreshTestNameInConfigurations(Integer testId) {
|
||||
//обновить имя теста во всех конфигурация
|
||||
}
|
||||
public void DeleteTestFromConfigurations(Integer testId){
|
||||
public void DeleteTestFromConfigurations(Integer testId) {
|
||||
//обновить имя теста во всех конфигурация
|
||||
}
|
||||
//todo возможно рассмотреть вариант с синхроннизацией тестов для пакетов через команду серверу а не в нити
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.Common.ThreadsPlanner;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Utils.InterruptThread;
|
||||
import Common.Utils.Utils_;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
@@ -36,7 +36,7 @@ public abstract class ThreadsPlanner {
|
||||
kernels = maxKernels;
|
||||
}
|
||||
public String printThread(Integer id) {
|
||||
return "thread id = "+id;
|
||||
return "thread id = " + id;
|
||||
}
|
||||
public String getThreadsSummary() {
|
||||
Vector<String> lines = new Vector<>();
|
||||
@@ -83,13 +83,12 @@ public abstract class ThreadsPlanner {
|
||||
}
|
||||
activeThreads.removeAll(toExclude);
|
||||
//--
|
||||
double progress = ((double)done_threads/threads.size())*100.0;
|
||||
Utils_.MainLog.Print("done_threads="+done_threads+";all_threads="+threads.size()+";progress="+progress);
|
||||
double progress = ((double) done_threads / threads.size()) * 100.0;
|
||||
Utils_.MainLog.Print("done_threads=" + done_threads + ";all_threads=" + threads.size() + ";progress=" + progress);
|
||||
File progress_file = new File("progress");
|
||||
try {
|
||||
FileUtils.writeStringToFile(progress_file, String.valueOf(((int)progress)));
|
||||
}
|
||||
catch (Exception exception){
|
||||
FileUtils.writeStringToFile(progress_file, String.valueOf(((int) progress)));
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user