Skip to content

Commit

Permalink
Update path finding to main app in library mode
Browse files Browse the repository at this point in the history
  • Loading branch information
agrojean-ledger committed Feb 8, 2024
1 parent 063cd2c commit bf7c43b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ragger/conftest/base_conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,14 @@ def prepare_speculos_args(root_pytest_dir: Path, firmware: Firmware, display: bo
project_root_dir = find_project_root_dir(root_pytest_dir)

# Find the standalone application for the requested device
app_path = find_main_application(project_root_dir / conf.OPTIONAL.APP_DIR, device)
app_path = None
if conf.OPTIONAL.LOAD_MAIN_APP_AS_LIBRARY:
app_dir_children = list((project_root_dir / conf.OPTIONAL.APP_DIR).iterdir())
if len(app_dir_children) != 1:
raise ValueError(f"Expected a single folder in {conf.OPTIONAL.APP_DIR}, found {len(app_dir_children)}")
app_path = find_main_application(app_dir_children[0], device)
else:
app_path = find_main_application(project_root_dir / conf.OPTIONAL.APP_DIR, device)

# Find all libraries that have to be sideloaded
if conf.OPTIONAL.LOAD_MAIN_APP_AS_LIBRARY:
Expand Down

0 comments on commit bf7c43b

Please sign in to comment.