From b0b3f387a91c67690cd72def1f1da1ac3f3f7e30 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Fri, 3 Feb 2017 11:35:17 +0100 Subject: [PATCH] SFT: avoid testing aggregator features Feature repositories built by the Karaf Maven plugin contain an aggregator feature which pulls in all the features in the relevant POM. It's pointless to test this, and very expensive, so we now skip them: the rule is that, in repositories with more than one feature, any feature with the same name as the repository is skipped. (Repositories containing a single feature are tested, so that single features can be checked in -Psft mode.) Change-Id: I8ca11e9ff18663e62cee94e3203b5a0e0db17742 Signed-off-by: Stephen Kitt --- .../odlparent/featuretest/PerRepoTestRunner.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/features4-test/src/main/java/org/opendaylight/odlparent/featuretest/PerRepoTestRunner.java b/features4-test/src/main/java/org/opendaylight/odlparent/featuretest/PerRepoTestRunner.java index b44ef8324..ab4b7aa41 100644 --- a/features4-test/src/main/java/org/opendaylight/odlparent/featuretest/PerRepoTestRunner.java +++ b/features4-test/src/main/java/org/opendaylight/odlparent/featuretest/PerRepoTestRunner.java @@ -118,7 +118,14 @@ public class PerRepoTestRunner extends ParentRunner { final List runners = new ArrayList<>(); final List featureList = features.getFeature(); for (final Feature f : featureList) { - runners.add(new PerFeatureRunner(repoUrl, f.getName(), f.getVersion(), testClass)); + // If the features have more than one feature, ignore any feature with the same name as the + // repository — these are the aggregator features generated by the Karaf Maven plugin, and + // which are expensive to test + if (featureList.size() == 1 || !f.getName().equals(features.getName())) { + runners.add(new PerFeatureRunner(repoUrl, f.getName(), f.getVersion(), testClass)); + } else { + LOG.warn("Skipping {}, it's an aggregator feature", f.getName()); + } } return runners; } -- 2.36.6