Closedown
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
//<editor-fold defaultstate="collapsed" desc="import">
|
||||
|
||||
import ch.psi.pshell.core.Controller;
|
||||
import ch.psi.pshell.scripting.StatementException;
|
||||
import ch.psi.pshell.security.AccessLevel;
|
||||
import ch.psi.pshell.ui.App;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
@@ -1146,10 +1147,12 @@ public class TestingList extends Panel {
|
||||
*/
|
||||
public int showResult(String deviceName, String testPath, String res, String status) {
|
||||
int rowD = -1;
|
||||
testPath = testPath.replace("\\\\", "\\");
|
||||
String sTestName = testPath;
|
||||
//getController().getDataManager().appendLog(str(log));
|
||||
|
||||
getLogger().log(Level.FINE, "Looking for: deviceName: " + deviceName + "; testPath: " + testPath + " in table.");
|
||||
System.out.println("Looking for: deviceName: " + deviceName + "; testPath: " + testPath + " in table.");
|
||||
|
||||
String sStatus;
|
||||
if (status == "true") {
|
||||
sStatus = TestStatus.SUCCESS.toString();
|
||||
@@ -1257,7 +1260,7 @@ public class TestingList extends Panel {
|
||||
/**
|
||||
* get the first test currently in progress
|
||||
*
|
||||
* @return properties of the test in progress
|
||||
* @return properties of the test in progress: {deviceName,testPath}
|
||||
*/
|
||||
public String[] getTestInProgress() {
|
||||
String[] dsTestProperties = {"", ""};
|
||||
@@ -1277,6 +1280,14 @@ public class TestingList extends Panel {
|
||||
return dsTestProperties;
|
||||
}
|
||||
}
|
||||
|
||||
public void stopAll(String resultMessage){
|
||||
String testInProgress[] = getTestInProgress();
|
||||
while(testInProgress[0]!=""){
|
||||
showResult(testInProgress[0], testInProgress[1], resultMessage, "false");
|
||||
}
|
||||
setToStopped();
|
||||
}
|
||||
|
||||
/**
|
||||
* return the status of the specified test name for specified device name
|
||||
@@ -1587,6 +1598,12 @@ public class TestingList extends Panel {
|
||||
System.out.println("Result: " + sDeviceName + "|" + sTestPath + "|" + sTestResult + "|" + sTestStatus);
|
||||
iLastExecutedTestIndex = showResult(sDeviceName, sTestPath, sTestResult, sTestStatus);
|
||||
}
|
||||
} catch (StatementException intEx) {
|
||||
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, intEx);
|
||||
System.out.println("User interrupted test! |"+ sDeviceName+"|"+ sTestPath+"|"+ String.valueOf(intEx));
|
||||
stopAll("User interrupted test");
|
||||
//showResult(sDeviceName, sTestPath, "User interrupted test", "false");
|
||||
//setToStopped();
|
||||
} catch (ClassCastException ccex) {
|
||||
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ccex);
|
||||
SwingUtils.showMessage(TestingList.this, "executeParallelTestsGroup()", ccex.toString());
|
||||
@@ -1594,11 +1611,7 @@ public class TestingList extends Panel {
|
||||
if (!sDeviceName.isEmpty()) {
|
||||
showResult(sDeviceName, sTestPath, ccex.toString(), TestStatus.FAILURE.toString());
|
||||
}
|
||||
} catch (InterruptedException intEx) {
|
||||
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, intEx);
|
||||
System.out.println(String.valueOf(intEx));
|
||||
showResult(sDeviceName, sTestPath, "User interrupted test", TestStatus.FAILURE.toString());
|
||||
} catch (Exception ex) {
|
||||
}catch (Exception ex) {
|
||||
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
|
||||
SwingUtils.showMessage(TestingList.this, "executeParallelTestsGroup()", ex.toString());
|
||||
System.out.println(String.valueOf(ex));
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user