File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ def after_scenario(context, scenario):
4545
4646
4747def _find_tower_binary ():
48+ if binary := os .environ .get ("TOWER_CLI_BINARY" ):
49+ if Path (binary ).exists ():
50+ return binary
51+
4852 # Look for debug build first
4953 debug_path = (
5054 Path (__file__ ).parent .parent .parent .parent / "target" / "debug" / "tower"
Original file line number Diff line number Diff line change @@ -103,7 +103,8 @@ def start_mock_server():
103103
104104def main ():
105105 """Run the integration tests."""
106- # Check prerequisites - look for tower binary from cargo build or on PATH
106+ # Check prerequisites - look for tower binary from env, cargo build, or PATH
107+ has_env_binary = bool (os .environ .get ("TOWER_CLI_BINARY" ) and Path (os .environ ["TOWER_CLI_BINARY" ]).exists ())
107108 project_root = Path (__file__ ).parent .parent .parent
108109 has_cargo_binary = any (
109110 (project_root / "target" / build / "tower" ).exists ()
@@ -115,7 +116,7 @@ def main():
115116 else False
116117 )
117118
118- if not has_cargo_binary and not has_path_binary :
119+ if not has_env_binary and not has_cargo_binary and not has_path_binary :
119120 log (
120121 "ERROR: Tower binary not found. Please run 'cargo build' or 'maturin develop' first."
121122 )
You can’t perform that action at this time.
0 commit comments