SFT diag: add a force option 92/50792/2
authorStephen Kitt <skitt@redhat.com>
Mon, 23 Jan 2017 08:51:21 +0000 (09:51 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 23 Jan 2017 18:33:00 +0000 (18:33 +0000)
Add a sft.diag.force property to force diag even on blacklisted
features (this makes it easier for downstreams to check whether they
really have fixed their blacklisted features).

Change-Id: I7f23c5767293ffc55d0a269071235b08c815caba
Signed-off-by: Stephen Kitt <skitt@redhat.com>
features-test/src/main/java/org/opendaylight/odlparent/featuretest/SingleFeatureTest.java

index 49b73f5794a43e7a20af07e542d16b2408f25b43..aae5b19edfc2017a26289d69fdf143ed1da11133 100644 (file)
@@ -69,6 +69,7 @@ public class SingleFeatureTest {
     private static final String KEEP_UNPACK_DIRECTORY_PROP = "karaf.keep.unpack";
     private static final String PROFILE_PROP = "karaf.featureTest.profile";
     private static final String BUNDLES_DIAG_SKIP_PROP = "sft.diag.skip";
+    private static final String BUNDLES_DIAG_FORCE_PROP = "sft.diag.force";
     private static final String BUNDLES_DIAG_TIMEOUT_PROP = "sft.diag.timeout";
 
     private static final String LOG4J_LOGGER_ORG_OPENDAYLIGHT_YANGTOOLS_FEATURETEST =
@@ -189,6 +190,7 @@ public class SingleFeatureTest {
             new PropagateSystemPropertyOption(ORG_OPENDAYLIGHT_FEATURETEST_FEATURENAME_PROP),
             new PropagateSystemPropertyOption(ORG_OPENDAYLIGHT_FEATURETEST_FEATUREVERSION_PROP),
             new PropagateSystemPropertyOption(BUNDLES_DIAG_SKIP_PROP),
+            new PropagateSystemPropertyOption(BUNDLES_DIAG_FORCE_PROP),
             new PropagateSystemPropertyOption(BUNDLES_DIAG_TIMEOUT_PROP),
             // Needed for Agrona/aeron.io
             CoreOptions.systemPackages("com.sun.media.sound", "sun.nio.ch"),
@@ -341,7 +343,8 @@ public class SingleFeatureTest {
         LOG.info("Successfull installed feature {} {}", getFeatureName(), getFeatureVersion());
 
         if (!Boolean.getBoolean(BUNDLES_DIAG_SKIP_PROP)
-                && !BLACKLISTED_BROKEN_FEATURES.contains(getFeatureName())) {
+                && (Boolean.getBoolean(BUNDLES_DIAG_FORCE_PROP)
+                    || !BLACKLISTED_BROKEN_FEATURES.contains(getFeatureName()))) {
             Integer timeOutInSeconds = Integer.getInteger(BUNDLES_DIAG_TIMEOUT_PROP, 5 * 60);
             new TestBundleDiag(bundleContext, bundleService).checkBundleDiagInfos(timeOutInSeconds, SECONDS);
         } else {