Add debug prints to triage the test timeouts

pull/9296/head
Senthil Ramakrishnan 2019-01-22 16:37:13 -06:00
parent 62d6eb5673
commit 815066f853
1 changed files with 5 additions and 0 deletions

View File

@ -53,12 +53,17 @@ void test_crash_reporting()
// Report readiness
greentea_send_kv(MSG_KEY_DEVICE_READY, MSG_VALUE_DUMMY);
printf("\nMessage sent: %s\n", MSG_KEY_DEVICE_READY);
static char _key[MSG_KEY_LEN + 1] = { };
static char _value[MSG_VALUE_LEN + 1] = { };
printf("\nWaiting for crash inject error message: %s\n", MSG_KEY_DEVICE_ERROR);
greentea_parse_kv(_key, _value, MSG_KEY_LEN, MSG_VALUE_LEN);
printf("\nCrash inject error message received\n");
if (strcmp(_key, MSG_KEY_DEVICE_ERROR) == 0) {
printf("\nForcing error\n");
MBED_ERROR1(MBED_ERROR_OUT_OF_MEMORY, "Executing crash reporting test.", 0xDEADBAD);
TEST_ASSERT_MESSAGE(0, "crash_reporting() error call failed.");
}