Hook the new psa_sim_crypto_{client,server} into the build and tests

- smoke test client.c becomes a trivial call to psa_crypto_init()
- server.c now uses psa_sim_crypto_server.c's psa_crypto_call()
- Makefile is updated to build all the modules, and allow a different MAIN
- all.sh's test_psasim now tests the simulation of psa_hash_compute() too

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
Tom Cosgrove
2024-05-29 10:29:39 +01:00
parent a4952f9450
commit 3ebb880f90
5 changed files with 135 additions and 47 deletions

View File

@@ -6228,6 +6228,15 @@ component_test_psasim() {
msg "test psasim"
tests/psa-client-server/psasim/test/run_test.sh
msg "build psasim to test psa_hash_compute"
# Delete the executable to ensure we build using the right MAIN
rm tests/psa-client-server/psasim/test/psa_client
# API under test: psa_hash_compute()
make -C tests/psa-client-server/psasim CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS" MAIN="aut_psa_hash_compute.c"
msg "test psasim running psa_hash_compute"
tests/psa-client-server/psasim/test/run_test.sh
msg "clean psasim"
make -C tests/psa-client-server/psasim clean
}