no message

This commit is contained in:
2023-11-23 01:50:04 +03:00
parent 1bb97187fe
commit 697e103a5c
8 changed files with 57 additions and 21 deletions

6
.idea/workspace.xml generated
View File

@@ -8,7 +8,13 @@
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Test/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/Test.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Test/TestDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/TestDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Test/UI/TestFields.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/UI/TestFields.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Test/UI/TestFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/UI/TestFields.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ConvertCorrectnessTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ConvertCorrectnessTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/PublishTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/PublishTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartTests.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -18,7 +18,9 @@ import java.io.File;
import java.nio.file.Paths;
public class Test extends riDBObject {
@Description("DEFAULT 1")
public int dim = 1; //размерность теста. для удобства пусть будет и внешним полем.
public int min_dim = 1; //мин размерность теста.
@Description("DEFAULT 1")
public int max_dim = 1; //макс размерность теста.
@Description("DEFAULT ''")
public String args = ""; //аргументы командной строки. на всякий случай поле зарезервирую. пусть будут.
@Description("DEFAULT -1")
@@ -27,7 +29,8 @@ public class Test extends riDBObject {
public void SynchronizeFields(DBObject src) {
super.SynchronizeFields(src);
Test t = (Test) src;
dim = t.dim;
min_dim = t.min_dim;
max_dim = t.max_dim;
args = t.args;
group_id = t.group_id;
}

View File

@@ -35,8 +35,10 @@ public class TestDBTable extends iDBTable<Test> {
case 2:
return object.description;
case 3:
return object.dim;
return object.min_dim;
case 4:
return object.max_dim;
case 5:
return object.files;
default:
return null;
@@ -45,7 +47,11 @@ public class TestDBTable extends iDBTable<Test> {
@Override
public String[] getUIColumnNames() {
return new String[]{
"имя", "размерность", "файлы"};
"имя",
"min_dim",
"max_dim",
"файлы"
};
}
@Override
public Current CurrentName() {
@@ -72,12 +78,14 @@ public class TestDBTable extends iDBTable<Test> {
@Override
public void fillFields() {
fields.tfName.setText(Result.description);
fields.sDim.setValue(Result.dim);
fields.sMinDim.setValue(Result.min_dim);
fields.sMaxDim.setValue(Result.max_dim);
}
@Override
public void ProcessResult() {
Result.description = fields.tfName.getText();
Result.dim = (int) fields.sDim.getValue();
Result.min_dim = (int) fields.sMinDim.getValue();
Result.max_dim = (int) fields.sMaxDim.getValue();
if (!edit) {
Result.sender_name = Current.getAccount().name;
Result.sender_address = Current.getAccount().email;

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="TestingSystem.Common.Test.UI.TestFields">
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
@@ -19,7 +19,7 @@
</component>
<vspacer id="9a439">
<constraints>
<grid row="2" 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="3" 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>
</vspacer>
<component id="ddf02" class="javax.swing.JTextField" binding="tfName" custom-create="true">
@@ -33,15 +33,33 @@
</properties>
</component>
<component id="fbef6" class="javax.swing.JLabel">
<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"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="максимальная размерность"/>
</properties>
</component>
<component id="2b54" class="javax.swing.JSpinner" binding="sMaxDim">
<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">
<preferred-size width="50" height="-1"/>
<maximum-size width="50" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="82807" 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="размерность"/>
<text value="минимальная размерность"/>
</properties>
</component>
<component id="2b54" class="javax.swing.JSpinner" binding="sDim">
<component id="c59e6" class="javax.swing.JSpinner" binding="sMinDim">
<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">
<preferred-size width="50" height="-1"/>

View File

@@ -7,7 +7,8 @@ import java.awt.*;
public class TestFields implements DialogFields {
public JTextField tfName;
private JPanel content;
public JSpinner sDim;
public JSpinner sMinDim;
public JSpinner sMaxDim;
@Override
public Component getContent() {
return content;
@@ -17,6 +18,7 @@ public class TestFields implements DialogFields {
tfName = new StyledTextField();
}
public TestFields(){
sDim.setModel(new SpinnerNumberModel(1, 0, 16,1));
sMinDim.setModel(new SpinnerNumberModel(1, 0, 16,1));
sMaxDim.setModel(new SpinnerNumberModel(1, 0, 16,1));
}
}

View File

@@ -67,12 +67,12 @@ public class ConvertCorrectnessTests extends TestingSystemPass<File> {
db_project_info vizTestProject = new db_project_info(testProject, "", false);
switch (group.language) {
case fortran:
test.dim = Current.getSapfor().getTextMaxDim(files[0], vizTestProject);
System.out.println(test.dim);
test.max_dim = Current.getSapfor().getTextMaxDim(files[0], vizTestProject);
System.out.println(test.max_dim);
break;
case c:
test.dim = Utils.getCTestMaxDim(files[0]);
System.out.println(test.dim);
test.max_dim = Utils.getCTestMaxDim(files[0]);
System.out.println(test.max_dim);
break;
}
}

View File

@@ -4,7 +4,6 @@ import Common.Current;
import Common.Global;
import Common.UI.UI;
import Common.Utils.Utils;
import ProjectData.Files.DBProjectFile;
import ProjectData.Project.db_project_info;
import TestingSystem.Common.Test.Test;
import TestingSystem.Common.TestingServer;
@@ -33,15 +32,15 @@ public class PublishTest extends PublishServerObject<TestingServer, Test> {
target.files = String.join(";", filesNames);
//--
if (from_current_project) {
target.dim = project.testMaxDim;
// target.max_dim = project.testMaxDim;
return super.fillObjectFields();
} else {
switch (project.languageName) {
case fortran:
target.dim = Current.getSapfor().getTextMaxDim(null, project);
target.max_dim = Current.getSapfor().getTextMaxDim(null, project);
break;
case c:
target.dim = Utils.getCProjectMaxDim(project);
target.max_dim = Utils.getCProjectMaxDim(project);
break;
}
return true;

View File

@@ -83,7 +83,7 @@ public class StartTests extends PublishServerAccountObject<TasksPackage> {
flags
);
testCompilationTask.runTasks = new Vector<>();
Vector<String> matrixes = configuration.getMatrixes(test.dim);
Vector<String> matrixes = configuration.getMatrixes(test.max_dim);
Vector<String> environments = configuration.getEnvironments();
for (String environmentSet : environments) {
if (flags.trim().equalsIgnoreCase("-s")) {