- Streamline proj.mk over all projects a little
- Turn the string "jw-build" into a variable which can be overridden from the
environment.
- Add support for JWBDIR_SEARCH_PATH, also overridable from the environment.
Signed-off-by: Jan Lindemann <jan@janware.com>
Remove newlines argument from cmd_exec(), which wasn't honoured
anyway, and replace it with the more generic flags argument in
conjunction with support for the NoWaitForNewline flag, which does
the obvious.
Signed-off-by: Jan Lindemann <jan@janware.com>
Python 3.10 considers get_console unknown after "from devtest.os.test
import *", and "from devtest.os.test import get_console" raises
ImportError: cannot import name 'get_console' from partially
initialized module 'devtest.os.test' (most likely due to a circular
import) (/home/user/local/src/jw.dev/jw-devtest/src/python/devtest/os/test/__init__.py)
This has worked up until Python 3.8.
Solved by changing "from devtest.os.test" to "from .test"
Signed-off-by: Jan Lindemann <jan@janware.com>
Renaming test.test.py to main.py, since Python apparently has a
problem if file names equal module names. This has worked up until
Python 3.8. Python 3.10, however, considers get_console unknown
after "from devtest.os.test import *", and "from devtest.os.test
import get_console" raises
ImportError: cannot import name 'get_console' from partially
initialized module 'devtest.os.test' (most likely due to a circular
import) (/home/user/local/src/jw.dev/jw-devtest/src/python/devtest/os/test/__init__.py)
Solved by renaming test/test.py to test/main.py.
Signed-off-by: Jan Lindemann <jan@janware.com>
Allow to override the default shell commands used to start and stop
the machine with custom commands, as in
--be-opts="cmd.request-power-on='/usr/bin/power.sh something'"
Signed-off-by: Jan Lindemann <jan@janware.com>
Add support for options --tag and --time-stamp to MachineCmd, and
store them in Environment.tag and .time_stamp, respectively.
.time_stamp defaults to current time if --time-stamp is not present.
Signed-off-by: Jan Lindemann <jan@janware.com>
Add flag ReadOnlyPrintable and support it in read(). This omits all
characters not in string.printable from read()'s result.
This comes in handy if systemd spits out bouncing start-job-running
asterisks which find their way back to the reader but close the shell
on him.
Signed-off-by: Jan Lindemann <jan@janware.com>
Since all command instances carry config information from
~/.jw-devtestrc, make it available via a dedicated conf_value()
method to all interested test cases.
Signed-off-by: Jan Lindemann <jan@janware.com>
expect now takes a cmd argument, which defaults to None, and which
runs the command over the given connection before it takes to waiting
for a matching regex to be sent.
Signed-off-by: Jan Lindemann <jan@janware.com>
Make the private CmdTestOs.__run_test_cases() method available to
external code interested in running a selection of test cases.
This is useful, e.g. for re-running a failed firmware installation
encapsulated in a test case from inside another test case.
Signed-off-by: Jan Lindemann <jan@janware.com>
Add method addResults(), which allows to merge results of another
TestResults instance into the called instance.
Signed-off-by: Jan Lindemann <jan@janware.com>