Startup
This commit is contained in:
@@ -88,16 +88,17 @@ public class TestingList extends Panel {
|
||||
STARTSEQUENCE(1),
|
||||
TIME(2),
|
||||
DEVICENAME(3),
|
||||
DEVICEDESCR(4),
|
||||
TESTSUITE(5),
|
||||
TESTNAME(6),
|
||||
TESTPATH(7),
|
||||
TESTPARAMS(8),
|
||||
TESTDESCR(9),
|
||||
TESTHELP(10),
|
||||
RESULT(11),
|
||||
STATUS(12),
|
||||
ICON(13);
|
||||
DEVICEPATH(4),
|
||||
DEVICEDESCR(5),
|
||||
TESTSUITE(6),
|
||||
TESTNAME(7),
|
||||
TESTPATH(8),
|
||||
TESTPARAMS(9),
|
||||
TESTDESCR(10),
|
||||
TESTHELP(11),
|
||||
RESULT(12),
|
||||
STATUS(13),
|
||||
ICON(14);
|
||||
private int value;
|
||||
|
||||
private COL(int value) {
|
||||
@@ -973,14 +974,14 @@ public class TestingList extends Panel {
|
||||
|
||||
},
|
||||
new String [] {
|
||||
"Enable", "Start Mode", "Time", "Device Name", "Device Description", "Test Suite", "Test Name", "Test Peth", "Test Parameters", "Test Description", "Test Help", "Last Test Result", "Status", ""
|
||||
"Enable", "Start Mode", "Time", "Device Name", "Device Path", "Device Description", "Test Suite", "Test Name", "Test Peth", "Test Parameters", "Test Description", "Test Help", "Last Test Result", "Status", ""
|
||||
}
|
||||
) {
|
||||
Class[] types = new Class [] {
|
||||
java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
|
||||
java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, javax.swing.Icon.class
|
||||
};
|
||||
boolean[] canEdit = new boolean [] {
|
||||
true, true, false, false, false, false, false, false, false, false, false, false, false, false
|
||||
true, true, false, false, false, false, false, false, false, false, false, false, false, false, false
|
||||
};
|
||||
|
||||
public Class getColumnClass(int columnIndex) {
|
||||
@@ -1588,6 +1589,7 @@ public class TestingList extends Panel {
|
||||
String sTestPath = String.valueOf(jTable1.getValueAt(row, COL.TESTPATH.ordinal())).replace("\\", File.separator);
|
||||
String sTestCaseName = jTable1.getValueAt(row, COL.TESTSUITE.ordinal()).toString();
|
||||
String sTestDescription = getTestDescription(sTestPath);
|
||||
String sDevicePath = jTable1.getValueAt(row, COL.DEVICEPATH.ordinal()).toString();
|
||||
String sDeviceDescription = jTable1.getValueAt(row, COL.DEVICEDESCR.ordinal()).toString();
|
||||
String sLastResult = jTable1.getValueAt(row, COL.RESULT.ordinal()).toString();
|
||||
String sResultTime = jTable1.getValueAt(row, COL.TIME.ordinal()).toString();
|
||||
@@ -2234,8 +2236,9 @@ public class TestingList extends Panel {
|
||||
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
|
||||
//String testPath = FilenameUtils.separatorsToSystem(TESTS_TESTS_DEFAULT_DIR + testSuite + "/" + testName + "/" + testName + ".py");
|
||||
String testPath = Paths.get(TESTS_TESTS_DEFAULT_DIR.toString(), testSuite, testName, testName + ".py").toString();
|
||||
String devicePath = Paths.get(TESTS_DEVICES_DEFAULT_DIR.toString(), deviceName + deviceName + ".config").toString();
|
||||
System.out.println("Path = " + testPath);
|
||||
Object rowData[] = new Object[]{false, "", sDate, deviceName, deviceDescription, testSuite, testName, testPath, testParams, testDescription, testHelp, "", "Pending", icon};
|
||||
Object rowData[] = new Object[]{false, "", sDate, deviceName, devicePath, deviceDescription, testSuite, testName, testPath, testParams, testDescription, testHelp, "", "Pending", icon};
|
||||
//vedify that this test is not already in the table
|
||||
int totalRows = model.getRowCount();
|
||||
boolean bTestAlreadyInTable = false;
|
||||
@@ -2470,6 +2473,34 @@ public class TestingList extends Panel {
|
||||
return buildParametersMap(testParams);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get the parameters from the test config file
|
||||
*
|
||||
* @param sTestPath directory where the test files are (directory with the
|
||||
* test name)
|
||||
* @return HashMap of the test parameters. See buildParametersMap() for
|
||||
* details.
|
||||
*/
|
||||
private HashMap getParameters(String sTestPath, String sDevicePath) {
|
||||
HashMap deviceParams = buildParametersMap(getConfigItem("parameters", sDevicePath));
|
||||
HashMap testParams = buildParametersMap(getConfigItem("parameters", sTestPath));
|
||||
HashMap params;
|
||||
Iterator it = deviceParams.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry pair = (Map.Entry)it.next();
|
||||
System.out.println(pair.getKey() + " = " + pair.getValue());
|
||||
it.remove(); // avoids a ConcurrentModificationException
|
||||
}
|
||||
it = testParams.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry pair = (Map.Entry)it.next();
|
||||
System.out.println(pair.getKey() + " = " + pair.getValue());
|
||||
it.remove(); // avoids a ConcurrentModificationException
|
||||
}
|
||||
return testParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the description of the test.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user