mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
tests: panic: make 'get_test_name' work without VFS, add echo
When vfs component is not added to the build, bare minimum syscalls are provided by newlib component. These syscalls currently don't perform CR/LF translation. This commit makes the 'get_test_name' function work with minimal syscalls and also adds echo, so that the user sees what they type.
This commit is contained in:
parent
77b754b47f
commit
89e78976ab
@ -194,12 +194,17 @@ static const char* get_test_name(void)
|
||||
c = getchar();
|
||||
if (c == EOF) {
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
} else if (c == '\r') {
|
||||
continue;
|
||||
} else if (c == '\n') {
|
||||
} else if ((c == '\r' || c == '\n') && p != test_name_str) {
|
||||
/* terminate the line */
|
||||
puts("\n\r");
|
||||
fflush(stdout);
|
||||
*p = '\0';
|
||||
break;
|
||||
} else {
|
||||
/* echo the received character */
|
||||
putchar(c);
|
||||
fflush(stdout);
|
||||
/* and save it */
|
||||
*p = c;
|
||||
++p;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user