From daeb19d167bb138fbf3457210ce8db650a0eaa4b Mon Sep 17 00:00:00 2001 From: Alexander Zilberkant Date: Tue, 27 Nov 2018 10:48:42 +0200 Subject: [PATCH] Fix entropy_inject test compilation Include to crypto.h file will fail on targets without TARGET_PSA support Moving prerequisites check before include. --- TESTS/psa/entropy_inject/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TESTS/psa/entropy_inject/main.cpp b/TESTS/psa/entropy_inject/main.cpp index 365c289af0..d382623415 100644 --- a/TESTS/psa/entropy_inject/main.cpp +++ b/TESTS/psa/entropy_inject/main.cpp @@ -16,6 +16,10 @@ * limitations under the License. */ +#if ((!defined(TARGET_PSA) || (!defined(COMPONENT_PSA_SRV_IPC)) && !defined(MBEDTLS_ENTROPY_NV_SEED))) +#error [NOT_SUPPORTED] PSA entropy injection tests can run only on PSA-enabled targets. +#endif // TARGET_PSA + #include "greentea-client/test_env.h" #include "unity/unity.h" #include "utest/utest.h" @@ -25,10 +29,6 @@ #include "entropy_poll.h" #include "crypto.h" -#if ((!defined(TARGET_PSA) || (!defined(COMPONENT_PSA_SRV_IPC)) && !defined(MBEDTLS_ENTROPY_NV_SEED))) -#error [NOT_SUPPORTED] PSA entropy injection tests can run only on PSA-enabled targets. -#endif // TARGET_PSA - /* MAX value support macro */ #if !defined(MAX) #define MAX(a,b) (((a)>(b))?(a):(b))