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.
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`.
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`.
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>
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.
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.
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.