This changes the behavior of the test script for verifying the `help`
command: It no longer assumes a specific order for the list of commands.
Making the test robust is a bit tricky, as the module
`shell_cmds_default` that is used here may add commands specific to a
set of board. We use `help_json` to get the list of commands actually
provided, so that we know how many rows the command table printed
by `help` need to be parsed.
A minimum set of commands that *must* be present for all boards is
hard-coded in the test script and the actually provided commands are
tested against this. Otherwise e.g. an empty list of commands presented
by `help` and `help_json` would also pass.
Co-authored-by: benpicco <benpicco@googlemail.com>
This fixes:
/home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/tests/sys/shell/tests/01-run.py:86: SyntaxWarning: invalid escape sequence '\e'
Python still assumes `\\<char>` if `\<char>` is not valid, but started
to warn. Chances are good that this will be elevated to an error in
future python releases.