Skip to content

Commit daeb19d

Browse files
Alexander Zilberkantmohammad1603
authored andcommitted
Fix entropy_inject test compilation
Include to crypto.h file will fail on targets without TARGET_PSA support Moving prerequisites check before include.
1 parent abf1ccc commit daeb19d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

TESTS/psa/entropy_inject/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
* limitations under the License.
1717
*/
1818

19+
#if ((!defined(TARGET_PSA) || (!defined(COMPONENT_PSA_SRV_IPC)) && !defined(MBEDTLS_ENTROPY_NV_SEED)))
20+
#error [NOT_SUPPORTED] PSA entropy injection tests can run only on PSA-enabled targets.
21+
#endif // TARGET_PSA
22+
1923
#include "greentea-client/test_env.h"
2024
#include "unity/unity.h"
2125
#include "utest/utest.h"
@@ -25,10 +29,6 @@
2529
#include "entropy_poll.h"
2630
#include "crypto.h"
2731

28-
#if ((!defined(TARGET_PSA) || (!defined(COMPONENT_PSA_SRV_IPC)) && !defined(MBEDTLS_ENTROPY_NV_SEED)))
29-
#error [NOT_SUPPORTED] PSA entropy injection tests can run only on PSA-enabled targets.
30-
#endif // TARGET_PSA
31-
3232
/* MAX value support macro */
3333
#if !defined(MAX)
3434
#define MAX(a,b) (((a)>(b))?(a):(b))

0 commit comments

Comments
 (0)