промежутоный. все же, вывел число ядер в конфигурации. иначе автоматическое тестирование обзаведется лишней настройкой.

This commit is contained in:
2024-09-20 01:52:39 +03:00
parent ae379ea196
commit 12c4eaf33d
19 changed files with 176 additions and 61 deletions

18
.idea/workspace.xml generated
View File

@@ -7,9 +7,25 @@
</component> </component>
<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 afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloneCurrentDVMConfiguration.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/CloneConfiguration.java" afterDir="false" />
<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/UI/Tables/ConfigurationAutoSwitcher.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Tables/ConfigurationAutoSwitcher.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Configuration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Configuration.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMConfiguration/DVMConfigurationDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMConfiguration/DVMConfigurationDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMConfiguration/UI/ConfigurationFields.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMConfiguration/UI/ConfigurationFields.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMConfiguration/UI/ConfigurationFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMConfiguration/UI/ConfigurationFields.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/SapforConfigurationDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/SapforConfigurationDBTable.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/SapforConfigurationDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/SapforConfigurationDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationFields.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationFields.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationFields.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforPackage/SapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforPackage/SapforPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloneDVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloneDVMPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloneSapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloneSapforPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedDVMConfigurations.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedDVMConfigurations.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedSAPFORConfigurations.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedSAPFORConfigurations.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" />
</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

@@ -34,7 +34,7 @@
"InstructionPath": "", "InstructionPath": "",
"PerformanceAnalyzerPath": "", "PerformanceAnalyzerPath": "",
"ComponentsBackUpsCount": 10, "ComponentsBackUpsCount": 10,
"TestingKernels": 28, "TestingKernels": 64,
"AutoCheckTesting": true, "AutoCheckTesting": true,
"CheckTestingIntervalSeconds": 10, "CheckTestingIntervalSeconds": 10,
"EmailOnTestingProgress": false, "EmailOnTestingProgress": false,

View File

