Merge pull request #11821 from rajkan01/feature-baremetal-greentea-psa

Skip Bare Metal green tea test for PSA component
pull/11870/head
Martin Kojtal 2019-11-12 11:07:16 +01:00 committed by GitHub
commit d556bf698f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 61 additions and 0 deletions

View File

@ -18,7 +18,9 @@
#include "greentea-client/test_env.h"
#include "unity.h"
#include "utest.h"
#if defined(MBED_CONF_RTOS_PRESENT)
#include "rtos.h"
#endif
using namespace utest::v1;

View File

@ -16,6 +16,10 @@
* limitations under the License.
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA attestation test cases require RTOS to run.
#else
#include "psa/crypto.h"
#if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
@ -157,3 +161,4 @@ int main()
}
#endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -16,6 +16,10 @@
* limitations under the License.
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] ITS/PS test cases require RTOS to run.
#else
#ifndef TARGET_PSA
#error [NOT_SUPPORTED] ITS/PS tests can run only on PSA-enabled targets.
#else
@ -239,3 +243,4 @@ int main()
}
#endif // TARGET_PSA
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,9 +1,13 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance attestation test cases require RTOS to run.
#else
void test_entry_a001(val_api_t *val_api, psa_api_t *psa_api);
int main(void)
{
test_start(test_entry_a001, COMPLIANCE_TEST_ATTESTATION);
}
#endif

View File

@ -1,6 +1,10 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s001(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
@ -15,3 +19,4 @@ int main(void)
test_start(test_entry_p001, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,6 +1,9 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#include "lifecycle.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s002(val_api_t *val_api, psa_api_t *psa_api);
@ -16,3 +19,4 @@ int main(void)
test_start(test_entry_p002, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,5 +1,8 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s004(val_api_t *val_api, psa_api_t *psa_api);
@ -15,3 +18,4 @@ int main(void)
test_start(test_entry_p004, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,6 +1,10 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s005(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
@ -15,3 +19,4 @@ int main(void)
test_start(test_entry_p005, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,6 +1,10 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s006(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
@ -15,3 +19,4 @@ int main(void)
test_start(test_entry_p006, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,6 +1,10 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s007(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
@ -15,3 +19,4 @@ int main(void)
test_start(test_entry_p007, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,6 +1,10 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s008(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
@ -15,3 +19,4 @@ int main(void)
test_start(test_entry_p008, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,6 +1,10 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s009(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
@ -15,3 +19,4 @@ int main(void)
test_start(test_entry_p009, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -1,6 +1,10 @@
#include "val_interfaces.h"
#include "pal_mbed_os_intf.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] PSA compliance its test cases require RTOS to run
#else
#ifdef ITS_TEST
void test_entry_s010(val_api_t *val_api, psa_api_t *psa_api);
#elif PS_TEST
@ -15,3 +19,4 @@ int main(void)
test_start(test_entry_p010, COMPLIANCE_TEST_STORAGE);
#endif
}
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -135,9 +135,11 @@ int test_start(test_entry_f test_f, compliance_test_type type)
{
test_g = test_f;
type_g = type;
#if defined(MBED_CONF_RTOS_PRESENT)
MBED_ASSERT((type > COMPLIANCE_TEST_START) && (type < COMPLIANCE_TEST_END));
Thread thread(osPriorityNormal, TEST_STACK_SIZE, NULL);
thread.start(main_wrapper);
thread.join();
#endif
return 0;
}