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 hello 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()
