f7542eff89
os.test.ListCmd: Add response output convenience symlink
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
6da9e6af00
test.cmd_expect(): Add support for echo_cmd command line arg
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
2a7267a004
test.expect(): Add support for log_act command line arg
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
162c5c9f63
os.CmdTestOs: Log test failures in multiple lines
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
cf9dc2a392
test.ListCmd: Beautify fail output
...
Make fail return a multi-line experience, possibly breaking grep, so
try out if this is a good idea.
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
476f501fbe
test.ListCmd: Reduce debug logging
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
e11f626971
test.ListCmd: Add methods items() and field_keys()
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
31152ec718
test.ListCmd: Use ListCmd._row_name() for displaying stuff
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
fe8d9c0300
test.ListCmd: Fix option match logic
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
745dfa2737
test.ListCmd: Append environment time stamp to output files
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
cecd749ce9
cases.ProcessList: Beautify _row_name()
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
e43deb371e
os.Environment: Add field time_stamp
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
22de74795b
test.ListCmd: Make row comparison faster (TODO: Not active)
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
e0b3cc41ce
test.ListCmd: Add support for refpath lists
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
ca3b597341
Add test.cases.Audit
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
dc40decb96
ListCmd.py: Make Rows sortable
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
3fba1c2a89
os.CmdTestOs: Add support for --phases argument
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
174286e3cc
TestPhases: Add phases spec alias "All"
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
b5d849ce44
Add test/audit
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
8d62ea3939
jw-devtest.py: Code beautification
...
Just for the heck of it: Make it even shorter.
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:27 +01:00
1592ea933c
os.Environment: Add method conf_value()
...
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>
2025-11-17 11:12:26 +01:00
ab8b04ad30
os.Connection._read(): Safeguard against non-utf8
...
Don't try to decode non-UTF-8 garbage as UTF-8 if it shows up in _read().
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
6239c0546a
test.expect(): Add support for cmd keyword argument
...
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>
2025-11-17 11:12:26 +01:00
50abdbb3c7
os.CmdTestOs: Beautify test summary
...
Log a greppable summary of all failed tests in one line at the end of
the output.
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
86a6939688
os.TestResults: Beautify dump()
...
Test results are now output via slog(), and are decorated with a
count of failed and total tests.
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
82bb65b6c0
os.CmdTestOs: Add get_ run_ test_cases() and friend
...
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>
2025-11-17 11:12:26 +01:00
d747aa78d5
os.TestResutls: Add method addResults()
...
Add method addResults(), which allows to merge results of another
TestResults instance into the called instance.
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
6e04ffdcbe
os.be.*.Machine: Rename CPU -> DUT
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
1c674dfa3f
Add test.cmds_exec()
...
test.cmds_exec() takes a list of lists with commands to be sent to a
console, returns None on success and an error message on failure.
The list can consist of up to three entries, 2 + 3 are optional:
[ cmd, expect-regex, timeout]
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
7d709ecc58
os.misc.cmd_exec(): Fix echo_cmd=False
...
cmd_exec() sometimes returned the command in the output albeit
echo_cmd=False was specified, notably if the command contained a
newline.
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
0f723cfd1b
test.cases.ProcMounts: Add ":" to device name regex
...
Devices may be called ubi0:rescue0 or so.
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
5b54b637fd
os.conn.Serial: Don't use line_buffering in fdopen()
...
It's wrong to use line buffering in fdopen(..., ".b"), there's no
such thing as a line in binary data, also see
https://bugs.python.org/issue32236
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
142c1dbf6d
Add support for test-os --cases option
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
765e6f3a1b
Add test.cases.LsofUds
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
e0819d7c39
Add test.cases.LsofNet
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
03da0449c4
Add test/list-cmd
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:26 +01:00
4b912741cb
First commit
...
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:12:21 +01:00