1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

68 Commits

Author SHA1 Message Date
Marian Buschsieweke
12140ffb0e
examples,tests: Drop redundant dependency
When depending on one or more shell commands, the shell is pulled in
as dependency anyway.
2023-04-19 16:58:10 +02:00
Marian Buschsieweke
7e58bea1bd
examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
Marian Buschsieweke
e95f7551eb
tests/shell: fix failure on samr21-xpro
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.
2022-11-11 23:00:58 +01:00
Marian Buschsieweke
a04b0a01a2
examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
Marian Buschsieweke
97f2033d47
tests/shell: update expected help list 2022-06-07 09:25:06 +02:00
Marian Buschsieweke
5ea582b3dd
sys/shell_commands: convert to SHELL_COMMAND()
Make use of XFA for shell commands
2022-06-07 09:25:04 +02:00
031ed1e813
Merge pull request #17434 from kaspar030/murdock_use_emulators
murdock: support emulated boards
2022-04-06 14:41:48 +02:00
c4bba0e65d tests/*: CI blacklist microbit where it fails 2022-04-01 13:42:01 +02:00
Francisco Molina
5397b4f783 tests/shell: remove z1 socat workaround 2022-03-28 08:53:27 +02:00
Hendrik van Essen
7ab13448ef tests/shell_ble: add variant of shell test for stdio_nimble 2022-01-28 19:26:38 +01:00
Gerson Fernando Budke
4a9f0efb6d boards: introduce atmega328p-xplained-mini
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>
2021-03-27 14:10:19 -03:00
f454cb7a24 tests/shell: uncrustify main.c 2021-03-09 11:50:46 +01:00
5975fabd9f tests/shell: add tests for XFA shell commands 2021-03-02 14:57:29 +01:00
MrKevinWeiss
03dc2ba09a tests/shell: Add Kconfig defaults 2021-02-22 14:58:09 +01:00
Martine Lenders
bd96e4b400
tests/shell: add command with empty output 2021-02-09 17:17:25 +01:00
cf154a587a
tests/shell: fix flake8 errors in Python script 2020-11-03 15:38:27 +01:00
Hendrik van Essen
7a775ecc4c tests/shell: better naming for test categories
One test was removed, because the intended test case is
already covered by check_line_exceeded
2020-10-21 17:42:55 +02:00
Hendrik van Essen
aead3162ec sys/shell: terminate shell on Ctrl-D
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.
2020-10-21 17:40:44 +02:00
f08f582f1a tests, examples: remove chronos references 2020-08-05 14:32:58 +02:00
0904d77dff tests/shell: allow not using socat, do so on z1 2020-08-04 12:37:10 +02:00
2b9d15c9f6 tests/shell: add blacklist for check_line_exceeded(), add z1 2020-07-27 15:17:04 +02:00
MrKevinWeiss
04630d20ba sys/shell: Add optional hooks for shell commands
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.
2020-07-07 17:00:38 +02:00
0ccf94fa23 tests/shell: don't expect idle thread in ps output 2020-06-25 16:02:29 +02:00
Hendrik van Essen
cbf5cc5327 tests/shell: refactor test file and add several new test cases
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.
2020-06-23 13:51:19 +02:00
Hendrik van Essen
dd2ad603e8 tests/shell: test quoting and escaping
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>
2020-05-18 14:02:58 +02:00
Hendrik van Essen
013af64a80 tests/shell: add test case for line editing
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>
2020-04-14 15:38:56 +02:00
Hendrik van Essen
a9b21ed911
tests/shell: remove redundant parentheses 2020-03-30 12:26:23 +02:00
Hendrik van Essen
68a35f53de
tests/shell: add test case for exceeding lines
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-03-30 12:26:23 +02:00
Hendrik van Essen
8a8416a6f6
tests/shell: fix test case for line cancelling
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>
2020-03-30 12:26:22 +02:00
Hendrik van Essen
c1e3e613a5
tests/shell: check for shell prompt
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-03-30 12:26:22 +02:00
Hendrik van Essen
32d7c9b6b8
tests/shell: check for startup message
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-03-30 12:26:21 +02:00
Hendrik van Essen
393eadcfb9
tests/shell: avoid sending an extra empty line on native
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-03-30 12:26:21 +02:00
Hendrik van Essen
c8daf596c9
tests/shell: add test case for shell's buffer size
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2020-03-30 12:26:21 +02:00
Francisco Molina
e0855dedfd
tests: remove uneeded DISABLE_MODULE+=auto_init 2020-02-12 16:51:34 +01:00
8aca5c2f40 tests/shell: wait for prompt at beginning
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.
2019-12-16 14:12:45 +01:00
Francisco Molina
4117b459af tests/shell: fix reset dependency 2019-12-12 10:13:33 +01:00
Francisco Molina
416c048737 tests: add test_utils_interactive_sync when possible
- 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
2019-11-27 15:07:42 +01:00
Marian Buschsieweke
06d560f408
tests: Added atmega328p to Makefile.ci
Added the atmega328p board to the BOARD_INSUFFICIENT_MEMORY list where needed.
2019-10-21 12:54:46 +02:00
Marian Buschsieweke
fd6fedaab6
tests: BOARD_INSUFFICIENT_MEMORY -> Makefile.ci
- Moved the BOARD_INSUFFICIENT_MEMORY list into Makefile.ci
- Formatted the list to contain one board per line
- Sorted the lists alphabetically
2019-10-17 15:11:59 +02:00
Gaëtan Harter
8e5422ff78
applications: remove 'TEST_ON_CI_WHITELIST += all'
This is now the default so not required anymore.
2019-08-21 12:51:17 +02:00
Juan Carrano
2946f4b192 tests/shell: Test cancelling a line with ctrl-C.
Send garbage, cancel it and issue a valid command. No errors should
ocurr.
2019-08-15 17:40:17 +02:00
Juan Carrano
3f46863426 tests/shell: use tuple instead of dictionary in test scripts.
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.
2019-08-15 17:13:42 +02:00
Juan Carrano
cdfece682f tests/shell: Use socat as the RIOT_TERMINAL.
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.
2019-08-15 17:12:54 +02:00
Leandro Lanzieri
859250c66f tests/shell: Init xtimer when stdio_rtt is used 2019-05-29 17:18:30 +02:00
Marian Buschsieweke
855b5bd54d
tests: Updated BOARD_INSUFFICIENT_MEMORY
Added arduino-leonardo to BOARD_INSUFFICIENT_MEMORY where needed
2019-05-24 17:57:44 +02:00
Marian Buschsieweke
0e90e6195f
tests: Updated Updated BOARD_INSUFFICIENT_MEMORY
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.
2019-03-14 15:39:54 +01:00
MrKevinWeiss
c36cf5743f tests/shell: Add app_metadata to shell tests
Adds app_metadata to the shell test
This both serves as a simple test to see if the module is available
and doesn't crash as well as an example
2019-03-06 13:07:57 +01:00
472bd0ae01 tests: remove obsolete local test targets 2018-09-07 15:13:08 +02:00
smlng
3893f04d00 tests: move testrunner import up
Testrunner is now impported as a package found in PYTHONPATH, so
import can be placed at the top of the script as usual.
2018-08-13 14:11:24 +02:00
smlng
f9824abedb tests: remove unused os package import
os package is imported by every test script but only used by
a few, thus flake8 check reported errors.
2018-08-13 14:11:23 +02:00