Fix entropy_inject test compilation

Include to crypto.h file will fail on targets without TARGET_PSA support
Moving prerequisites check before include.
pull/8804/head
Alexander Zilberkant 2018-11-27 10:48:42 +02:00 committed by mohammad1603
parent abf1ccc722
commit daeb19d167
1 changed files with 4 additions and 4 deletions

View File

@ -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))