You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2020/01/30 08:27:01 UTC
[cassandra] branch cassandra-2.2 updated: Allow end-user to
configure dtest jar path
This is an automated email from the ASF dual-hosted git repository.
marcuse pushed a commit to branch cassandra-2.2
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cassandra-2.2 by this push:
new 37828ee Allow end-user to configure dtest jar path
37828ee is described below
commit 37828ee05cb622caaf7366a7cd550544f6cdc14b
Author: Doug Rohrer <do...@therohrers.org>
AuthorDate: Tue Jan 7 13:05:15 2020 -0500
Allow end-user to configure dtest jar path
Patch by Doug Rohrer; reviewed by David Capwell and marcuse for CASSANDRA-15489
---
.../org/apache/cassandra/distributed/impl/Versions.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/test/distributed/org/apache/cassandra/distributed/impl/Versions.java b/test/distributed/org/apache/cassandra/distributed/impl/Versions.java
index 8e8e284..d5d6e7d 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/Versions.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/Versions.java
@@ -35,6 +35,7 @@ import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.cassandra.config.Config;
import org.apache.cassandra.utils.FBUtilities;
public class Versions
@@ -145,13 +146,15 @@ public class Versions
public static Versions find()
{
- logger.info("Looking for dtest jars in " + new File("build").getAbsolutePath());
+ final String dtestJarDirectory = System.getProperty(Config.PROPERTY_PREFIX + "test.dtest_jar_path","build");
+ final File sourceDirectory = new File(dtestJarDirectory);
+ logger.info("Looking for dtest jars in " + sourceDirectory.getAbsolutePath());
final Pattern pattern = Pattern.compile("dtest-(?<fullversion>(\\d+)\\.(\\d+)(\\.\\d+)?(\\.\\d+)?)([~\\-]\\w[.\\w]*(?:\\-\\w[.\\w]*)*)?(\\+[.\\w]+)?\\.jar");
final Map<Major, List<Version>> versions = new HashMap<>();
for (Major major : Major.values())
versions.put(major, new ArrayList<>());
- for (File file : new File("build").listFiles())
+ for (File file : sourceDirectory.listFiles())
{
Matcher m = pattern.matcher(file.getName());
if (!m.matches())
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org