diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d04d0a2..d9dd82b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.14.4] - 2024-02-21 + +### Fixed +- Fix search tree for main app binary in library mode + ## [1.14.3] - 2024-02-09 ### Changed diff --git a/src/ragger/conftest/base_conftest.py b/src/ragger/conftest/base_conftest.py index 2b00f281..e6ecbb0d 100644 --- a/src/ragger/conftest/base_conftest.py +++ b/src/ragger/conftest/base_conftest.py @@ -122,12 +122,13 @@ def prepare_speculos_args(root_pytest_dir: Path, firmware: Firmware, display: bo # project_root_dir / conf.OPTIONAL.APP_DIR. There should be only one subfolder in the path. 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: + app_dir_content = list((project_root_dir / conf.OPTIONAL.APP_DIR).iterdir()) + app_dir_subdirectories = [child for child in app_dir_content if child.is_dir()] + if len(app_dir_subdirectories) != 1: raise ValueError( - f"Expected a single folder in {conf.OPTIONAL.APP_DIR}, found {len(app_dir_children)}" + f"Expected a single folder in {conf.OPTIONAL.APP_DIR}, found {len(app_dir_subdirectories)}" ) - app_path = find_main_application(app_dir_children[0], device) + app_path = find_main_application(app_dir_subdirectories[0], device) # If the app is standalone, the main app should be located in project_root_dir / conf.OPTIONAL.APP_DIR else: app_path = find_main_application(project_root_dir / conf.OPTIONAL.APP_DIR, device) diff --git a/tests/unit/conftests/test_base_conftest.py b/tests/unit/conftests/test_base_conftest.py index ddd0d275..52125526 100644 --- a/tests/unit/conftests/test_base_conftest.py +++ b/tests/unit/conftests/test_base_conftest.py @@ -15,6 +15,8 @@ def prepare_base_dir(directory: Path) -> Tuple[Path, Path]: (directory / "deps" / "dep" / "build" / "stax" / "bin").mkdir(parents=True, exist_ok=True) dep_path = (directory / "deps" / "dep" / "build" / "stax" / "bin" / "app.elf") dep_path.touch() + token_file_path = (directory / "deps" / ".ethereum_application_build_goes_there") + token_file_path.touch() app_path = (directory / "build" / "stax" / "bin" / "app.elf") app_path.touch() return app_path, dep_path