Skip to content

Commit c1f603b

Browse files
nashifkartben
authored andcommitted
doc: twister: add shell harness doc
Document usage of shell harness. Signed-off-by: Anas Nashif <[email protected]>
1 parent 49dcc54 commit c1f603b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

doc/develop/test/twister.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,29 @@ bsim_exe_name: <string>
985985
directory, will be ``bs_<platform_name>_<bsim_exe_name>`` instead of the
986986
default based on the test path and scenario name.
987987

988+
Shell
989+
=====
990+
991+
The shell harness is used to execute shell commands and parse the output and utilizes the pytest
992+
framework and the pytest harness of twister.
993+
994+
The following options apply to the shell harness:
995+
996+
shell_params_file: <string> (default empty)
997+
Specify a file containing test parameters to be used in the test.
998+
The file should contain a list of commands and their expected output. For example:
999+
1000+
.. code-block:: none
1001+
1002+
test_shell_harness:
1003+
- command: "mpu mtest 1"
1004+
expected: "The value is: 0x.*"
1005+
- command: "mpu mtest 2"
1006+
expected: "The value is: 0x.*"
1007+
1008+
1009+
If no file is specified, the shell harness will use the default file
1010+
``test_shell.yml`` in the test directory.
9881011

9891012
Selecting platform scope
9901013
************************

0 commit comments

Comments
 (0)