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

22 Commits

Author SHA1 Message Date
3989cd79ff
treewide: fix path to shell related tests in doc 2023-05-13 18:27:58 +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
84e2881d18
dist/testrunner: fix flake8 issue E741
E741: ambiguous variable name
2021-01-07 19:11:20 +01:00
Martine S. Lenders
1cb0e09d88
tests: add capability to provide make command via environment
For those tests that don't use the tooling fixed in the previous commit
2020-07-09 10:59:01 +02:00
Martine S. Lenders
da3fdd33d1
tools: add capability to provide make command via environment
Not all operating systems name the GNU Make `make`. FreeBSD e.g. uses a
different dialect of Make, that seems to be incompatible with GNU make.
(I wasn't able to get `make` run, but `gmake` works).

This allows our test scripts to be configured via the environment
variable `MAKE` to point to a different make command.
2020-07-08 09:36:36 +02:00
Martine S. Lenders
aee9f09386
testrunner: use SIGKILL only as last resort
When the child has a clean-up step (closing files, killing
sub-processes, deleting operational files, etc.), this currently is not
executed by the test, as the `testrunner` just does a hard `SIGKILL`
for the child's PPID. This change makes this a `SIGTERM` and only uses
`SIGKILL` if there are still processes lingering a second after the
`SIGTERM`.
2020-04-28 19:42:07 +02:00
Leandro Lanzieri
98fd746656
dist/testrunner: Capture number of unittests that passed 2020-04-03 14:52:48 +02:00
fb643b348b
dist/testrunner: add common function to check unittests 2020-03-19 10:39:33 +01:00
a91c4bf7e6
dist/testrunner: add optional delay before opening serial
This option is null by default but is useful when used with boards exposing their stdio over USB
2020-03-18 10:53:17 +01:00
Francisco Molina
a31003a23c
tests: add interactive_sync adapted to shell 2020-03-17 17:23:27 +01:00
c6a2b39a0b
testrunner: allow setting custom delay before reset
On some boards, such as hifive1b, resetting right after flashing could crash the running firmware
2020-01-10 08:34:17 +01:00
Francisco Molina
a77594a348 dist/pythonlibs/testrunner: reset before term
For some boards `make reset` is only possible if a serial connection
is not already open or its execution might disrupt it. This
causes some tests to fail since before running a test the board
is reset.

`make reset` is currently used as a synchronization mechanism between
the application and the test script. With `test_utils_interactive_sync`
this is no longer needed so call `make reset` before `cleanterm` instead
of after when `test_utils_interactive_sync` is used.

Allow setting TESTRUNNER_RESET_AFTER_TERM=1 to keep the previous
behaviour for `examples/%/tests`.
2019-12-19 09:32:37 +01:00
55ef046728
dist/testrunner: make interactive test retries/delay configurable 2019-12-12 09:44:16 +01:00
Gaëtan Harter
eb9cb198a0 testrunner: auto sync with test_utils_interactive_sync if present
Automatically call the test_utils_interactive_sync synchronization if it
is used.
2019-11-27 15:07:42 +01:00
Gaëtan Harter
c75d5120b4
testrunner: use 'cleanterm' for testing
Use a clean terminal without added decoration on the output for testing.
2019-10-01 14:13:02 +02:00
Gaëtan Harter
e5e9d81cce
testrunner/utils: add helper for test_utils_interactive_sync
Add helper to do the synchronisation.
2019-08-15 12:26:28 +02:00
sanjuprakashk
d30bd7ae47 dist/pythinlibs/testrunner: dynamic changing of test timeout
Few flashers require a longer time to flash code and reset the device and
requires the test script to wait for a longer time before timing out.
This commit adds a environment variable "RIOT_TEST_TIMEOUT"  that can be
set by the user to vary the timeout in accordance to the requirements
of the system

on-behalf-of: @sparkmeter <sanju.kannioth@sparkmeter.io>
2019-07-17 06:25:28 -07:00
Gaëtan Harter
731dcfc319
testrunner: disable local echo
When local echo is enabled, pexpect will also match on send lines to the
node. So could think a node is echoing when it is only seeing the sent
message.
The sent messages are still written to `logfile` but now only once.

This may show issues with our current tests implementation that expected
this behavior.
2019-03-04 13:26:53 +01:00
Martine Lenders
4b5b5d910b dist/pythonlibs: provide unittest TestCase wrapper for testrunner
I had this idea when implementing #10382 and #10392 as I introduced a
very similar structure to python's standard unittests in those and it
could also reduce some code duplication between those two tests.
2019-01-29 21:16:39 +01:00
Martine Lenders
b2407e4583 dist/pythonlibs: expose functions to setup/teardown pexpect spawn
This allows for re-usability of those functions in other contexts.
2019-01-29 20:41:49 +01:00
cladmi
921afa0820
testrunner: fix script when RIOTBASE is not defined
If not defined it was raising a KeyError. Use the 'get' function to
handle non defined value.

It did not put the value in the `default` case as it would have changed
the behavior when `RIOTBASE` is defined but empty.
2019-01-21 12:19:34 +01:00
smlng
dd9a43bdc9 dist: move testrunner to pythonlibs as package
As testrunner is moved to dist/pythonlibs which is exported
via PYTHONPATH, testrunner is found by all test scripts.
2018-08-13 14:11:22 +02:00