diff --git a/input_files/extra_info.json b/input_files/extra_info.json index 46c7322..c372a98 100644 --- a/input_files/extra_info.json +++ b/input_files/extra_info.json @@ -116,6 +116,10 @@ "build_blacklist": ["nanos", "nanosp", "nanox", "stax"], "test_blacklist": ["nanos", "nanosp", "nanox", "stax"] }, + { + "name": "app-boilerplate-vierzon", + "test_blacklist": ["nanos", "nanosp", "nanox", "stax"] + }, { "name": "app-btec", "build_blacklist": ["stax"], @@ -388,7 +392,8 @@ }, { "name": "app-mina", - "test_dir": "tests" + "test_dir": "tests", + "extra_flags": "RELEASE_BUILD=0" }, { "name": "app-mobilecoin", @@ -710,7 +715,10 @@ }, { "name": "app-security-key", - "test_dir": "tests/speculos" + "test_dir": "tests/speculos", + "test_blacklist": ["stax"], + "test_param_nanosp": "--fast", + "test_param_nanox": "--transport HID --fast" }, { "name": "app-sia", diff --git a/input_files/input.json b/input_files/input.json index 2cb796e..7bc274b 100644 --- a/input_files/input.json +++ b/input_files/input.json @@ -710,6 +710,7 @@ "name": "app-boilerplate-vierzon", "owner": "LedgerHQ", "ref": "master", + "test_blacklist": ["nanos", "nanosp", "nanox", "stax"], "url": "https://github.com/LedgerHQ/app-boilerplate-vierzon", "variant_param": "COIN", "variants_nanos": [ @@ -2337,6 +2338,7 @@ "ref": "develop", "url": "https://github.com/LedgerHQ/app-mina", "test_dir": "tests", + "extra_flags": "RELEASE_BUILD=0", "variant_param": "COIN", "variants_nanos": [ "mina" @@ -4016,7 +4018,12 @@ "owner": "LedgerHQ", "ref": "develop", "url": "https://github.com/LedgerHQ/app-security-key", + "test_blacklist": [ + "stax" + ], "test_dir": "tests/speculos", + "test_param_nanosp": "--fast", + "test_param_nanox": "--transport HID --fast", "variant_param": "APP", "variants_nanox": [ "SecurityKey" diff --git a/scripts/build_and_test/test_app.py b/scripts/build_and_test/test_app.py index 0119f36..82e6dd6 100644 --- a/scripts/build_and_test/test_app.py +++ b/scripts/build_and_test/test_app.py @@ -3,9 +3,9 @@ from build_app import build_variant from utils import run_cmd -def test(model: str, app_test_path: Path, app_build_path: Path): +def test(model: str, app_test_path: Path, app_build_path: Path, test_params: str): output = {} - error = run_cmd(f"pytest {app_test_path}/ --tb=short -v --device {model}", cwd=app_build_path, no_throw=True) + error = run_cmd(f"pytest {app_test_path}/ --tb=short -v --device {model} {test_params}", cwd=app_build_path, no_throw=True) if (error): output = "Fail" @@ -19,7 +19,8 @@ def install_dependencies(app_test_path: Path): error = run_cmd("pip install -r requirements.txt", cwd=app_test_path, no_throw=True) return error -def test_device(device: Device, variant_param: str, app_build_path: Path, app_test_path: Path, sdk_path: Path, extra_flags: str, blacklist: str): +def test_device(device: Device, variant_param: str, app_build_path: Path, app_test_path: Path, + sdk_path: Path, extra_flags: str, blacklist: str, test_params: str): test_output = {} if not device.selected: @@ -35,7 +36,7 @@ def test_device(device: Device, variant_param: str, app_build_path: Path, app_te if build_variant(device.target_name, sdk_path, "", "", app_build_path, extra_flags): return "Fail" - test_output = test(device.model_name, app_test_path, app_build_path) + test_output = test(device.model_name, app_test_path, app_build_path, test_params) print(test_output) return test_output @@ -56,18 +57,22 @@ def test_all_devices(devices: Devices, sdk_path: Path, app_json: dict, workdir: blacklist = app_json.get(f"test_blacklist", []) + test_params = app_json.get("test_param_nanos", "") nanos_output = test_device(devices.nanos, variant_param, app_build_path, app_test_path, - sdk_path, extra_flags, blacklist) + sdk_path, extra_flags, blacklist, test_params) + test_params = app_json.get("test_param_nanosp", "") nanosp_output = test_device(devices.nanosp, variant_param, app_build_path, app_test_path, - sdk_path, extra_flags, blacklist) + sdk_path, extra_flags, blacklist, test_params) + test_params = app_json.get("test_param_nanox", "") nanox_output = test_device(devices.nanox, variant_param, app_build_path, app_test_path, - sdk_path, extra_flags, blacklist) + sdk_path, extra_flags, blacklist, test_params) + test_params = app_json.get("test_param_stax", "") stax_output = test_device(devices.stax, variant_param, app_build_path, app_test_path, - sdk_path, extra_flags, blacklist) + sdk_path, extra_flags, blacklist, test_params) if nanos_output: output["test"]["nanos"] = nanos_output