Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/infra/e2e_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def cli_args(
"-b",
"--binary-dir",
help="Path to CCF binaries (cchost, scurl, keygenerator)",
default=".",
default="../build",
)
Comment on lines 66 to 70
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the default --binary-dir to ../build makes the CLI default dependent on the caller's current working directory being tests/ (or similar). This is likely to break existing workflows that invoke these scripts from the build directory (where -b . used to work without specifying it) or from an installed tree. Consider deriving the default from the script location and/or probing common candidate directories (e.g. prefer . if it contains keygenerator.sh, else fall back), rather than hard-coding a relative path.

Copilot uses AI. Check for mistakes.
parser.add_argument(
"--library-dir",
Expand Down
2 changes: 1 addition & 1 deletion tests/infra/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def __init__(

for host in self.hosts:
self.create_node(
host, version=self.version, node_data_json_file=node_data_json_file
host, binary_dir=binary_dir, version=self.version, node_data_json_file=node_data_json_file
)

def _get_next_local_node_id(self):
Expand Down
7 changes: 5 additions & 2 deletions tests/infra/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def __init__(
self.BIN = infra.path.build_bin_path(self.BIN, binary_dir=binary_dir)
# 7.x releases combined binaries and removed the separate cchost entry-point
if major_version is None or major_version >= 7:
Comment on lines 377 to 378
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decision to override self.BIN based solely on major_version >= 7 conflicts with the later version-based CLI logic which still adds --enclave-file for versions <= 7.0.0-dev1. For tags like ccf-7.0.0-dev0/dev1 (see CHANGELOG), this would make the node try to execute enclave_file as the host binary even though these versions still require the cchost entry-point plus --enclave-file. Consider selecting the entry-point based on the parsed full version (the same threshold used for the --enclave-file flag) rather than major_version alone, so 7.0.0-dev0/dev1 keep using cchost.

Suggested change
# 7.x releases combined binaries and removed the separate cchost entry-point
if major_version is None or major_version >= 7:
# 7.x releases combined binaries and removed the separate cchost entry-point.
# Use the same full-version threshold as the CLI logic which drops --enclave-file:
# only versions strictly greater than 7.0.0-dev1 use the combined binary as entry-point.
if "version" in locals() and version is not None:
if version > Version("7.0.0-dev1"):
self.BIN = infra.path.build_bin_path(
enclave_file, binary_dir=binary_dir
)
elif major_version is None or major_version >= 7:
# Fallback for callers which only provide major_version

Copilot uses AI. Check for mistakes.
self.BIN = enclave_file
self.BIN = infra.path.build_bin_path(enclave_file, binary_dir=binary_dir)

self.common_dir = common_dir
self.pub_host = host.get_primary_interface().public_host
Expand Down Expand Up @@ -554,7 +554,10 @@ def __init__(

json.dump(j, f, indent=2)

exe_files += [self.BIN, enclave_file] + self.DEPS
exe_files += [self.BIN]
if major_version is not None and major_version < 7:
exe_files += [enclave_file]
exe_files += self.DEPS
data_files += [self.ledger_dir] if self.ledger_dir else []
data_files += [self.snapshots_dir] if self.snapshots_dir else []
data_files += (
Expand Down
Loading