From c1f603b9fea2dbbfe941f3c97064b0a9fddd5a30 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 4 Feb 2025 09:15:02 -0500 Subject: [PATCH] doc: twister: add shell harness doc Document usage of shell harness. Signed-off-by: Anas Nashif --- doc/develop/test/twister.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/develop/test/twister.rst b/doc/develop/test/twister.rst index 79967c286b0..d9ac4646f7b 100644 --- a/doc/develop/test/twister.rst +++ b/doc/develop/test/twister.rst @@ -985,6 +985,29 @@ bsim_exe_name: directory, will be ``bs__`` instead of the default based on the test path and scenario name. +Shell +===== + +The shell harness is used to execute shell commands and parse the output and utilizes the pytest +framework and the pytest harness of twister. + +The following options apply to the shell harness: + +shell_params_file: (default empty) + Specify a file containing test parameters to be used in the test. + The file should contain a list of commands and their expected output. For example: + + .. code-block:: none + + test_shell_harness: + - command: "mpu mtest 1" + expected: "The value is: 0x.*" + - command: "mpu mtest 2" + expected: "The value is: 0x.*" + + + If no file is specified, the shell harness will use the default file + ``test_shell.yml`` in the test directory. Selecting platform scope ************************