You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><codeclass="highlighter-rouge">basic_test.py</code>: a simple test that checks a range of basic functionality, from flash programming to accessing memory and core registers.</li>
246
247
<li><codeclass="highlighter-rouge">blank_test.py</code>: tests ability to connect to devices with with blank flash. (Not run by <codeclass="highlighter-rouge">automated_test.py</code>.)</li>
248
+
<li><codeclass="highlighter-rouge">commander_test.py</code>: tests the <codeclass="highlighter-rouge">pyocd commander</code> functionality.</li>
249
+
<li><codeclass="highlighter-rouge">commands_test.py</code>: tests commands supported by commander and gdb monitor commands.</li>
250
+
<li><codeclass="highlighter-rouge">concurrency_test.py</code>: verify multiple threads can simultaneously access a debug probe, specifically for memory
251
+
transfers.</li>
247
252
<li><codeclass="highlighter-rouge">connect_test.py</code>: tests all combinations of the halt on connect and disconnect resume options.</li>
248
253
<li><codeclass="highlighter-rouge">cortex_test.py</code>: validates CPU control operations and memory accesses.</li>
249
254
<li><codeclass="highlighter-rouge">debug_context_test.py</code>: tests some <codeclass="highlighter-rouge">DebugContext</code> classes.</li>
250
-
<li><codeclass="highlighter-rouge">flash_test.py</code>: comprehensive test of flash programming.</li>
251
255
<li><codeclass="highlighter-rouge">flash_loader_test.py</code>: test the classes in the <codeclass="highlighter-rouge">pyocd.flash.loader</code> module.</li>
252
-
<li><codeclass="highlighter-rouge">gdb_server_json_test.py</code>: validates the JSON output from pyocd-gdbserver used by tools like the GNU MCU Eclipse pyOCD plugin.</li>
256
+
<li><codeclass="highlighter-rouge">flash_test.py</code>: comprehensive test of flash programming.</li>
257
+
<li><codeclass="highlighter-rouge">import_all.py</code>: imports all pyocd modules. (Not run by <codeclass="highlighter-rouge">automated_test.py</code>.)</li>
253
258
<li><codeclass="highlighter-rouge">gdb_test.py</code>: tests the gdbserver by running a script in a gdb process. Note that on Windows,
254
259
the 32-bit Python 2.7 must be installed for the Python-enabled gdb to work properly and for
255
260
this test to pass.</li>
261
+
<li><codeclass="highlighter-rouge">json_lists_test.py</code>: validates the JSON output from <codeclass="highlighter-rouge">pyocd json</code>.</li>
256
262
<li><codeclass="highlighter-rouge">parallel_test.py</code>: checks for issues with accessing debug probes from multiple processes and threads simultaneously. (Not run by <codeclass="highlighter-rouge">automated_test.py</code>.)</li>
263
+
<li><codeclass="highlighter-rouge">probeserver_test.py</code>: verify remote probe server and client.</li>
257
264
<li><codeclass="highlighter-rouge">speed_test.py</code>: performance test for memory reads and writes.</li>
265
+
<li><codeclass="highlighter-rouge">user_script_test.py</code>: verify loading of user scripts.</li>
258
266
</ul>
259
267
268
+
<h2id="azure-pipelines">Azure Pipelines</h2>
269
+
270
+
<p>PyOCD uses Azure Pipelines to run the CI tests for commits and pull requests. The pipeline runs the functional tests on
271
+
a set of test machines, called self-hosted test agents in Azure Pipelines parlance. There is one each of Mac, Linux, and
272
+
Windows test agents.</p>
273
+
274
+
<p>The complete results from pipeline runs are <ahref="https://dev.azure.com/pyocd/pyocd/_build?definitionId=1&_a=summary">publicly
275
+
accessible</a>.</p>
276
+
277
+
<p>For pull requests, a pyOCD team member or collaborator must manually initiate the pipeline run by entering a special
278
+
comment of the form “/azp run” or “/AzurePipelines run”.</p>
279
+
260
280
<h2id="testing-with-tox">Testing with tox</h2>
261
281
262
282
<p>pyOCD includes a configuration file for tox that enables easy testing of multiple Python versions.
Print core or peripheral register(s). If no arguments are provided, all core registers will be printed. Either a core register name, the name of a peripheral, or a peripheral.register can be provided. When a peripheral name is provided without a register, all registers in the peripheral will be printed. If the -f option is passed, then individual fields of peripheral registers will be printed in addition to the full value.</p>
Print core or peripheral register(s). If no arguments are provided, the ‘general’ core register group will be printed. Either a core register name, the name of a peripheral, or a peripheral.register can be provided. When a peripheral name is provided without a register, all registers in the peripheral will be printed. The -p option forces evaluating the register name as a peripheral register name. If the -f option is passed, then individual fields of peripheral registers will be printed in addition to the full value.</p>
Set the value of a core or peripheral register. The REG parameter must be a core register name or a peripheral.register. When a peripheral register is written, if the -r option is passed then it is read back and the updated value printed.</p>
<strong>Usage</strong>: [-r] [-p] [-f] REG VALUE <br/>
1236
+
Set the value of a core or peripheral register. The REG parameter must be a core register name or a peripheral.register. When a peripheral register is written, if the -r option is passed then it is read back and the updated value printed. The -p option forces evaluating the register name as a peripheral register name. If the -f option is passed, then individual fields of peripheral registers will be printed in addition to the full value.</p>
logging verbosity level. For example, a single <codeclass="highlighter-rouge">--verbose</code> moves <codeclass="highlighter-rouge">pyocd flash</code> from the default
304
309
level of WARNING to INFO.</p>
305
310
311
+
<h2id="color-logging">Color logging</h2>
312
+
313
+
<p>By default, log output to a tty is colorised. Control over colorised log output is possible two ways.</p>
314
+
315
+
<p>The command-line <codeclass="highlighter-rouge">--color</code> argument accepts an optional parameter that must be one of <codeclass="highlighter-rouge">auto</code>, <codeclass="highlighter-rouge">always</code>, or <codeclass="highlighter-rouge">never</code>.
316
+
The default is <codeclass="highlighter-rouge">auto</code>, which will enable color only when outputting to a tty.</p>
317
+
318
+
<p>Another option for controlling color output is the <codeclass="highlighter-rouge">PYOCD_COLOR</code> environment variable. It should be set to one of the
319
+
same values supported by <codeclass="highlighter-rouge">--color</code>. This environment variable changes the default color output setting, and is
320
+
overridden by <codeclass="highlighter-rouge">--color</code> on the command line.</p>
321
+
306
322
<h2id="loggers">Loggers</h2>
307
323
308
324
<p>Each module in pyOCD uses its own module-specific logger with a name matching the dotted module
@@ -316,7 +332,7 @@ <h2 id="loggers">Loggers</h2>
316
332
<h3id="trace-loggers">Trace loggers</h3>
317
333
318
334
<p>Certain modules define additional sub-module loggers that output debug trace logs. These loggers always have the
319
-
suffix “.trace” and are set to critical log level by default.</p>
335
+
suffix “.trace” and are disabled by default. This ensures the trace messages won’t be seen unless explicitly enabled by the <codeclass="highlighter-rouge">--log-level</code> / <codeclass="highlighter-rouge">-L</code> argument described in the following section.</p>
0 commit comments