Create infrastructure for metadata validation unit tests

This commit is contained in:
Gilles Peskine 2018-08-21 18:20:20 +02:00
parent daea26f70f
commit 44fed61e01
4 changed files with 23 additions and 0 deletions

View file

@ -15,10 +15,12 @@ PYTHON ?= python
APPS := \ APPS := \
test_suite_psa_crypto \ test_suite_psa_crypto \
test_suite_psa_crypto_metadata \
# Don't delete this line. # Don't delete this line.
# Look up for associated function files # Look up for associated function files
func.test_suite_psa_crypto := test_suite_psa_crypto func.test_suite_psa_crypto := test_suite_psa_crypto
func.test_suite_psa_crypto_metadata := test_suite_psa_crypto_metadata
.SILENT: .SILENT:
@ -52,6 +54,7 @@ clean:
rm -rf data_files/ctr_drbg_seed data_files/hmac_drbg_seed data_files/mpi_write rm -rf data_files/ctr_drbg_seed data_files/hmac_drbg_seed data_files/mpi_write
test: $(APPS) test: $(APPS)
./test_suite_psa_crypto_metadata
./test_suite_psa_crypto ./test_suite_psa_crypto
# Create separate targets for generating embedded tests. # Create separate targets for generating embedded tests.

View file

@ -150,6 +150,8 @@ TEST_FILES := \
tests/suites/target_test.function \ tests/suites/target_test.function \
tests/suites/test_suite_psa_crypto.data \ tests/suites/test_suite_psa_crypto.data \
tests/suites/test_suite_psa_crypto.function \ tests/suites/test_suite_psa_crypto.function \
tests/suites/test_suite_psa_crypto_metadata.data \
tests/suites/test_suite_psa_crypto_metadata.function \
# Don't delete this line. # Don't delete this line.
OTHER_FILES := \ OTHER_FILES := \

View file

@ -0,0 +1,18 @@
/* BEGIN_HEADER */
/* Test macros that provide metadata about algorithms and key types.
* This test suite only contains tests that don't require executing
* code. Other test suites validate macros that require creating a key
* and using it. */
#if defined(MBEDTLS_PSA_CRYPTO_SPM)
#include "spm/psa_defs.h"
#endif
#include "psa/crypto.h"
/* END_HEADER */
/* BEGIN_DEPENDENCIES
* depends_on:MBEDTLS_PSA_CRYPTO_C
* END_DEPENDENCIES
*/