From 1ab369b00fd963ff56ebdc0c2e06f68927bb6795 Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Wed, 20 Dec 2023 11:20:25 +0100 Subject: [PATCH] [test] Moving C and Python tests in dedicated directories --- CMakeLists.txt | 2 +- tests/c/CMakeLists.txt | 5 ++ tests/c/syscalls/CMakeLists.txt | 30 +++++++++ tests/{ => c}/syscalls/cavp/blake2b_kat.data | 0 .../syscalls/cavp/groestl_224_long_msg.data | 0 .../syscalls/cavp/groestl_224_short_msg.data | 0 .../syscalls/cavp/groestl_256_long_msg.data | 0 .../syscalls/cavp/groestl_256_short_msg.data | 0 .../syscalls/cavp/groestl_384_long_msg.data | 0 .../syscalls/cavp/groestl_384_short_msg.data | 0 .../syscalls/cavp/groestl_512_long_msg.data | 0 .../syscalls/cavp/groestl_512_short_msg.data | 0 tests/{ => c}/syscalls/cavp/hmac.data | 0 .../syscalls/cavp/keccak_224_long_msg.data | 0 .../syscalls/cavp/keccak_224_short_msg.data | 0 .../syscalls/cavp/keccak_256_long_msg.data | 0 .../syscalls/cavp/keccak_256_short_msg.data | 0 .../syscalls/cavp/keccak_384_long_msg.data | 0 .../syscalls/cavp/keccak_384_short_msg.data | 0 .../syscalls/cavp/keccak_512_long_msg.data | 0 .../syscalls/cavp/keccak_512_short_msg.data | 0 .../syscalls/cavp/sha224_long_msg.data | 0 .../syscalls/cavp/sha224_short_msg.data | 0 .../syscalls/cavp/sha256_long_msg.data | 0 .../syscalls/cavp/sha256_short_msg.data | 0 .../syscalls/cavp/sha384_long_msg.data | 0 .../syscalls/cavp/sha384_short_msg.data | 0 .../syscalls/cavp/sha3_224_long_msg.data | 0 .../syscalls/cavp/sha3_224_short_msg.data | 0 .../syscalls/cavp/sha3_256_long_msg.data | 0 .../syscalls/cavp/sha3_256_short_msg.data | 0 .../syscalls/cavp/sha3_384_long_msg.data | 0 .../syscalls/cavp/sha3_384_short_msg.data | 0 .../syscalls/cavp/sha3_512_long_msg.data | 0 .../syscalls/cavp/sha3_512_short_msg.data | 0 .../syscalls/cavp/sha512_long_msg.data | 0 .../syscalls/cavp/sha512_short_msg.data | 0 .../syscalls/cavp/shake128_long_msg.data | 0 .../syscalls/cavp/shake128_short_msg.data | 0 .../cavp/shake128_variable_output.data | 0 .../syscalls/cavp/shake256_long_msg.data | 0 .../syscalls/cavp/shake256_short_msg.data | 0 .../cavp/shake256_variable_output.data | 0 tests/{ => c}/syscalls/hello.c | 0 tests/{ => c}/syscalls/nist_cavp.c | 0 tests/{ => c}/syscalls/nist_cavp.h | 0 tests/{ => c}/syscalls/test_aes.c | 0 tests/{ => c}/syscalls/test_bip32.c | 0 tests/{ => c}/syscalls/test_blake2.c | 0 tests/{ => c}/syscalls/test_bls.c | 0 tests/{ => c}/syscalls/test_bn.c | 0 tests/{ => c}/syscalls/test_crc16.c | 0 tests/{ => c}/syscalls/test_ec.c | 0 tests/{ => c}/syscalls/test_ecdh.c | 0 tests/{ => c}/syscalls/test_ecdsa.c | 0 tests/{ => c}/syscalls/test_ecpoint.c | 0 tests/{ => c}/syscalls/test_eddsa.c | 0 tests/{ => c}/syscalls/test_eip2333.c | 0 tests/{ => c}/syscalls/test_endorsement.c | 0 tests/{ => c}/syscalls/test_hmac.c | 0 tests/{ => c}/syscalls/test_math.c | 0 tests/{ => c}/syscalls/test_mpi_rng.c | 0 .../test_os_global_pin_is_validated.c | 0 tests/{ => c}/syscalls/test_rfc6979.c | 0 tests/{ => c}/syscalls/test_ripemd.c | 0 tests/{ => c}/syscalls/test_sha2.c | 0 tests/{ => c}/syscalls/test_sha3.c | 0 tests/{ => c}/syscalls/test_slip21.c | 0 tests/{ => c}/syscalls/utils.c | 0 tests/{ => c}/syscalls/utils.h | 2 +- tests/{ => c}/syscalls/wycheproof/X25519.data | 0 tests/{ => c}/syscalls/wycheproof/X448.data | 0 .../syscalls/wycheproof/ecdh_secp256k1.data | 0 tests/{ => c}/syscalls/wycheproof/eddsa.data | 0 tests/{ => python}/__init__.py | 0 .../api/resources/automation.json | 0 tests/{ => python}/api/test_api.py | 20 +----- tests/{ => python}/apps/__init__.py | 0 tests/{ => python}/apps/resources/__init__.py | 0 .../apps/resources/btc_getpubkey_blue.json | 0 .../apps/resources/btc_getpubkey_blue.png | Bin .../apps/resources/btc_getpubkey_nanos.json | 0 .../apps/resources/btc_getpubkey_nanos.png | Bin .../apps/resources/btc_getpubkey_nanosp.json | 0 .../apps/resources/btc_getpubkey_nanosp.png | Bin .../apps/resources/btc_getpubkey_nanox.json | 0 .../apps/resources/btc_getpubkey_nanox.png | Bin tests/{ => python}/apps/test_btc.py | 0 tests/{ => python}/apps/test_btc_testnet.py | 0 tests/{ => python}/apps/test_ram_page.py | 0 tests/{ => python}/apps/test_vnc.py | 0 tests/{apps => python}/conftest.py | 58 ++++++++++-------- .../automation_invalid_action_args.json | 0 .../automation_invalid_action_name.json | 0 .../automation_invalid_rule_key.json | 0 .../mcu/resources/automation_valid.json | 0 tests/{ => python}/mcu/test_automation.py | 0 tests/{ => python}/pytest.ini | 0 tests/{ => python}/unit/__init__.py | 0 tests/{ => python}/unit/test_client_Api.py | 0 .../unit/test_client_SpeculosClient.py | 0 tests/syscalls/CMakeLists.txt | 32 ---------- 102 files changed, 70 insertions(+), 79 deletions(-) create mode 100644 tests/c/CMakeLists.txt create mode 100644 tests/c/syscalls/CMakeLists.txt rename tests/{ => c}/syscalls/cavp/blake2b_kat.data (100%) rename tests/{ => c}/syscalls/cavp/groestl_224_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/groestl_224_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/groestl_256_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/groestl_256_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/groestl_384_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/groestl_384_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/groestl_512_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/groestl_512_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/hmac.data (100%) rename tests/{ => c}/syscalls/cavp/keccak_224_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/keccak_224_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/keccak_256_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/keccak_256_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/keccak_384_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/keccak_384_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/keccak_512_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/keccak_512_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha224_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha224_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha256_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha256_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha384_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha384_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha3_224_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha3_224_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha3_256_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha3_256_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha3_384_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha3_384_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha3_512_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha3_512_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha512_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/sha512_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/shake128_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/shake128_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/shake128_variable_output.data (100%) rename tests/{ => c}/syscalls/cavp/shake256_long_msg.data (100%) rename tests/{ => c}/syscalls/cavp/shake256_short_msg.data (100%) rename tests/{ => c}/syscalls/cavp/shake256_variable_output.data (100%) rename tests/{ => c}/syscalls/hello.c (100%) rename tests/{ => c}/syscalls/nist_cavp.c (100%) rename tests/{ => c}/syscalls/nist_cavp.h (100%) rename tests/{ => c}/syscalls/test_aes.c (100%) rename tests/{ => c}/syscalls/test_bip32.c (100%) rename tests/{ => c}/syscalls/test_blake2.c (100%) rename tests/{ => c}/syscalls/test_bls.c (100%) rename tests/{ => c}/syscalls/test_bn.c (100%) rename tests/{ => c}/syscalls/test_crc16.c (100%) rename tests/{ => c}/syscalls/test_ec.c (100%) rename tests/{ => c}/syscalls/test_ecdh.c (100%) rename tests/{ => c}/syscalls/test_ecdsa.c (100%) rename tests/{ => c}/syscalls/test_ecpoint.c (100%) rename tests/{ => c}/syscalls/test_eddsa.c (100%) rename tests/{ => c}/syscalls/test_eip2333.c (100%) rename tests/{ => c}/syscalls/test_endorsement.c (100%) rename tests/{ => c}/syscalls/test_hmac.c (100%) rename tests/{ => c}/syscalls/test_math.c (100%) rename tests/{ => c}/syscalls/test_mpi_rng.c (100%) rename tests/{ => c}/syscalls/test_os_global_pin_is_validated.c (100%) rename tests/{ => c}/syscalls/test_rfc6979.c (100%) rename tests/{ => c}/syscalls/test_ripemd.c (100%) rename tests/{ => c}/syscalls/test_sha2.c (100%) rename tests/{ => c}/syscalls/test_sha3.c (100%) rename tests/{ => c}/syscalls/test_slip21.c (100%) rename tests/{ => c}/syscalls/utils.c (100%) rename tests/{ => c}/syscalls/utils.h (80%) rename tests/{ => c}/syscalls/wycheproof/X25519.data (100%) rename tests/{ => c}/syscalls/wycheproof/X448.data (100%) rename tests/{ => c}/syscalls/wycheproof/ecdh_secp256k1.data (100%) rename tests/{ => c}/syscalls/wycheproof/eddsa.data (100%) rename tests/{ => python}/__init__.py (100%) rename tests/{ => python}/api/resources/automation.json (100%) rename tests/{ => python}/api/test_api.py (89%) rename tests/{ => python}/apps/__init__.py (100%) rename tests/{ => python}/apps/resources/__init__.py (100%) rename tests/{ => python}/apps/resources/btc_getpubkey_blue.json (100%) rename tests/{ => python}/apps/resources/btc_getpubkey_blue.png (100%) rename tests/{ => python}/apps/resources/btc_getpubkey_nanos.json (100%) rename tests/{ => python}/apps/resources/btc_getpubkey_nanos.png (100%) rename tests/{ => python}/apps/resources/btc_getpubkey_nanosp.json (100%) rename tests/{ => python}/apps/resources/btc_getpubkey_nanosp.png (100%) rename tests/{ => python}/apps/resources/btc_getpubkey_nanox.json (100%) rename tests/{ => python}/apps/resources/btc_getpubkey_nanox.png (100%) rename tests/{ => python}/apps/test_btc.py (100%) rename tests/{ => python}/apps/test_btc_testnet.py (100%) rename tests/{ => python}/apps/test_ram_page.py (100%) rename tests/{ => python}/apps/test_vnc.py (100%) rename tests/{apps => python}/conftest.py (67%) rename tests/{ => python}/mcu/resources/automation_invalid_action_args.json (100%) rename tests/{ => python}/mcu/resources/automation_invalid_action_name.json (100%) rename tests/{ => python}/mcu/resources/automation_invalid_rule_key.json (100%) rename tests/{ => python}/mcu/resources/automation_valid.json (100%) rename tests/{ => python}/mcu/test_automation.py (100%) rename tests/{ => python}/pytest.ini (100%) rename tests/{ => python}/unit/__init__.py (100%) rename tests/{ => python}/unit/test_client_Api.py (100%) rename tests/{ => python}/unit/test_client_SpeculosClient.py (100%) delete mode 100644 tests/syscalls/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 3045800a..0050d705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,7 +136,7 @@ link_libraries(ssl crypto dl blst) add_subdirectory(src) if (BUILD_TESTING) - add_subdirectory(tests/syscalls) + add_subdirectory(tests/c/) endif() add_custom_target( diff --git a/tests/c/CMakeLists.txt b/tests/c/CMakeLists.txt new file mode 100644 index 00000000..7179fdb8 --- /dev/null +++ b/tests/c/CMakeLists.txt @@ -0,0 +1,5 @@ +add_definitions(-DST31) +link_libraries(emu -lcmocka-static) + + +add_subdirectory(syscalls) diff --git a/tests/c/syscalls/CMakeLists.txt b/tests/c/syscalls/CMakeLists.txt new file mode 100644 index 00000000..8447b456 --- /dev/null +++ b/tests/c/syscalls/CMakeLists.txt @@ -0,0 +1,30 @@ +add_executable(hello hello.c) + +add_executable(test_syscall_aes test_aes.c nist_cavp.c utils.c) +add_executable(test_syscall_bip32 test_bip32.c utils.c) +add_executable(test_syscall_blake2 test_blake2.c nist_cavp.c utils.c) +add_executable(test_syscall_bls test_bls.c utils.c) +add_executable(test_syscall_bn test_bn.c) +add_executable(test_syscall_crc16 test_crc16.c) +add_executable(test_syscall_ecdh test_ecdh.c utils.c) +add_executable(test_syscall_ecdsa test_ecdsa.c utils.c) +add_executable(test_syscall_ec test_ec.c utils.c) +add_executable(test_syscall_ecpoint test_ecpoint.c utils.c) +add_executable(test_syscall_eddsa test_eddsa.c utils.c) +add_executable(test_syscall_eip2333 test_eip2333.c utils.c) +add_executable(test_syscall_endorsement test_endorsement.c) +add_executable(test_syscall_hmac test_hmac.c utils.c) +add_executable(test_syscall_math test_math.c) +add_executable(test_syscall_mpi_rng test_mpi_rng.c utils.c) +add_executable(test_syscall_os_global_pin_is_validated test_os_global_pin_is_validated.c) +add_executable(test_syscall_rfc6979 test_rfc6979.c utils.c) +add_executable(test_syscall_ripemd test_ripemd.c utils.c) +add_executable(test_syscall_sha2 test_sha2.c nist_cavp.c utils.c) +add_executable(test_syscall_sha3 test_sha3.c nist_cavp.c utils.c) +add_executable(test_syscall_slip21 test_slip21.c) + +add_test(NAME jello COMMAND qemu-arm-static hello WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +foreach(target aes bip32 blake2 bls bn crc16 ec ecpoint ecdh ecdsa eddsa endorsement hmac + math os_global_pin_is_validated rfc6979 ripemd sha2 sha3 slip21 eip2333) + add_test(NAME test_syscall_${target} COMMAND qemu-arm-static test_syscall_${target} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +endforeach() diff --git a/tests/syscalls/cavp/blake2b_kat.data b/tests/c/syscalls/cavp/blake2b_kat.data similarity index 100% rename from tests/syscalls/cavp/blake2b_kat.data rename to tests/c/syscalls/cavp/blake2b_kat.data diff --git a/tests/syscalls/cavp/groestl_224_long_msg.data b/tests/c/syscalls/cavp/groestl_224_long_msg.data similarity index 100% rename from tests/syscalls/cavp/groestl_224_long_msg.data rename to tests/c/syscalls/cavp/groestl_224_long_msg.data diff --git a/tests/syscalls/cavp/groestl_224_short_msg.data b/tests/c/syscalls/cavp/groestl_224_short_msg.data similarity index 100% rename from tests/syscalls/cavp/groestl_224_short_msg.data rename to tests/c/syscalls/cavp/groestl_224_short_msg.data diff --git a/tests/syscalls/cavp/groestl_256_long_msg.data b/tests/c/syscalls/cavp/groestl_256_long_msg.data similarity index 100% rename from tests/syscalls/cavp/groestl_256_long_msg.data rename to tests/c/syscalls/cavp/groestl_256_long_msg.data diff --git a/tests/syscalls/cavp/groestl_256_short_msg.data b/tests/c/syscalls/cavp/groestl_256_short_msg.data similarity index 100% rename from tests/syscalls/cavp/groestl_256_short_msg.data rename to tests/c/syscalls/cavp/groestl_256_short_msg.data diff --git a/tests/syscalls/cavp/groestl_384_long_msg.data b/tests/c/syscalls/cavp/groestl_384_long_msg.data similarity index 100% rename from tests/syscalls/cavp/groestl_384_long_msg.data rename to tests/c/syscalls/cavp/groestl_384_long_msg.data diff --git a/tests/syscalls/cavp/groestl_384_short_msg.data b/tests/c/syscalls/cavp/groestl_384_short_msg.data similarity index 100% rename from tests/syscalls/cavp/groestl_384_short_msg.data rename to tests/c/syscalls/cavp/groestl_384_short_msg.data diff --git a/tests/syscalls/cavp/groestl_512_long_msg.data b/tests/c/syscalls/cavp/groestl_512_long_msg.data similarity index 100% rename from tests/syscalls/cavp/groestl_512_long_msg.data rename to tests/c/syscalls/cavp/groestl_512_long_msg.data diff --git a/tests/syscalls/cavp/groestl_512_short_msg.data b/tests/c/syscalls/cavp/groestl_512_short_msg.data similarity index 100% rename from tests/syscalls/cavp/groestl_512_short_msg.data rename to tests/c/syscalls/cavp/groestl_512_short_msg.data diff --git a/tests/syscalls/cavp/hmac.data b/tests/c/syscalls/cavp/hmac.data similarity index 100% rename from tests/syscalls/cavp/hmac.data rename to tests/c/syscalls/cavp/hmac.data diff --git a/tests/syscalls/cavp/keccak_224_long_msg.data b/tests/c/syscalls/cavp/keccak_224_long_msg.data similarity index 100% rename from tests/syscalls/cavp/keccak_224_long_msg.data rename to tests/c/syscalls/cavp/keccak_224_long_msg.data diff --git a/tests/syscalls/cavp/keccak_224_short_msg.data b/tests/c/syscalls/cavp/keccak_224_short_msg.data similarity index 100% rename from tests/syscalls/cavp/keccak_224_short_msg.data rename to tests/c/syscalls/cavp/keccak_224_short_msg.data diff --git a/tests/syscalls/cavp/keccak_256_long_msg.data b/tests/c/syscalls/cavp/keccak_256_long_msg.data similarity index 100% rename from tests/syscalls/cavp/keccak_256_long_msg.data rename to tests/c/syscalls/cavp/keccak_256_long_msg.data diff --git a/tests/syscalls/cavp/keccak_256_short_msg.data b/tests/c/syscalls/cavp/keccak_256_short_msg.data similarity index 100% rename from tests/syscalls/cavp/keccak_256_short_msg.data rename to tests/c/syscalls/cavp/keccak_256_short_msg.data diff --git a/tests/syscalls/cavp/keccak_384_long_msg.data b/tests/c/syscalls/cavp/keccak_384_long_msg.data similarity index 100% rename from tests/syscalls/cavp/keccak_384_long_msg.data rename to tests/c/syscalls/cavp/keccak_384_long_msg.data diff --git a/tests/syscalls/cavp/keccak_384_short_msg.data b/tests/c/syscalls/cavp/keccak_384_short_msg.data similarity index 100% rename from tests/syscalls/cavp/keccak_384_short_msg.data rename to tests/c/syscalls/cavp/keccak_384_short_msg.data diff --git a/tests/syscalls/cavp/keccak_512_long_msg.data b/tests/c/syscalls/cavp/keccak_512_long_msg.data similarity index 100% rename from tests/syscalls/cavp/keccak_512_long_msg.data rename to tests/c/syscalls/cavp/keccak_512_long_msg.data diff --git a/tests/syscalls/cavp/keccak_512_short_msg.data b/tests/c/syscalls/cavp/keccak_512_short_msg.data similarity index 100% rename from tests/syscalls/cavp/keccak_512_short_msg.data rename to tests/c/syscalls/cavp/keccak_512_short_msg.data diff --git a/tests/syscalls/cavp/sha224_long_msg.data b/tests/c/syscalls/cavp/sha224_long_msg.data similarity index 100% rename from tests/syscalls/cavp/sha224_long_msg.data rename to tests/c/syscalls/cavp/sha224_long_msg.data diff --git a/tests/syscalls/cavp/sha224_short_msg.data b/tests/c/syscalls/cavp/sha224_short_msg.data similarity index 100% rename from tests/syscalls/cavp/sha224_short_msg.data rename to tests/c/syscalls/cavp/sha224_short_msg.data diff --git a/tests/syscalls/cavp/sha256_long_msg.data b/tests/c/syscalls/cavp/sha256_long_msg.data similarity index 100% rename from tests/syscalls/cavp/sha256_long_msg.data rename to tests/c/syscalls/cavp/sha256_long_msg.data diff --git a/tests/syscalls/cavp/sha256_short_msg.data b/tests/c/syscalls/cavp/sha256_short_msg.data similarity index 100% rename from tests/syscalls/cavp/sha256_short_msg.data rename to tests/c/syscalls/cavp/sha256_short_msg.data diff --git a/tests/syscalls/cavp/sha384_long_msg.data b/tests/c/syscalls/cavp/sha384_long_msg.data similarity index 100% rename from tests/syscalls/cavp/sha384_long_msg.data rename to tests/c/syscalls/cavp/sha384_long_msg.data diff --git a/tests/syscalls/cavp/sha384_short_msg.data b/tests/c/syscalls/cavp/sha384_short_msg.data similarity index 100% rename from tests/syscalls/cavp/sha384_short_msg.data rename to tests/c/syscalls/cavp/sha384_short_msg.data diff --git a/tests/syscalls/cavp/sha3_224_long_msg.data b/tests/c/syscalls/cavp/sha3_224_long_msg.data similarity index 100% rename from tests/syscalls/cavp/sha3_224_long_msg.data rename to tests/c/syscalls/cavp/sha3_224_long_msg.data diff --git a/tests/syscalls/cavp/sha3_224_short_msg.data b/tests/c/syscalls/cavp/sha3_224_short_msg.data similarity index 100% rename from tests/syscalls/cavp/sha3_224_short_msg.data rename to tests/c/syscalls/cavp/sha3_224_short_msg.data diff --git a/tests/syscalls/cavp/sha3_256_long_msg.data b/tests/c/syscalls/cavp/sha3_256_long_msg.data similarity index 100% rename from tests/syscalls/cavp/sha3_256_long_msg.data rename to tests/c/syscalls/cavp/sha3_256_long_msg.data diff --git a/tests/syscalls/cavp/sha3_256_short_msg.data b/tests/c/syscalls/cavp/sha3_256_short_msg.data similarity index 100% rename from tests/syscalls/cavp/sha3_256_short_msg.data rename to tests/c/syscalls/cavp/sha3_256_short_msg.data diff --git a/tests/syscalls/cavp/sha3_384_long_msg.data b/tests/c/syscalls/cavp/sha3_384_long_msg.data similarity index 100% rename from tests/syscalls/cavp/sha3_384_long_msg.data rename to tests/c/syscalls/cavp/sha3_384_long_msg.data diff --git a/tests/syscalls/cavp/sha3_384_short_msg.data b/tests/c/syscalls/cavp/sha3_384_short_msg.data similarity index 100% rename from tests/syscalls/cavp/sha3_384_short_msg.data rename to tests/c/syscalls/cavp/sha3_384_short_msg.data diff --git a/tests/syscalls/cavp/sha3_512_long_msg.data b/tests/c/syscalls/cavp/sha3_512_long_msg.data similarity index 100% rename from tests/syscalls/cavp/sha3_512_long_msg.data rename to tests/c/syscalls/cavp/sha3_512_long_msg.data diff --git a/tests/syscalls/cavp/sha3_512_short_msg.data b/tests/c/syscalls/cavp/sha3_512_short_msg.data similarity index 100% rename from tests/syscalls/cavp/sha3_512_short_msg.data rename to tests/c/syscalls/cavp/sha3_512_short_msg.data diff --git a/tests/syscalls/cavp/sha512_long_msg.data b/tests/c/syscalls/cavp/sha512_long_msg.data similarity index 100% rename from tests/syscalls/cavp/sha512_long_msg.data rename to tests/c/syscalls/cavp/sha512_long_msg.data diff --git a/tests/syscalls/cavp/sha512_short_msg.data b/tests/c/syscalls/cavp/sha512_short_msg.data similarity index 100% rename from tests/syscalls/cavp/sha512_short_msg.data rename to tests/c/syscalls/cavp/sha512_short_msg.data diff --git a/tests/syscalls/cavp/shake128_long_msg.data b/tests/c/syscalls/cavp/shake128_long_msg.data similarity index 100% rename from tests/syscalls/cavp/shake128_long_msg.data rename to tests/c/syscalls/cavp/shake128_long_msg.data diff --git a/tests/syscalls/cavp/shake128_short_msg.data b/tests/c/syscalls/cavp/shake128_short_msg.data similarity index 100% rename from tests/syscalls/cavp/shake128_short_msg.data rename to tests/c/syscalls/cavp/shake128_short_msg.data diff --git a/tests/syscalls/cavp/shake128_variable_output.data b/tests/c/syscalls/cavp/shake128_variable_output.data similarity index 100% rename from tests/syscalls/cavp/shake128_variable_output.data rename to tests/c/syscalls/cavp/shake128_variable_output.data diff --git a/tests/syscalls/cavp/shake256_long_msg.data b/tests/c/syscalls/cavp/shake256_long_msg.data similarity index 100% rename from tests/syscalls/cavp/shake256_long_msg.data rename to tests/c/syscalls/cavp/shake256_long_msg.data diff --git a/tests/syscalls/cavp/shake256_short_msg.data b/tests/c/syscalls/cavp/shake256_short_msg.data similarity index 100% rename from tests/syscalls/cavp/shake256_short_msg.data rename to tests/c/syscalls/cavp/shake256_short_msg.data diff --git a/tests/syscalls/cavp/shake256_variable_output.data b/tests/c/syscalls/cavp/shake256_variable_output.data similarity index 100% rename from tests/syscalls/cavp/shake256_variable_output.data rename to tests/c/syscalls/cavp/shake256_variable_output.data diff --git a/tests/syscalls/hello.c b/tests/c/syscalls/hello.c similarity index 100% rename from tests/syscalls/hello.c rename to tests/c/syscalls/hello.c diff --git a/tests/syscalls/nist_cavp.c b/tests/c/syscalls/nist_cavp.c similarity index 100% rename from tests/syscalls/nist_cavp.c rename to tests/c/syscalls/nist_cavp.c diff --git a/tests/syscalls/nist_cavp.h b/tests/c/syscalls/nist_cavp.h similarity index 100% rename from tests/syscalls/nist_cavp.h rename to tests/c/syscalls/nist_cavp.h diff --git a/tests/syscalls/test_aes.c b/tests/c/syscalls/test_aes.c similarity index 100% rename from tests/syscalls/test_aes.c rename to tests/c/syscalls/test_aes.c diff --git a/tests/syscalls/test_bip32.c b/tests/c/syscalls/test_bip32.c similarity index 100% rename from tests/syscalls/test_bip32.c rename to tests/c/syscalls/test_bip32.c diff --git a/tests/syscalls/test_blake2.c b/tests/c/syscalls/test_blake2.c similarity index 100% rename from tests/syscalls/test_blake2.c rename to tests/c/syscalls/test_blake2.c diff --git a/tests/syscalls/test_bls.c b/tests/c/syscalls/test_bls.c similarity index 100% rename from tests/syscalls/test_bls.c rename to tests/c/syscalls/test_bls.c diff --git a/tests/syscalls/test_bn.c b/tests/c/syscalls/test_bn.c similarity index 100% rename from tests/syscalls/test_bn.c rename to tests/c/syscalls/test_bn.c diff --git a/tests/syscalls/test_crc16.c b/tests/c/syscalls/test_crc16.c similarity index 100% rename from tests/syscalls/test_crc16.c rename to tests/c/syscalls/test_crc16.c diff --git a/tests/syscalls/test_ec.c b/tests/c/syscalls/test_ec.c similarity index 100% rename from tests/syscalls/test_ec.c rename to tests/c/syscalls/test_ec.c diff --git a/tests/syscalls/test_ecdh.c b/tests/c/syscalls/test_ecdh.c similarity index 100% rename from tests/syscalls/test_ecdh.c rename to tests/c/syscalls/test_ecdh.c diff --git a/tests/syscalls/test_ecdsa.c b/tests/c/syscalls/test_ecdsa.c similarity index 100% rename from tests/syscalls/test_ecdsa.c rename to tests/c/syscalls/test_ecdsa.c diff --git a/tests/syscalls/test_ecpoint.c b/tests/c/syscalls/test_ecpoint.c similarity index 100% rename from tests/syscalls/test_ecpoint.c rename to tests/c/syscalls/test_ecpoint.c diff --git a/tests/syscalls/test_eddsa.c b/tests/c/syscalls/test_eddsa.c similarity index 100% rename from tests/syscalls/test_eddsa.c rename to tests/c/syscalls/test_eddsa.c diff --git a/tests/syscalls/test_eip2333.c b/tests/c/syscalls/test_eip2333.c similarity index 100% rename from tests/syscalls/test_eip2333.c rename to tests/c/syscalls/test_eip2333.c diff --git a/tests/syscalls/test_endorsement.c b/tests/c/syscalls/test_endorsement.c similarity index 100% rename from tests/syscalls/test_endorsement.c rename to tests/c/syscalls/test_endorsement.c diff --git a/tests/syscalls/test_hmac.c b/tests/c/syscalls/test_hmac.c similarity index 100% rename from tests/syscalls/test_hmac.c rename to tests/c/syscalls/test_hmac.c diff --git a/tests/syscalls/test_math.c b/tests/c/syscalls/test_math.c similarity index 100% rename from tests/syscalls/test_math.c rename to tests/c/syscalls/test_math.c diff --git a/tests/syscalls/test_mpi_rng.c b/tests/c/syscalls/test_mpi_rng.c similarity index 100% rename from tests/syscalls/test_mpi_rng.c rename to tests/c/syscalls/test_mpi_rng.c diff --git a/tests/syscalls/test_os_global_pin_is_validated.c b/tests/c/syscalls/test_os_global_pin_is_validated.c similarity index 100% rename from tests/syscalls/test_os_global_pin_is_validated.c rename to tests/c/syscalls/test_os_global_pin_is_validated.c diff --git a/tests/syscalls/test_rfc6979.c b/tests/c/syscalls/test_rfc6979.c similarity index 100% rename from tests/syscalls/test_rfc6979.c rename to tests/c/syscalls/test_rfc6979.c diff --git a/tests/syscalls/test_ripemd.c b/tests/c/syscalls/test_ripemd.c similarity index 100% rename from tests/syscalls/test_ripemd.c rename to tests/c/syscalls/test_ripemd.c diff --git a/tests/syscalls/test_sha2.c b/tests/c/syscalls/test_sha2.c similarity index 100% rename from tests/syscalls/test_sha2.c rename to tests/c/syscalls/test_sha2.c diff --git a/tests/syscalls/test_sha3.c b/tests/c/syscalls/test_sha3.c similarity index 100% rename from tests/syscalls/test_sha3.c rename to tests/c/syscalls/test_sha3.c diff --git a/tests/syscalls/test_slip21.c b/tests/c/syscalls/test_slip21.c similarity index 100% rename from tests/syscalls/test_slip21.c rename to tests/c/syscalls/test_slip21.c diff --git a/tests/syscalls/utils.c b/tests/c/syscalls/utils.c similarity index 100% rename from tests/syscalls/utils.c rename to tests/c/syscalls/utils.c diff --git a/tests/syscalls/utils.h b/tests/c/syscalls/utils.h similarity index 80% rename from tests/syscalls/utils.h rename to tests/c/syscalls/utils.h index 39ebde09..6209d0e4 100644 --- a/tests/syscalls/utils.h +++ b/tests/c/syscalls/utils.h @@ -3,7 +3,7 @@ #include #include -#define TESTS_PATH "../../../tests/syscalls/" +#define TESTS_PATH "../../../../tests/c/syscalls/" #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) int hex2num(char c); diff --git a/tests/syscalls/wycheproof/X25519.data b/tests/c/syscalls/wycheproof/X25519.data similarity index 100% rename from tests/syscalls/wycheproof/X25519.data rename to tests/c/syscalls/wycheproof/X25519.data diff --git a/tests/syscalls/wycheproof/X448.data b/tests/c/syscalls/wycheproof/X448.data similarity index 100% rename from tests/syscalls/wycheproof/X448.data rename to tests/c/syscalls/wycheproof/X448.data diff --git a/tests/syscalls/wycheproof/ecdh_secp256k1.data b/tests/c/syscalls/wycheproof/ecdh_secp256k1.data similarity index 100% rename from tests/syscalls/wycheproof/ecdh_secp256k1.data rename to tests/c/syscalls/wycheproof/ecdh_secp256k1.data diff --git a/tests/syscalls/wycheproof/eddsa.data b/tests/c/syscalls/wycheproof/eddsa.data similarity index 100% rename from tests/syscalls/wycheproof/eddsa.data rename to tests/c/syscalls/wycheproof/eddsa.data diff --git a/tests/__init__.py b/tests/python/__init__.py similarity index 100% rename from tests/__init__.py rename to tests/python/__init__.py diff --git a/tests/api/resources/automation.json b/tests/python/api/resources/automation.json similarity index 100% rename from tests/api/resources/automation.json rename to tests/python/api/resources/automation.json diff --git a/tests/api/test_api.py b/tests/python/api/test_api.py similarity index 89% rename from tests/api/test_api.py rename to tests/python/api/test_api.py index a43b3667..1e3fb2a3 100644 --- a/tests/api/test_api.py +++ b/tests/python/api/test_api.py @@ -9,27 +9,9 @@ from speculos.client import SpeculosClient -AppInfo = namedtuple("AppInfo", ["filepath", "device", "name", "version", "hash"]) - -SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) API_URL = "http://127.0.0.1:5000" -@pytest.fixture(scope="class") -def client(request): - """Run the API tests on the default btc.elf app.""" - - app_dir = os.path.join(SCRIPT_DIR, os.pardir, os.pardir, "apps") - filepath = os.path.realpath(os.path.join(app_dir, "btc.elf")) - info = [filepath] + os.path.basename(filepath).split("#") - info = AppInfo(*info) - - args = ["--model", info.device, "--sdk", info.version] - - with SpeculosClient(app=filepath, args=args) as _client: - yield _client - - @pytest.mark.usefixtures("client") class TestApi: @staticmethod @@ -109,7 +91,7 @@ def get_current_screen_content(session): assert re.match(text, event["text"]) texts = [("About",), ("Version", ".*"), ("Bitcoin", "is ready")] - for i in range(0, 3): + for i in range(len(texts)): TestApi.press_button("left") for text in texts[i]: event = get_next_event(stream) diff --git a/tests/apps/__init__.py b/tests/python/apps/__init__.py similarity index 100% rename from tests/apps/__init__.py rename to tests/python/apps/__init__.py diff --git a/tests/apps/resources/__init__.py b/tests/python/apps/resources/__init__.py similarity index 100% rename from tests/apps/resources/__init__.py rename to tests/python/apps/resources/__init__.py diff --git a/tests/apps/resources/btc_getpubkey_blue.json b/tests/python/apps/resources/btc_getpubkey_blue.json similarity index 100% rename from tests/apps/resources/btc_getpubkey_blue.json rename to tests/python/apps/resources/btc_getpubkey_blue.json diff --git a/tests/apps/resources/btc_getpubkey_blue.png b/tests/python/apps/resources/btc_getpubkey_blue.png similarity index 100% rename from tests/apps/resources/btc_getpubkey_blue.png rename to tests/python/apps/resources/btc_getpubkey_blue.png diff --git a/tests/apps/resources/btc_getpubkey_nanos.json b/tests/python/apps/resources/btc_getpubkey_nanos.json similarity index 100% rename from tests/apps/resources/btc_getpubkey_nanos.json rename to tests/python/apps/resources/btc_getpubkey_nanos.json diff --git a/tests/apps/resources/btc_getpubkey_nanos.png b/tests/python/apps/resources/btc_getpubkey_nanos.png similarity index 100% rename from tests/apps/resources/btc_getpubkey_nanos.png rename to tests/python/apps/resources/btc_getpubkey_nanos.png diff --git a/tests/apps/resources/btc_getpubkey_nanosp.json b/tests/python/apps/resources/btc_getpubkey_nanosp.json similarity index 100% rename from tests/apps/resources/btc_getpubkey_nanosp.json rename to tests/python/apps/resources/btc_getpubkey_nanosp.json diff --git a/tests/apps/resources/btc_getpubkey_nanosp.png b/tests/python/apps/resources/btc_getpubkey_nanosp.png similarity index 100% rename from tests/apps/resources/btc_getpubkey_nanosp.png rename to tests/python/apps/resources/btc_getpubkey_nanosp.png diff --git a/tests/apps/resources/btc_getpubkey_nanox.json b/tests/python/apps/resources/btc_getpubkey_nanox.json similarity index 100% rename from tests/apps/resources/btc_getpubkey_nanox.json rename to tests/python/apps/resources/btc_getpubkey_nanox.json diff --git a/tests/apps/resources/btc_getpubkey_nanox.png b/tests/python/apps/resources/btc_getpubkey_nanox.png similarity index 100% rename from tests/apps/resources/btc_getpubkey_nanox.png rename to tests/python/apps/resources/btc_getpubkey_nanox.png diff --git a/tests/apps/test_btc.py b/tests/python/apps/test_btc.py similarity index 100% rename from tests/apps/test_btc.py rename to tests/python/apps/test_btc.py diff --git a/tests/apps/test_btc_testnet.py b/tests/python/apps/test_btc_testnet.py similarity index 100% rename from tests/apps/test_btc_testnet.py rename to tests/python/apps/test_btc_testnet.py diff --git a/tests/apps/test_ram_page.py b/tests/python/apps/test_ram_page.py similarity index 100% rename from tests/apps/test_ram_page.py rename to tests/python/apps/test_ram_page.py diff --git a/tests/apps/test_vnc.py b/tests/python/apps/test_vnc.py similarity index 100% rename from tests/apps/test_vnc.py rename to tests/python/apps/test_vnc.py diff --git a/tests/apps/conftest.py b/tests/python/conftest.py similarity index 67% rename from tests/apps/conftest.py rename to tests/python/conftest.py index 196321e7..0c308da5 100644 --- a/tests/apps/conftest.py +++ b/tests/python/conftest.py @@ -2,20 +2,21 @@ import os import re from collections import namedtuple +from pathlib import Path from typing import List from speculos.client import SpeculosClient -SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) +# going back from...(conftest.py \ python \ tests \ git root) / 'apps' +APP_DIR = Path(__file__).resolve().parent. parent. parent / "apps" AppInfo = namedtuple("AppInfo", ["filepath", "model", "name", "sdk", "hash"]) -def app_info_from_path(path) -> AppInfo: +def app_info_from_path(path: Path) -> AppInfo: # name example: nanos#btc#1.5#5b6693b8.elf app_regexp = re.compile(r"^(nanos|nanox|blue|nanosp)#([^#]+)#([^#][\d\w\-.]+)#([a-f0-9]*)\.elf$") - filename = os.path.basename(path) - matching = re.match(app_regexp, filename) + matching = re.match(app_regexp, path.name) if not matching: return None assert len(matching.groups()) == 4 @@ -23,7 +24,7 @@ def app_info_from_path(path) -> AppInfo: hash=matching.group(4)) -def list_apps_to_test(app_dir) -> List[AppInfo]: +def list_apps_to_test() -> List[AppInfo]: """ List apps matching the pattern: @@ -37,11 +38,10 @@ def list_apps_to_test(app_dir) -> List[AppInfo]: 'apps/nanos#btc#1.5#5b6693b8.elf' """ all_apps = [] - for filename in os.listdir(app_dir): - if "#" not in filename: + for appfile in APP_DIR.iterdir(): + if "#" not in appfile.name: continue - path = os.path.join(app_dir, filename) - info = app_info_from_path(path) + info = app_info_from_path(appfile) if not info: pytest.fail( f"An unexpected file was found in apps/, with a # but not matching the pattern: {filename!r}" @@ -53,25 +53,21 @@ def list_apps_to_test(app_dir) -> List[AppInfo]: @pytest.fixture(scope="function") def app(request, client): - return app_info_from_path(client.app) + return app_info_from_path(Path(client.app)) -def get_apps(name): - """Retrieve the list of apps in the ../apps directory.""" - app_dir = os.path.join(SCRIPT_DIR, os.pardir, os.pardir, "apps") - apps = list_apps_to_test(app_dir) - apps = [app for app in apps if app.name == name] - return apps +def get_apps(name: str) -> List[AppInfo]: + """Retrieve the list of apps in the ../../apps directory.""" + return [app for app in list_apps_to_test() if app.name == name] -def default_btc_app(): - app_dir = os.path.join(SCRIPT_DIR, os.pardir, os.pardir, "apps") - filepath = os.path.realpath(os.path.join(app_dir, "btc.elf")) +def default_btc_app() -> List[AppInfo]: + filepath = (APP_DIR / "btc.elf").resolve() apps = get_apps("btc") - return [app for app in apps if os.path.realpath(app.filepath) == filepath] + return [app for app in apps if app.filepath == filepath] -def idfn(app): +def idfn(app: Path) -> str: """ Set the test ID to the app file name for each test running on a set of apps. @@ -80,14 +76,14 @@ def idfn(app): These IDs can be used with -k to select specific cases to run, and they will also identify the specific case when one is failing. """ - return os.path.basename(app.filepath) + return app.filepath def client_instance(app, additional_args=None): args = ["--model", app.model, "--sdk", app.sdk] if additional_args is not None: args += additional_args - return SpeculosClient(app.filepath, args=args) + return SpeculosClient(str(app.filepath), args=args) @pytest.fixture(scope="module", params=get_apps("btc"), ids=idfn) @@ -99,9 +95,9 @@ def client_btc(request): @pytest.fixture(scope="module", params=get_apps("btc-test"), ids=idfn) def client_btc_testnet(request): app = request.param - btc_app = app.filepath.replace("btc-test", "btc") - assert os.path.exists(btc_app) - args = ["-l", "Bitcoin:%s" % btc_app] + btc_app = app.filepath.parent / app.filepath.name.replace("btc-test", "btc") + assert btc_app.is_file() + args = ["-l", "Bitcoin:%s" % str(btc_app)] with client_instance(request.param, additional_args=args) as _client: yield _client @@ -123,3 +119,13 @@ def client_vnc(request): args = list(get_closest_marker("additional_args").args) with client_instance(request.param, args) as _client: yield _client + + +@pytest.fixture(scope="class") +def client(request): + """Run the API tests on the default btc.elf app.""" + + info = app_info_from_path((APP_DIR / "btc.elf").resolve()) + args = ["--model", info.model, "--sdk", info.sdk] + with SpeculosClient(app=str(info.filepath), args=args) as _client: + yield _client diff --git a/tests/mcu/resources/automation_invalid_action_args.json b/tests/python/mcu/resources/automation_invalid_action_args.json similarity index 100% rename from tests/mcu/resources/automation_invalid_action_args.json rename to tests/python/mcu/resources/automation_invalid_action_args.json diff --git a/tests/mcu/resources/automation_invalid_action_name.json b/tests/python/mcu/resources/automation_invalid_action_name.json similarity index 100% rename from tests/mcu/resources/automation_invalid_action_name.json rename to tests/python/mcu/resources/automation_invalid_action_name.json diff --git a/tests/mcu/resources/automation_invalid_rule_key.json b/tests/python/mcu/resources/automation_invalid_rule_key.json similarity index 100% rename from tests/mcu/resources/automation_invalid_rule_key.json rename to tests/python/mcu/resources/automation_invalid_rule_key.json diff --git a/tests/mcu/resources/automation_valid.json b/tests/python/mcu/resources/automation_valid.json similarity index 100% rename from tests/mcu/resources/automation_valid.json rename to tests/python/mcu/resources/automation_valid.json diff --git a/tests/mcu/test_automation.py b/tests/python/mcu/test_automation.py similarity index 100% rename from tests/mcu/test_automation.py rename to tests/python/mcu/test_automation.py diff --git a/tests/pytest.ini b/tests/python/pytest.ini similarity index 100% rename from tests/pytest.ini rename to tests/python/pytest.ini diff --git a/tests/unit/__init__.py b/tests/python/unit/__init__.py similarity index 100% rename from tests/unit/__init__.py rename to tests/python/unit/__init__.py diff --git a/tests/unit/test_client_Api.py b/tests/python/unit/test_client_Api.py similarity index 100% rename from tests/unit/test_client_Api.py rename to tests/python/unit/test_client_Api.py diff --git a/tests/unit/test_client_SpeculosClient.py b/tests/python/unit/test_client_SpeculosClient.py similarity index 100% rename from tests/unit/test_client_SpeculosClient.py rename to tests/python/unit/test_client_SpeculosClient.py diff --git a/tests/syscalls/CMakeLists.txt b/tests/syscalls/CMakeLists.txt deleted file mode 100644 index 546e591c..00000000 --- a/tests/syscalls/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -add_definitions(-DST31) - -link_libraries(emu -lcmocka-static) - -add_executable(hello hello.c) - -add_executable(test_aes test_aes.c nist_cavp.c utils.c) -add_executable(test_bip32 test_bip32.c utils.c) -add_executable(test_blake2 test_blake2.c nist_cavp.c utils.c) -add_executable(test_bls test_bls.c utils.c) -add_executable(test_bn test_bn.c) -add_executable(test_crc16 test_crc16.c) -add_executable(test_ecdh test_ecdh.c utils.c) -add_executable(test_ecdsa test_ecdsa.c utils.c) -add_executable(test_ec test_ec.c utils.c) -add_executable(test_ecpoint test_ecpoint.c utils.c) -add_executable(test_eddsa test_eddsa.c utils.c) -add_executable(test_eip2333 test_eip2333.c utils.c) -add_executable(test_endorsement test_endorsement.c) -add_executable(test_hmac test_hmac.c utils.c) -add_executable(test_math test_math.c) -add_executable(test_mpi_rng test_mpi_rng.c utils.c) -add_executable(test_os_global_pin_is_validated test_os_global_pin_is_validated.c) -add_executable(test_rfc6979 test_rfc6979.c utils.c) -add_executable(test_ripemd test_ripemd.c utils.c) -add_executable(test_sha2 test_sha2.c nist_cavp.c utils.c) -add_executable(test_sha3 test_sha3.c nist_cavp.c utils.c) -add_executable(test_slip21 test_slip21.c) - -foreach(target hello test_aes test_bip32 test_blake2 test_bls test_bn test_crc16 test_ec test_ecpoint test_ecdh test_ecdsa test_eddsa test_endorsement test_hmac test_math test_os_global_pin_is_validated test_rfc6979 test_ripemd test_sha2 test_sha3 test_slip21 test_eip2333) - add_test(NAME ${target} COMMAND qemu-arm-static ${target} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) -endforeach()