|
24 | 24 | get_pods, |
25 | 25 | pod_log, |
26 | 26 | snapshot_bitcoin_datadir, |
27 | | - wait_for_pod, |
28 | 27 | wait_for_init, |
| 28 | + wait_for_pod, |
29 | 29 | write_file_to_container, |
30 | 30 | ) |
31 | 31 | from .process import run_command, stream_command |
@@ -172,9 +172,11 @@ def get_active_network(namespace): |
172 | 172 | default=False, |
173 | 173 | help="Stream scenario output and delete container when stopped", |
174 | 174 | ) |
175 | | -@click.option("--source_dir", type=click.Path(exists=True, file_okay=False, dir_okay=True), required=False) |
| 175 | +@click.option( |
| 176 | + "--source_dir", type=click.Path(exists=True, file_okay=False, dir_okay=True), required=False |
| 177 | +) |
176 | 178 | @click.argument("additional_args", nargs=-1, type=click.UNPROCESSED) |
177 | | -def run(scenario_file: str, source_dir, additional_args: tuple[str]): |
| 179 | +def run(scenario_file: str, debug: bool, source_dir, additional_args: tuple[str]): |
178 | 180 | """ |
179 | 181 | Run a scenario from a file. |
180 | 182 | Pass `-- --help` to get individual scenario help |
@@ -213,7 +215,10 @@ def run(scenario_file: str, source_dir, additional_args: tuple[str]): |
213 | 215 | def filter(path): |
214 | 216 | if any(needle in str(path) for needle in [".pyc", ".csv", ".DS_Store"]): |
215 | 217 | return False |
216 | | - if any(needle in str(path) for needle in ["__init__.py", "commander.py", "test_framework", scenario_path.name]): |
| 218 | + if any( |
| 219 | + needle in str(path) |
| 220 | + for needle in ["__init__.py", "commander.py", "test_framework", scenario_path.name] |
| 221 | + ): |
217 | 222 | print(f"Including: {path}") |
218 | 223 | return True |
219 | 224 | return False |
@@ -280,6 +285,8 @@ def filter(path): |
280 | 285 | print(f"Successfully uploaded scenario data to commander: {scenario_name}") |
281 | 286 |
|
282 | 287 | if debug: |
| 288 | + print("Waiting for commander pod to start...") |
| 289 | + wait_for_pod(name) |
283 | 290 | _logs(pod_name=name, follow=True) |
284 | 291 | print("Deleting pod...") |
285 | 292 | delete_pod(name) |
|
0 commit comments