diff options
author | jmisinco | 2016-12-08 20:40:17 +0000 |
---|---|---|
committer | jmisinco | 2016-12-08 20:40:17 +0000 |
commit | eb9ce0a1cb75e91cc1d28b9c2f85eeef452b0d9a (patch) | |
tree | b45eeac4744d0c4b69b4a87b05f49b22dec04f91 | |
parent | b242b32f29a4f05371a31e32df8dc12e74609bc3 (diff) | |
download | org.eclipse.osee-eb9ce0a1cb75e91cc1d28b9c2f85eeef452b0d9a.tar.gz org.eclipse.osee-eb9ce0a1cb75e91cc1d28b9c2f85eeef452b0d9a.tar.xz org.eclipse.osee-eb9ce0a1cb75e91cc1d28b9c2f85eeef452b0d9a.zip |
feature[ats_ATS327790]: Abort script if OFP does not exist
Change-Id: I72ced54ee8c28a348234f2f504d1e0a16f1c0649
-rw-r--r-- | plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseRunManager.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseRunManager.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseRunManager.java index 16e25578dcc..53378b7ae51 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseRunManager.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseRunManager.java @@ -11,9 +11,10 @@ package org.eclipse.osee.ote.core.framework; import java.util.logging.Level; - import org.eclipse.osee.framework.jdk.core.type.IPropertyStore; +import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.framework.logging.BaseStatus; +import org.eclipse.osee.framework.logging.IHealthStatus; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.ote.core.TestScript; import org.eclipse.osee.ote.core.environment.TestEnvironment; @@ -60,8 +61,8 @@ public class BaseRunManager implements IRunManager { rb.append(testRunManager.initialize(env, propertyStore)); if (rb.isReturnStatusOK()) { try { - rb.append(lifecycleListenerProvider.notifyPostInstantiation(propertyStore, testRunManager.getTest(), - env)); + rb.append( + lifecycleListenerProvider.notifyPostInstantiation(propertyStore, testRunManager.getTest(), env)); } catch (Throwable th) { MethodResultImpl result = new MethodResultImpl(ReturnCode.ERROR); result.addStatus(new BaseStatus(this.getClass().getName(), Level.SEVERE, th)); @@ -75,6 +76,21 @@ public class BaseRunManager implements IRunManager { result.addStatus(new BaseStatus(this.getClass().getName(), Level.SEVERE, th)); rb.append(result); } + } else { + TestScript test = testRunManager.getTest(); + boolean aborted = false; + if (Conditions.hasValues(rb.get().getStatus())) { + for (IHealthStatus hs : rb.get().getStatus()) { + if (hs.getException() != null) { + test.abortDueToThrowable(hs.getException()); + aborted = true; + break; + } + } + } + if (!aborted) { + test.abort(); + } } } rb.append(lifecycleListenerProvider.notifyPreDispose(propertyStore, testRunManager.getTest(), env)); |