diff options
| author | Robert Gemmell <robbie@apache.org> | 2013-09-23 23:48:37 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2013-09-23 23:48:37 +0000 |
| commit | f9c3f27c4b405723d8137d216bb57813271507eb (patch) | |
| tree | df30d94e0ef98ac292c577ea86c8b1f24498afa1 /qpid/java | |
| parent | 8777033b46c4686d0f1190a51c5d0633690b6fa6 (diff) | |
| download | qpid-python-f9c3f27c4b405723d8137d216bb57813271507eb.tar.gz | |
QPID-5161: make QTC able to generate the test.excludesfiles property contents itself from the test.excludes list
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1525747 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/qpid/java/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java b/qpid/java/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java index 8f556ece5a..20d5dd5453 100644 --- a/qpid/java/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java +++ b/qpid/java/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java @@ -38,8 +38,12 @@ import java.util.NoSuchElementException; public class QpidTestCase extends TestCase { + private static final String TEST_EXCLUDES = "test.excludes"; + private static final String TEST_EXCLUDELIST = "test.excludelist"; + private static final String TEST_EXCLUDEFILES = "test.excludefiles"; public static final String QPID_HOME = System.getProperty("QPID_HOME"); public static final String TEST_RESOURCES_DIR = QPID_HOME + "/../test-profiles/test_resources/"; + public static final String TEST_PROFILES_DIR = QPID_HOME + "/../test-profiles/"; public static final String TMP_FOLDER = System.getProperty("java.io.tmpdir"); public static final String LOG4J_CONFIG_FILE_PATH = System.getProperty("log4j.configuration.file"); @@ -64,8 +68,19 @@ public class QpidTestCase extends TestCase if (Boolean.getBoolean("test.exclude")) { _logger.info("Some tests should be excluded, building the exclude list"); - String exclusionListURIs = System.getProperties().getProperty("test.excludefiles", ""); - String exclusionListString = System.getProperties().getProperty("test.excludelist", ""); + String exclusionListURIs = System.getProperty(TEST_EXCLUDEFILES, ""); + String exclusionListString = System.getProperty(TEST_EXCLUDELIST, ""); + String testExcludes = System.getProperty(TEST_EXCLUDES); + + //For the maven build, process the test.excludes property + if(testExcludes != null && exclusionListURIs == "") + { + for (String exclude : testExcludes.split("\\s+")) + { + exclusionListURIs += TEST_PROFILES_DIR + "/" + exclude + ";"; + } + } + List<String> exclusionList = new ArrayList<String>(); for (String uri : exclusionListURIs.split(";\\s*")) |
