Code clean-up
This commit is contained in:
parent
9d2649b77b
commit
3b7a26fa3e
4 changed files with 22 additions and 30 deletions
|
|
@ -33,7 +33,7 @@ void testcase_register(const testcase_t *testcase)
|
|||
testcases_alloc += 1;
|
||||
testcases = realloc(testcases, testcases_alloc * sizeof(testcase_t));
|
||||
if(!testcases) {
|
||||
printf("Failed to reallocate test case register length %d\n",
|
||||
printf("Failed to reallocate test case register length %d\n",
|
||||
testcases_alloc);
|
||||
testcases_count = 0;
|
||||
testcases_alloc = 0;
|
||||
|
|
@ -42,13 +42,14 @@ void testcase_register(const testcase_t *testcase)
|
|||
memcpy(&testcases[testcases_count++], testcase, sizeof(testcase_t));
|
||||
}
|
||||
|
||||
static void test_task(void *pvParameters)
|
||||
void user_init(void)
|
||||
{
|
||||
uart_set_baud(0, 115200);
|
||||
sdk_wifi_set_opmode(NULL_MODE);
|
||||
printf("esp-open-rtos test runner.\n");
|
||||
printf("%d test cases are defined:\n\n", testcases_count);
|
||||
for(int i = 0; i < testcases_count; i++) {
|
||||
printf("CASE %d = %s %s\n", i, testcases[i].name,
|
||||
printf("CASE %d = %s %s\n", i, testcases[i].name,
|
||||
get_requirements_name(testcases[i].type));
|
||||
}
|
||||
|
||||
|
|
@ -118,13 +119,4 @@ static void test_task(void *pvParameters)
|
|||
testcase.a_fn();
|
||||
else
|
||||
testcase.b_fn();
|
||||
/* TEST_FAIL_MESSAGE("\n\nTest initialisation routine returned" */
|
||||
/* " without calling TEST_PASS. Buggy test?"); */
|
||||
}
|
||||
|
||||
void user_init(void)
|
||||
{
|
||||
sdk_wifi_set_opmode(NULL_MODE);
|
||||
test_task(0);
|
||||
/* xTaskCreate(test_task, (signed char *)"test_task", 512, NULL, 2, NULL); */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue