The test (at least locally) fails on the long shell line detection in
`master`, as the EDBG UART adapter drops chars when more than 64 bytes
are send at a time. This works around the issue:
- The line buffer in the test is reduced to 60 bytes, so that
overflowing it becomes possible with sending less than 64 bytes.
- The test script is adapted to exceed the shell buffer size by one
byte only (due to linefeed char), rather than significantly.
- Sending more than 64 bytes would result in the linefeed being
dropped by the EDBG adapter and the test failing
Finally, the shell buffer is no longer allocated on the stack and,
hence, the main stack size could be reduced a bit. The test still
passes on the Nucleo-F767ZI which is notorious in failing on tight
stacks due to the MPU stack guard - so the stack size reduction is
expected to work for all boards.
Add ATmega328P Xplained Mini board. The board is an official
development kit from MCHP based on the Arduino UNO, reduced
hardware, with a xplainedmini debugger and CDC ACM serial
converter.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Ctrl-D was not caught in a special case so it was interpreted as
a standard character. Handle it now the same way like EOF and
terminate the shell instance.
Introduce optional user shell_post_readline_hook, shell_pre_command_hook, shell_post_command_hook.
Enable with USEMODULE=shell_hooks.
Calls user implemented *_hook functions if defined.
If implementation does not exist, nothing happens.
The intent is to make profiling of the shell command timings easier.
Test provided in tests/shell with USEMODULE=shell_hooks.
Divide test cases in to groups and add test cases for:
- multiple spaces between arguments
- tabs between arguments
- leading/trailing spaces
- more simple variations for escaping
- multiple tests for correct quoting
A second occurence of the test case "('help', EXPECTED_HELP),"
was removed.
Check that single and double quotes work, along with backslash escaping
and that malformed strings are rejected.
Right now the test is failing. The next commit will replace the tokenizer
with one that works correctly.
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
Test erasing characters using backspace. The test is not really testing
a lot right now, because the host is still line buffering.
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
The test for the line cancellation (ctrl-c) functionality was unable to
detect error because of the way pexpect matches output.
While working on the long line shell bug, a regression was about to be
introduced because of this. This commit fixes the test by directly reading from
the child process and expects an exact response.
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
Previously, the test would start sending the first test commands right
at the beginning. This fails on boards whose UART is not ready at that
point.
This PR makes the test script explicitly wait for the prompt to be
ready.
- Define test_utils_interactive_sync as DEFAULT_MODULE in Makefile.tests_common
- For tests disabling autoinit, add test_utils_interactive_sync to main
- Add DISABLE_MODULE += test_utils_interactive_sync for tests requiring
sudo, `tests/shell`, `tests/minimal` and `tests/stdin`
- Add shell_commands to tests/periph_wdt and tests/struct_tm_utility to
pull `r` and `s` commands
- Remove includes and usage in `tests/main.c` for tests that where
already using test_utils_interactive_sync
Python dictionaries are not guaranteed to be ordered until version
3.7. In 3.6 they are ordered too, but that is an implementation
detail. riotdocker seems to be using 3.5.
As it stands now, it would not be a problem if the test commands
are run in a random order, except that:
- It would result in non-reproduceable tests.
- It hinders testing other functionality, such as exiting the shell.
For test scripts, a terminal that does not modify the input and output
streams, configured without local echo, is preferred as it ensures the
test setup is introducing as little noise as possible.
Added arduino-nano to BOARD_INSUFFICIENT_MEMORY/BOARD_BLACKLIST following suit
of how arduino-uno is marked, as arduino-nano is mostly an Uno in a different
form factor.