Lines Matching refs:cli
1 # `toranj-cli`
3 `toranj-cli` is a test framework for OpenThread using its CLI interface.
10 - `toranj` in CLI mode runs `ot-cli-ftd` on simulation platform (real-time).
28 The `toranj-cli` tests are included in `tests/toranj/cli` folder. Each test-case has its own script…
33 $ cd tests/toranj/cli
44 ## `toranj-cli` Components
46 `cli` python module defines the `toranj-cli` test components.
48 ### `cli.Node()` Class
50 `cli.Node()` class creates a Thread node instance. It creates a sub-process to run `ot-cli-ftd` and…
53 >>> import cli
54 >>> node1 = cli.Node()
57 >>> node2 = cli.Node()
64 ### `cli.Node` methods
66 `cli.Node()` provides methods matching different CLI commands, in addition to some helper methods f…
94 A direct CLI command can be issued using `node.cli(command)` with a given `command` string.
97 >>> node.cli('uptime')
113 >>> import cli
114 >>> node1 = cli.Node()
115 >>> node2 = cli.Node()
116 >>> node3 = cli.Node()
125 >>> node2.join(node1, cli.JOIN_TYPE_ROUTER)
129 >>> node3.join(node1, cli.JOIN_TYPE_END_DEVICE)
133 >>> node1.cli('neighbor list')
139 Every `cli.Node()` instance will save its corresponding logs. By default the logs are saved in a fi…
143 A `cli.Node()` instance can also provide additional logs and info as the test-cases are run (verbos…
146 >>> import cli
147 >>> node = cli.Node(verbose=True)
148 $ Node1.__init__() cmd: `../../../examples/apps/cli/ot-cli-ftd --time-speed=1 1`
151 $ Node1.cli('state') -> disabled
155 $ Node1.cli('networkname test')
156 $ Node1.cli('panid 4660')
157 $ Node1.cli('ifconfig up')
158 $ Node1.cli('thread start')
159 $ Node1.cli('state') -> detached
160 $ Node1.cli('state') -> detached
162 $ Node1.cli('state') -> leader
165 Alternatively, `cli.Node._VERBOSE` settings can be changed to enable verbose logging for all nodes.…
167 ## `toranj-cli` and `thread-cert` test framework
169 `toranj-cli` uses CLI commands to test the behavior of OpenThread with simulation platform. `thread…