This is an automated email from the ASF dual-hosted git repository. tolbertam pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra-ccm.git
The following commit(s) were added to refs/heads/trunk by this push: new 39b8222 Also copy tools/bin/cassandra.in.sh for tools 39b8222 is described below commit 39b8222b31a6c7afe8fe845d16981088a5a735ad Author: Andy Tolbert <6889771+tolber...@users.noreply.github.com> AuthorDate: Sun Mar 30 15:57:53 2025 -0500 Also copy tools/bin/cassandra.in.sh for tools After CASSANDRA-20328, sstableloader has been updated to be a separate tool residing in the tools directory. Existing dtests using sstableloader rely on make_cassandra_env which copies bin/cassandra.in.sh to the node's directory. As tools/bin/sstableloader now relies on tools/bin/cassandra.in.sh, updates this function to also copy this file to the node's path if it exists. patch by Andy Tolbert; reviewed by Stefan Miklosovic, Michael Semb Wever for CASSANDRA-20328 --- ccmlib/common.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/ccmlib/common.py b/ccmlib/common.py index f705589..7c2055e 100644 --- a/ccmlib/common.py +++ b/ccmlib/common.py @@ -42,6 +42,7 @@ from ccmlib import extension BIN_DIR = "bin" +TOOLS_BIN_DIR = "tools/bin" CASSANDRA_CONF_DIR = "conf" CASSANDRA_CONF = "cassandra.yaml" @@ -394,14 +395,18 @@ def rmdirs(path): def make_cassandra_env(install_dir, node_path, update_conf=True): version_from_build = extension.get_cluster_class(install_dir).getNodeClass().get_version_from_build(node_path=node_path) - if is_win() and version_from_build >= '2.1': - sh_file = os.path.join(CASSANDRA_CONF_DIR, CASSANDRA_WIN_ENV) - else: - sh_file = os.path.join(BIN_DIR, CASSANDRA_SH) - orig = os.path.join(install_dir, sh_file) - dst = os.path.join(node_path, sh_file) - if not is_win() or not os.path.exists(dst): - shutil.copy(orig, dst) + for sh_file_path in [ BIN_DIR, TOOLS_BIN_DIR ]: + if is_win() and version_from_build >= '2.1': + sh_file = os.path.join(CASSANDRA_CONF_DIR, CASSANDRA_WIN_ENV) + else: + sh_file = os.path.join(sh_file_path, CASSANDRA_SH) + + orig = os.path.join(install_dir, sh_file) + if os.path.exists(orig): + dst = os.path.join(node_path, sh_file) + if not is_win() or not os.path.exists(dst): + os.makedirs(os.path.dirname(dst), exist_ok=True) + shutil.copy(orig, dst) if update_conf and not (is_win() and version_from_build >= '2.1'): replacements = [ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org