tests: Exclude version suite when used as a submodule
The version test suite is duplicated between Mbed TLS and Mbed Crypto. Use TLS's copy and not Crypto's copy when Crypto is used as a submodule of TLS. The version test is the only test that is tested from both TLS and Crypto, despite being entirely in libmbedcrypto. This is because the test data is code-gen'd from the version updating script and the version between Mbed TLS and Mbed Crypto don't necessarily always agree. The test data must come from the top level module, as only the top level module will have test data that matches the expected version.
This commit is contained in:
parent
120d571e8e
commit
1264c2a86f
@ -138,8 +138,10 @@ add_test_suite(psa_crypto_storage_file)
|
||||
add_test_suite(shax)
|
||||
add_test_suite(timing)
|
||||
add_test_suite(rsa)
|
||||
add_test_suite(version)
|
||||
add_test_suite(xtea)
|
||||
if (NOT USE_CRYPTO_SUBMODULE)
|
||||
add_test_suite(version)
|
||||
endif()
|
||||
|
||||
# Make scripts and data files needed for testing available in an
|
||||
# out-of-source build.
|
||||
|
@ -59,6 +59,15 @@ endif
|
||||
# constructed by stripping path 'suites/' and extension .data.
|
||||
APPS = $(basename $(subst suites/,,$(wildcard suites/test_suite_*.data)))
|
||||
|
||||
# When this project is used as a submodule, exclude the following list of
|
||||
# tests, which will be run from the parent module instead.
|
||||
ifdef USE_CRYPTO_SUBMODULE
|
||||
APPS := $(filter-out \
|
||||
test_suite_version \
|
||||
,$(APPS))
|
||||
endif
|
||||
|
||||
|
||||
# Construct executable name by adding OS specific suffix $(EXEXT).
|
||||
BINARIES := $(addsuffix $(EXEXT),$(APPS))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user