diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 06df85dfe7..e9cae9a9bb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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. diff --git a/tests/Makefile b/tests/Makefile index 50a0549698..8db7920d7c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -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))