Closedown

This commit is contained in:
boccioli_m
2015-06-16 14:13:03 +02:00
parent 0301829b7c
commit 3b88a6cba7

View File

@@ -544,6 +544,8 @@ public class TestingList extends Panel {
boolean bSelected = false;
String sDeviceName;
String sTestName;
String sTestCaseName;
String sTestPath;
HashMap args = new HashMap();
//scan through the table starting from 'position' and execute the first selected test found
int row = position;
@@ -555,13 +557,21 @@ public class TestingList extends Panel {
if (bSelected) {
sDeviceName = jTable1.getValueAt(row, COL.DEVICENAME.ordinal()).toString();
sTestName = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString();
sTestCaseName = jTable1.getValueAt(row, COL.TESTSUITE.ordinal()).toString();
sTestPath = "\\script\\tests\\tests\\" + sTestCaseName + "\\" + sTestName + ".py";
File f = new File(sTestPath);
if(!f.exists() || f.isDirectory()){
logger.log(Level.SEVERE, "Test file not found: " + sTestPath);
showResult(sDeviceName, sTestName, "Test file not found: " + sTestPath, TestStatus.FAILURE.toString());
return;
}
showResult(sDeviceName, sTestName, "Test running", TestStatus.RUNNING.toString());
//launch the test
try{
args.put("DEVICE", sDeviceName);
args.put("ret", "");
args.put("status", false);
runAsync(sTestName, args);
runAsync(sTestPath, args);
} catch (Exception ex) {
SwingUtils.showMessage(this, "executeTest()", ex.toString());
logger.log(Level.SEVERE, ex.toString());