diff --git a/tests/include/test/build_info.h b/tests/include/test/build_info.h new file mode 100644 index 000000000..cb8b809b1 --- /dev/null +++ b/tests/include/test/build_info.h @@ -0,0 +1,24 @@ +/** + * \file test/build_info.h + * + * \brief Common things for all Mbed TLS and TF-PSA-Crypto test headers. + * + * Include this header first in all headers in `include/test/`. + */ + +/* + * Copyright The Mbed TLS Contributors + * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + */ + +#ifndef TEST_BUILD_INFO_H +#define TEST_BUILD_INFO_H + +#include + +/* Most fields of publicly available structs are private and are wrapped with + * MBEDTLS_PRIVATE macro. This define allows tests to access the private fields + * directly (without using the MBEDTLS_PRIVATE wrapper). */ +#define MBEDTLS_ALLOW_PRIVATE_ACCESS + +#endif /* TEST_BUILD_INFO_H */ diff --git a/tests/include/test/test_common.h b/tests/include/test/test_common.h index baab6671c..aaeb1e7c8 100644 --- a/tests/include/test/test_common.h +++ b/tests/include/test/test_common.h @@ -3,8 +3,7 @@ * * \brief Common things for all Mbed TLS and TF-PSA-Crypto test code. * - * Include this header first in all headers in `include/test/`. - * Include this or another header from `include/test/` in all test C files. + * Include this header first in all test C files. */ /* @@ -24,11 +23,8 @@ #define __USE_MINGW_ANSI_STDIO 1 #endif -#include - -/* Most fields of publicly available structs are private and are wrapped with - * MBEDTLS_PRIVATE macro. This define allows tests to access the private fields - * directly (without using the MBEDTLS_PRIVATE wrapper). */ -#define MBEDTLS_ALLOW_PRIVATE_ACCESS +/* Make sure we have the library configuration, and anything else that + * is deemed necessary in test headers. */ +#include #endif /* TEST_TEST_COMMON_H */