From ded2b0c21e2c95445486a75c36df76f2fd8ab8f6 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Wed, 10 Jun 2015 10:52:29 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.java | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 2b37f57..b43f4b2 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -57,8 +57,8 @@ public class TestingList extends Panel { Object ret = eval("ret"); boolean success = (boolean) eval("success"); Object deviceName = eval("DEVICE"); - String sSuccess = (success == true) ? "Success" : "Failed"; + if (ret != null) { //SwingUtils.showMessage(getComponent(), "", ret.toString() + " - " + ret.getClass().getName()); iCurrentTestPos = testingList.showResult(deviceName.toString(), fileName, ret.toString(), sSuccess); @@ -67,9 +67,20 @@ public class TestingList extends Panel { { testingList.executeTest(iCurrentTestPos+1); } - } + } + } catch (Exception ex) { // SwingUtils.showException(getComponent(), ex); + String ret = "Could not start test script"; + String sSuccess = "Failed"; + String[] deviceName = testingList.getTestinProgress(); + + iCurrentTestPos = testingList.showResult(deviceName[0], fileName, ret, sSuccess); + //start next test + if(iCurrentTestPos>0) + { + testingList.executeTest(iCurrentTestPos+1); + } } } @@ -320,6 +331,21 @@ public class TestingList extends Panel { } return rowD; } + //find the test currently in progress + public String[] getTestinProgress() { + int rowD = -1, colT = -1; + String[] dsTestProperties = null; + //search for device name in table + for (int row = 0; row <= jTable1.getRowCount() - 1; row++) { + if ("Running".equals(jTable1.getValueAt(row, COL_STATUS))) { + rowD = row; + dsTestProperties[0] = jTable1.getValueAt(row, COL_DEVICENAME).toString(); + dsTestProperties[1] = jTable1.getValueAt(row, COL_TESTNAME).toString(); + break; + } + } + return dsTestProperties; + } //returns the status of the specified test name for specified device name public String getResult(String deviceName, String testName){