diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 872df2c..94c777a 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -54,38 +54,49 @@ public class TestingList extends Panel { protected void onExecutedFile(String fileName) { int iCurrentTestPos = 0; try { - 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); - //start next test - if(iCurrentTestPos>0) - { - testingList.executeTest(iCurrentTestPos+1); - } - } + Object ret = eval("ret"); + boolean success = (boolean) eval("success"); + Object deviceName = eval("DEVICE"); + String sSuccess = (success == true) ? "Success" : "Failed"; - } catch (Exception ex) { - String ret = "Could not start test script"; - String sSuccess = "Failed"; - String[] deviceName = testingList.getTestInProgress(); + if (ret != "" ) { + //SwingUtils.showMessage(getComponent(), "", ret.toString() + " - " + ret.getClass().getName()); + iCurrentTestPos = testingList.showResult(deviceName.toString(), fileName, ret.toString(), sSuccess); + //start next test + if(iCurrentTestPos>0) + { + testingList.executeTest(iCurrentTestPos+1); + } + } + else{ + ret = "Could not start test script"; + sSuccess = "Failed"; + String[] dsDeviceName = testingList.getTestInProgress(); //SwingUtils.showException(getComponent(), ex ); //SwingUtils.showMessage(getComponent(), "", ex.toString() + deviceName[0]); - if(deviceName[0] != ""){ - iCurrentTestPos = testingList.showResult(deviceName[0], fileName, ret, sSuccess); + if(dsDeviceName[0] != ""){ + iCurrentTestPos = testingList.showResult(dsDeviceName[0], fileName, ret.toString(), sSuccess); //start next test if(iCurrentTestPos>=0) { testingList.executeTest(iCurrentTestPos+1); } } - - - + } + } catch (Exception ex) { + String ret = "Could not start test script"; + String sSuccess = "Failed"; + String[] dsDeviceName = testingList.getTestInProgress(); + //SwingUtils.showException(getComponent(), ex ); + //SwingUtils.showMessage(getComponent(), "", ex.toString() + deviceName[0]); + if(dsDeviceName[0] != ""){ + iCurrentTestPos = testingList.showResult(dsDeviceName[0], fileName, ret, sSuccess); + //start next test + if(iCurrentTestPos>=0) + { + testingList.executeTest(iCurrentTestPos+1); + } + } } }