@@ -20,6 +20,10 @@ public class Configuration extends riDBObject {
public int maxtime = 300; public int maxtime = 300;
@Description("DEFAULT 0") @Description("DEFAULT 0")
public int autoTesting = 0; public int autoTesting = 0;
@Description("DEFAULT 1")
public int kernels = 1; //ядра
//----
public String printAuto() { public String printAuto() {
return autoTesting > 0 ? "Да" : "Нет"; return autoTesting > 0 ? "Да" : "Нет";
} }
@@ -56,6 +60,7 @@ public class Configuration extends riDBObject {
//-- //--
maxtime = c.maxtime; maxtime = c.maxtime;
autoTesting = c.autoTesting; autoTesting = c.autoTesting;
kernels = c.kernels;
//- //-
packedGroupsJson = c.packedGroupsJson; packedGroupsJson = c.packedGroupsJson;
packedTestsJson = c.packedTestsJson; packedTestsJson = c.packedTestsJson;

View File

@@ -11,16 +11,17 @@ import Visual_DVM_2021.Passes.PassCode_2021;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
public class TestingBar extends VisualiserMenuBar { public class TestingBar extends VisualiserMenuBar {
public JLabel KernelsLabel; // public JLabel KernelsLabel;
public JButton autorefreshButton; public JButton autorefreshButton;
JSpinner sCheckTime; JSpinner sCheckTime;
JSpinner sKernels; // JSpinner sKernels;
JLabel serverAdminLabel; JLabel serverAdminLabel;
public TestingBar() { public TestingBar() {
//- //-
KernelsLabel = addLabel("", "/icons/Kernels.png"); // KernelsLabel = addLabel("", "/icons/Kernels.png");
KernelsLabel.setHorizontalTextPosition(JLabel.LEFT); // KernelsLabel.setHorizontalTextPosition(JLabel.LEFT);
KernelsLabel.setToolTipText("количество ядер, задействованное при тестировании"); // KernelsLabel.setToolTipText("количество ядер, задействованное при тестировании");
/*
add(sKernels = new JSpinner()); add(sKernels = new JSpinner());
sKernels.setPreferredSize(new Dimension(60, 26)); sKernels.setPreferredSize(new Dimension(60, 26));
sKernels.setMaximumSize(new Dimension(60, 26)); sKernels.setMaximumSize(new Dimension(60, 26));
@@ -31,6 +32,7 @@ public class TestingBar extends VisualiserMenuBar {
UI.MakeSpinnerRapid(sKernels, e -> { UI.MakeSpinnerRapid(sKernels, e -> {
Global.properties.updateField("TestingKernels", sKernels.getValue()); Global.properties.updateField("TestingKernels", sKernels.getValue());
}); });
*/
addLabel(" "); addLabel(" ");
//-- //--
add(new MenuBarButton() { add(new MenuBarButton() {

View File

@@ -39,10 +39,10 @@ public class DVMConfigurationDBTable extends iDBTable<DVMConfiguration> {
} }
@Override @Override
protected void AdditionalInitColumns() { protected void AdditionalInitColumns() {
columns.get(4).setMaxWidth(300); columns.get(5).setMaxWidth(300);
columns.get(6).setRenderer(TableRenderers.RendererMultiline);
columns.get(7).setRenderer(TableRenderers.RendererMultiline); columns.get(7).setRenderer(TableRenderers.RendererMultiline);
columns.get(14).setRenderer(TableRenderers.RendererMultiline); columns.get(8).setRenderer(TableRenderers.RendererMultiline);
columns.get(15).setRenderer(TableRenderers.RendererMultiline);
} }
}; };
} }
@@ -51,6 +51,7 @@ public class DVMConfigurationDBTable extends iDBTable<DVMConfiguration> {
return new String[]{ return new String[]{
"имя", "имя",
"автор", "автор",
"ядра",
"группы", "группы",
"тестов", "тестов",
"флаги", "флаги",
@@ -73,28 +74,32 @@ public class DVMConfigurationDBTable extends iDBTable<DVMConfiguration> {
case 3: case 3:
return object.sender_name; return object.sender_name;
case 4: case 4:
return cache.getGroupsDescriptions(); return object.kernels;
case 5: case 5:
return cache.getGroupsDescriptions();
case 6:
return cache.getTestsCount(); return cache.getTestsCount();
//todo упростить. и флаги и окружение будут просто одной строкой. мульти не актуально. //todo упростить. и флаги и окружение будут просто одной строкой. мульти не актуально.
case 6:
return Utils.unpackStrings(object.flags, true);
case 7: case 7:
return Utils.unpackStrings(object.flags, true);
case 8:
return Utils.unpackStrings(object.environments, true); return Utils.unpackStrings(object.environments, true);
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
case 8:
return object.c_maxtime;
case 9: case 9:
return object.cube; return object.c_maxtime;
case 10: case 10:
return object.max_proc_count; return object.cube;
case 11: case 11:
return object.min_dim_proc_count; return object.max_proc_count;
case 12: case 12:
return object.max_dim_proc_count; return object.min_dim_proc_count;
case 13: case 13:
return object.maxtime; return object.max_dim_proc_count;
case 14: case 14:
return object.maxtime;
case 15:
return Utils.unpackStrings(object.usr_par, true); return Utils.unpackStrings(object.usr_par, true);
default: default:
return null; return null;
@@ -138,6 +143,7 @@ public class DVMConfigurationDBTable extends iDBTable<DVMConfiguration> {
fields.sRunMaxtime.setValue(Result.maxtime); fields.sRunMaxtime.setValue(Result.maxtime);
//- //-
fields.sMaxProc.setValue(Result.max_proc_count); fields.sMaxProc.setValue(Result.max_proc_count);
fields.sKernels.setValue(Result.kernels);
} }
@Override @Override
public void ProcessResult() { public void ProcessResult() {
@@ -151,6 +157,7 @@ public class DVMConfigurationDBTable extends iDBTable<DVMConfiguration> {
Result.flags = ((VisualiserStringList) (fields.flagsList)).pack(); Result.flags = ((VisualiserStringList) (fields.flagsList)).pack();
Result.environments = ((VisualiserStringList) (fields.environmentsList)).pack(); Result.environments = ((VisualiserStringList) (fields.environmentsList)).pack();
Result.usr_par = ((VisualiserStringList) (fields.parList)).pack(); Result.usr_par = ((VisualiserStringList) (fields.parList)).pack();
Result.kernels= (int)fields.sKernels.getValue();
} }
@Override @Override
public void SetReadonly() { public void SetReadonly() {

View File

@@ -20,7 +20,7 @@
</properties> </properties>
<border type="none"/> <border type="none"/>
<children> <children>
<grid id="ee2fd" layout-manager="GridLayoutManager" row-count="8" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="ee2fd" layout-manager="GridLayoutManager" row-count="9" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/> <margin top="0" left="0" bottom="0" right="0"/>
<constraints> <constraints>
<splitpane position="left"/> <splitpane position="left"/>
@@ -39,7 +39,7 @@
</component> </component>
<vspacer id="264c1"> <vspacer id="264c1">
<constraints> <constraints>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/> <grid row="8" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints> </constraints>
</vspacer> </vspacer>
<component id="6795f" class="javax.swing.JTextField" binding="tfName" custom-create="true"> <component id="6795f" class="javax.swing.JTextField" binding="tfName" custom-create="true">
@@ -54,7 +54,7 @@
</component> </component>
<component id="9219f" class="javax.swing.JSpinner" binding="sMinDimProc"> <component id="9219f" class="javax.swing.JSpinner" binding="sMinDimProc">
<constraints> <constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/> <minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/> <preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/> <maximum-size width="100" height="30"/>
@@ -64,7 +64,7 @@
</component> </component>
<component id="5686a" class="javax.swing.JLabel"> <component id="5686a" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/> <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<font name="Times New Roman" size="16" style="2"/> <font name="Times New Roman" size="16" style="2"/>
@@ -73,7 +73,7 @@
</component> </component>
<component id="79cbe" class="javax.swing.JLabel"> <component id="79cbe" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/> <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<font name="Times New Roman" size="16" style="2"/> <font name="Times New Roman" size="16" style="2"/>
@@ -82,7 +82,7 @@
</component> </component>
<component id="33803" class="javax.swing.JSpinner" binding="sMaxDimProc"> <component id="33803" class="javax.swing.JSpinner" binding="sMaxDimProc">
<constraints> <constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/> <minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/> <preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/> <maximum-size width="100" height="30"/>
@@ -92,7 +92,7 @@
</component> </component>
<component id="9b066" class="javax.swing.JLabel"> <component id="9b066" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/> <grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<font name="Times New Roman" size="16" style="2"/> <font name="Times New Roman" size="16" style="2"/>
@@ -101,7 +101,7 @@
</component> </component>
<component id="d706b" class="javax.swing.JSpinner" binding="sCompilationMaxtime"> <component id="d706b" class="javax.swing.JSpinner" binding="sCompilationMaxtime">
<constraints> <constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/> <minimum-size width="100" height="30"/>
<preferred-size width="238" height="30"/> <preferred-size width="238" height="30"/>
<maximum-size width="100" height="30"/> <maximum-size width="100" height="30"/>
@@ -111,7 +111,7 @@
</component> </component>
<component id="a3108" class="javax.swing.JLabel"> <component id="a3108" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/> <grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<font name="Times New Roman" size="16" style="2"/> <font name="Times New Roman" size="16" style="2"/>
@@ -120,7 +120,7 @@
</component> </component>
<component id="22d31" class="javax.swing.JSpinner" binding="sRunMaxtime"> <component id="22d31" class="javax.swing.JSpinner" binding="sRunMaxtime">
<constraints> <constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/> <minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/> <preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/> <maximum-size width="100" height="30"/>
@@ -130,7 +130,7 @@
</component> </component>
<component id="cda3" class="javax.swing.JCheckBox" binding="cbCube"> <component id="cda3" class="javax.swing.JCheckBox" binding="cbCube">
<constraints> <constraints>
<grid row="4" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="2" use-parent-layout="false"/> <grid row="5" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<font name="Times New Roman" size="16" style="2"/> <font name="Times New Roman" size="16" style="2"/>
@@ -143,7 +143,7 @@
</component> </component>
<component id="a79b8" class="javax.swing.JLabel"> <component id="a79b8" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/> <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<font name="Times New Roman" size="16" style="2"/> <font name="Times New Roman" size="16" style="2"/>
@@ -151,6 +151,26 @@
</properties> </properties>
</component> </component>
<component id="a6c17" class="javax.swing.JSpinner" binding="sMaxProc"> <component id="a6c17" class="javax.swing.JSpinner" binding="sMaxProc">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/>
</grid>
</constraints>
<properties/>
</component>
<component id="9c982" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="ядра"/>
<toolTipText value="количество ядер, задействованное при тестировани"/>
</properties>
</component>
<component id="91540" class="javax.swing.JSpinner" binding="sKernels">
<constraints> <constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/> <minimum-size width="100" height="30"/>

View File

@@ -1,8 +1,10 @@
package TestingSystem.DVM.DVMConfiguration.UI; package TestingSystem.DVM.DVMConfiguration.UI;
import Common.Current; import Common.Current;
import Common.Global;
import Common.UI.VisualiserStringList; import Common.UI.VisualiserStringList;
import Common.UI.TextField.StyledTextField; import Common.UI.TextField.StyledTextField;
import Common.UI.Windows.Dialog.DialogFields; import Common.UI.Windows.Dialog.DialogFields;
import Common.Utils.Utils;
import Visual_DVM_2021.Passes.PassCode_2021; import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.Pass_2021; import Visual_DVM_2021.Passes.Pass_2021;
@@ -35,7 +37,7 @@ public class ConfigurationFields implements DialogFields {
private JToolBar environmentsTools; private JToolBar environmentsTools;
public JButton bAddEnvironments; public JButton bAddEnvironments;
public JButton bDeleteEnvironment; public JButton bDeleteEnvironment;
public JSpinner sKernels;
@Override @Override
public Component getContent() { public Component getContent() {
return content; return content;
@@ -101,6 +103,8 @@ public class ConfigurationFields implements DialogFields {
} }
} }
}); });
sKernels.setModel(new SpinnerNumberModel(1, 1,
Utils.getTestingMaxKernels(),
1));
} }
} }

View File

@@ -27,7 +27,7 @@ public class DVMPackage extends TestingPackage<DVMPackage_json> {
//--- //---
public DVMPackage() { public DVMPackage() {
} }
public DVMPackage(Account account, Machine machine, User user, Compiler compiler){ public DVMPackage(Account account, Machine machine, User user, Compiler compiler, int kernels_in){
id = Constants.Nan; id = Constants.Nan;
//- //-
sender_name = account.name; sender_name = account.name;
@@ -44,7 +44,7 @@ public class DVMPackage extends TestingPackage<DVMPackage_json> {
drv = compiler.call_command; drv = compiler.call_command;
version = compiler.getVersionInfo(); version = compiler.getVersionInfo();
//- //-
kernels = Global.properties.TestingKernels; kernels = kernels_in; //Global.properties.TestingKernels;
needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0; needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0;
//-- //--
package_json = new DVMPackage_json(); package_json = new DVMPackage_json();

View File

@@ -37,11 +37,11 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
} }
@Override @Override
protected void AdditionalInitColumns() { protected void AdditionalInitColumns() {
columns.get(4).setRenderer(TableRenderers.RendererAutoConfiguration); columns.get(5).setRenderer(TableRenderers.RendererAutoConfiguration);
columns.get(4).setEditor(TableEditors.EditorAutoConfiguration); columns.get(5).setEditor(TableEditors.EditorAutoConfiguration);
columns.get(4).setMinWidth(25); columns.get(5).setMinWidth(25);
columns.get(4).setMaxWidth(25); columns.get(5).setMaxWidth(25);
columns.get(5).setMaxWidth(300); columns.get(6).setMaxWidth(300);
} }
}; };
} }
@@ -50,10 +50,11 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
return new String[]{ return new String[]{
"имя", "имя",
"автор", "автор",
"ядра",
"", "",
"группы", "группы",
"тестов", "тестов",
"флаги" "флаги",
}; };
} }
@Override @Override
@@ -65,13 +66,16 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
case 3: case 3:
return object.sender_name; return object.sender_name;
case 4: case 4:
return object.printAuto(); return object.kernels;
case 5: case 5:
return cache.getGroupsDescriptions(); return object.printAuto();
case 6: case 6:
return cache.getTestsCount(); return cache.getGroupsDescriptions();
case 7: case 7:
return cache.getTestsCount();
case 8:
return object.getFlags(); return object.getFlags();
default: default:
return null; return null;
} }
@@ -99,6 +103,7 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
fields.cbKEEP_SPF_DIRECTIVES.setSelected(Result.KEEP_SPF_DIRECTIVES != 0); fields.cbKEEP_SPF_DIRECTIVES.setSelected(Result.KEEP_SPF_DIRECTIVES != 0);
fields.cbSTATIC_SHADOW_ANALYSIS.setSelected(Result.STATIC_SHADOW_ANALYSIS != 0); fields.cbSTATIC_SHADOW_ANALYSIS.setSelected(Result.STATIC_SHADOW_ANALYSIS != 0);
fields.sMAX_SHADOW_WIDTH.setValue(Result.MAX_SHADOW_WIDTH); fields.sMAX_SHADOW_WIDTH.setValue(Result.MAX_SHADOW_WIDTH);
fields.sKernels.setValue(Result.kernels);
} }
@Override @Override
public void ProcessResult() { public void ProcessResult() {
@@ -108,6 +113,7 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
Result.KEEP_SPF_DIRECTIVES = Utils.fromBoolean(fields.cbKEEP_SPF_DIRECTIVES.isSelected()); Result.KEEP_SPF_DIRECTIVES = Utils.fromBoolean(fields.cbKEEP_SPF_DIRECTIVES.isSelected());
Result.STATIC_SHADOW_ANALYSIS = Utils.fromBoolean(fields.cbSTATIC_SHADOW_ANALYSIS.isSelected()); Result.STATIC_SHADOW_ANALYSIS = Utils.fromBoolean(fields.cbSTATIC_SHADOW_ANALYSIS.isSelected());
Result.MAX_SHADOW_WIDTH = fields.sMAX_SHADOW_WIDTH.getValue(); Result.MAX_SHADOW_WIDTH = fields.sMAX_SHADOW_WIDTH.getValue();
Result.kernels= (int)fields.sKernels.getValue();
} }
@Override @Override
public void SetReadonly() { public void SetReadonly() {

View File

@@ -8,7 +8,7 @@
<properties/> <properties/>
<border type="none"/> <border type="none"/>
<children> <children>
<grid id="d1d6e" layout-manager="GridLayoutManager" row-count="8" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="d1d6e" layout-manager="GridLayoutManager" row-count="9" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/> <margin top="0" left="0" bottom="0" right="0"/>
<constraints> <constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -29,7 +29,7 @@
</component> </component>
<vspacer id="224d6"> <vspacer id="224d6">
<constraints> <constraints>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"> <grid row="8" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
<preferred-size width="284" height="14"/> <preferred-size width="284" height="14"/>
</grid> </grid>
</constraints> </constraints>
@@ -46,7 +46,7 @@
</component> </component>
<component id="b644a" class="javax.swing.JCheckBox" binding="cbFREE_FORM"> <component id="b644a" class="javax.swing.JCheckBox" binding="cbFREE_FORM">
<constraints> <constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"> <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="284" height="25"/> <preferred-size width="284" height="25"/>
</grid> </grid>
</constraints> </constraints>
@@ -59,7 +59,7 @@
</component> </component>
<component id="7721e" class="javax.swing.JCheckBox" binding="cbKEEP_SPF_DIRECTIVES"> <component id="7721e" class="javax.swing.JCheckBox" binding="cbKEEP_SPF_DIRECTIVES">
<constraints> <constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"> <grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="284" height="25"/> <preferred-size width="284" height="25"/>
</grid> </grid>
</constraints> </constraints>
@@ -72,7 +72,7 @@
</component> </component>
<component id="f44c1" class="javax.swing.JLabel"> <component id="f44c1" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="3" use-parent-layout="false"> <grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="3" use-parent-layout="false">
<preferred-size width="284" height="17"/> <preferred-size width="284" height="17"/>
</grid> </grid>
</constraints> </constraints>
@@ -83,7 +83,7 @@
</component> </component>
<component id="54e77" class="javax.swing.JCheckBox" binding="cbSTATIC_SHADOW_ANALYSIS"> <component id="54e77" class="javax.swing.JCheckBox" binding="cbSTATIC_SHADOW_ANALYSIS">
<constraints> <constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"> <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="284" height="25"/> <preferred-size width="284" height="25"/>
</grid> </grid>
</constraints> </constraints>
@@ -96,7 +96,7 @@
</component> </component>
<component id="4e865" class="javax.swing.JCheckBox" binding="cbKEEP_DVM_DIRECTIVES"> <component id="4e865" class="javax.swing.JCheckBox" binding="cbKEEP_DVM_DIRECTIVES">
<constraints> <constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"> <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="284" height="25"/> <preferred-size width="284" height="25"/>
</grid> </grid>
</constraints> </constraints>
@@ -109,7 +109,7 @@
</component> </component>
<component id="14243" class="javax.swing.JSlider" binding="sMAX_SHADOW_WIDTH"> <component id="14243" class="javax.swing.JSlider" binding="sMAX_SHADOW_WIDTH">
<constraints> <constraints>
<grid row="6" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="7" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="500" height="40"/> <minimum-size width="500" height="40"/>
<preferred-size width="500" height="40"/> <preferred-size width="500" height="40"/>
<maximum-size width="500" height="40"/> <maximum-size width="500" height="40"/>
@@ -123,6 +123,26 @@
<snapToTicks value="false"/> <snapToTicks value="false"/>
</properties> </properties>
</component> </component>
<component id="1eea4" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="ядра"/>
<toolTipText value="количество ядер, задействованное при тестировани"/>
</properties>
</component>
<component id="2a173" class="javax.swing.JSpinner" binding="sKernels">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/>
</grid>
</constraints>
<properties/>
</component>
</children> </children>
</grid> </grid>
</children> </children>

View File

@@ -1,6 +1,7 @@
package TestingSystem.SAPFOR.SapforConfiguration.UI; package TestingSystem.SAPFOR.SapforConfiguration.UI;
import Common.UI.TextField.StyledTextField; import Common.UI.TextField.StyledTextField;
import Common.UI.Windows.Dialog.DialogFields; import Common.UI.Windows.Dialog.DialogFields;
import Common.Utils.Utils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@@ -13,6 +14,7 @@ public class SapforConfigurationFields implements DialogFields {
public JCheckBox cbSTATIC_SHADOW_ANALYSIS; public JCheckBox cbSTATIC_SHADOW_ANALYSIS;
public JCheckBox cbKEEP_SPF_DIRECTIVES; public JCheckBox cbKEEP_SPF_DIRECTIVES;
public JCheckBox cbKEEP_DVM_DIRECTIVES; public JCheckBox cbKEEP_DVM_DIRECTIVES;
public JSpinner sKernels;
//-- //--
@Override @Override
public Component getContent() { public Component getContent() {
@@ -22,4 +24,9 @@ public class SapforConfigurationFields implements DialogFields {
// TODO: place custom component creation code here // TODO: place custom component creation code here
tfName = new StyledTextField(); tfName = new StyledTextField();
} }
public SapforConfigurationFields(){
sKernels.setModel(new SpinnerNumberModel(1, 1,
Utils.getTestingMaxKernels(),
1));
}
} }

View File

@@ -21,7 +21,7 @@ public class SapforPackage extends TestingPackage<SapforPackage_json> {
public SapforPackage(SapforPackage sapforPackage) { public SapforPackage(SapforPackage sapforPackage) {
SynchronizeFields(sapforPackage); SynchronizeFields(sapforPackage);
} }
public SapforPackage(Account account, ServerSapfor serverSapfor) { public SapforPackage(Account account, ServerSapfor serverSapfor, int kernels_in) {
id = Constants.Nan; id = Constants.Nan;
//- //-
sender_name = account.name; sender_name = account.name;
@@ -31,7 +31,7 @@ public class SapforPackage extends TestingPackage<SapforPackage_json> {
//- //-
drv = serverSapfor.call_command; drv = serverSapfor.call_command;
version = serverSapfor.version; version = serverSapfor.version;
kernels = Global.properties.TestingKernels; kernels = kernels_in;//Global.properties.TestingKernels;
needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0; needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0;
///------------------------------- ///-------------------------------
package_json = new SapforPackage_json(); package_json = new SapforPackage_json();

View File

@@ -0,0 +1,5 @@
package Visual_DVM_2021.Passes.All;
import TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
import Visual_DVM_2021.Passes.Pass_2021;
public class CloneCurrentDVMConfiguration extends Pass_2021<DVMConfiguration> {
}

View File

@@ -61,7 +61,7 @@ public class CloneDVMPackage extends AddObjectPass<DVMPackage> {
target.drv = Current.getCompiler().call_command; target.drv = Current.getCompiler().call_command;
target.version = Current.getCompiler().getVersionInfo(); target.version = Current.getCompiler().getVersionInfo();
//-- //--
target.kernels = Global.properties.TestingKernels; target.kernels = 1; //Global.properties.TestingKernels;
target.needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0; target.needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0;
//-- //--
target.tasksCount = 0; target.tasksCount = 0;

View File

@@ -135,12 +135,12 @@ public class CloneSapforPackage extends AddObjectPass<SapforPackage> {
//- //-
target.drv = Current.getServerSapfor().call_command; target.drv = Current.getServerSapfor().call_command;
target.version = Current.getServerSapfor().version; target.version = Current.getServerSapfor().version;
target.kernels = Global.properties.TestingKernels; target.kernels = 1; //Global.properties.TestingKernels;
target.needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0; target.needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0;
//-- //--
target.sapforId = Current.getServerSapfor().id; target.sapforId = Current.getServerSapfor().id;
//-- //--
target.kernels = Global.properties.TestingKernels; target.kernels =1; // Global.properties.TestingKernels;
target.needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0; target.needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0;
//-- //--
target.package_json = new SapforPackage_json(); target.package_json = new SapforPackage_json();

View File

@@ -135,13 +135,17 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
if (!Current.getCompiler().versionLoaded) if (!Current.getCompiler().versionLoaded)
passes.get(PassCode_2021.ShowCompilerVersion).Do(Current.getCompiler(), false); passes.get(PassCode_2021.ShowCompilerVersion).Do(Current.getCompiler(), false);
//-- //--
int max_kernels = 1;
for (DVMConfiguration configuration : configurations){
max_kernels = Math.max(configuration.kernels, max_kernels);
}
target = new DVMPackage( target = new DVMPackage(
Current.getAccount(), Current.getAccount(),
Current.getMachine(), Current.getMachine(),
Current.getUser(), Current.getUser(),
Current.getCompiler() Current.getCompiler(),
max_kernels
); );
//----
for (DVMConfiguration configuration : configurations) { for (DVMConfiguration configuration : configurations) {
ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(configuration); ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(configuration);
groups = cache.getGroups(); groups = cache.getGroups();
@@ -162,6 +166,9 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
tasks.addAll(createTasksCGT(configuration, group, test)); tasks.addAll(createTasksCGT(configuration, group, test));
} }
} }
//----
if (tasks_count == 0) { if (tasks_count == 0) {
Log.Writeln_("Задач не найдено."); Log.Writeln_("Задач не найдено.");
return false; return false;

View File

@@ -182,7 +182,9 @@ public class StartSelectedSAPFORConfigurations extends PublishServerObject<Testi
Log.Writeln_("Не отмечено ни одной конфигурации, или отсутствует текущая конфигурация."); Log.Writeln_("Не отмечено ни одной конфигурации, или отсутствует текущая конфигурация.");
return false; return false;
} }
int max_kernels = 1;
for (SapforConfiguration configuration : configurations) { for (SapforConfiguration configuration : configurations) {
max_kernels = Math.max(configuration.kernels, max_kernels);
if (!checkConfigurationCommands(configuration)) if (!checkConfigurationCommands(configuration))
return false; return false;
//- //-
@@ -216,7 +218,7 @@ public class StartSelectedSAPFORConfigurations extends PublishServerObject<Testi
//- //-
} }
} }
target = new SapforPackage(Current.getAccount(), Current.getServerSapfor()); target = new SapforPackage(Current.getAccount(), Current.getServerSapfor(), max_kernels);
//-- //--
testingSet = new SapforTestingSet_json(); testingSet = new SapforTestingSet_json();
testingSet.id = target.package_json.getMaxSetId(); testingSet.id = target.package_json.getMaxSetId();

View File

@@ -0,0 +1,10 @@
package Visual_DVM_2021.Passes;
import Common.Global;
import TestingSystem.Common.Configuration.Configuration;
import TestingSystem.Common.TestingServer;
import Visual_DVM_2021.Passes.Server.PublishServerObject;
public class CloneConfiguration<C extends Configuration> extends PublishServerObject<TestingServer, C> {
public CloneConfiguration(Class<C> d_in) {
super(Global.testingServer, d_in);
}
}

View File

@@ -344,12 +344,16 @@ public enum PassCode_2021 {
ShowCurrentSAPFORConfigurationTests, ShowCurrentSAPFORConfigurationTests,
SaveCurrentSAPFORConfiguration, SaveCurrentSAPFORConfiguration,
StartSelectedSAPFORConfigurations, StartSelectedSAPFORConfigurations,
CloneCurrentDVMConfiguration,
; ;
//-- //--
public String getDescription() { public String getDescription() {
switch (this) { switch (this) {
case Undefined: case Undefined:
return "?"; return "?";
case CloneCurrentDVMConfiguration:
return "Дублировать текущую конфигурацию тестирования DVM системы";
case StartSelectedSAPFORConfigurations: case StartSelectedSAPFORConfigurations:
return "Запустить отмеченные конфигурации тестирования системы SAPFOR"; return "Запустить отмеченные конфигурации тестирования системы SAPFOR";
case SaveCurrentSAPFORConfiguration: case SaveCurrentSAPFORConfiguration: