mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
ci: replace pytest function
This commit is contained in:
@@ -362,16 +362,32 @@ If you need to run a group of test cases, you may run:
|
||||
|
||||
It would trigger all test cases with the ``[psram]`` tag.
|
||||
|
||||
.. warning::
|
||||
If you need to run all test cases except for a specific groups, you may run:
|
||||
|
||||
You may also see that there are some test scripts with the following statements, which are deprecated. Please use the suggested one as above.
|
||||
.. code-block:: python
|
||||
|
||||
.. code-block:: python
|
||||
def test_unity_single_dut(dut: IdfDut):
|
||||
dut.run_all_single_board_cases(group='!psram')
|
||||
|
||||
def test_unity_single_dut(dut: IdfDut):
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
dut.write('*')
|
||||
dut.expect_unity_test_output()
|
||||
This code will trigger all test cases except those with the [psram] tag.
|
||||
|
||||
If you need to run a group of test cases filtered by specific attributes, you may run:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def test_rtc_xtal32k(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(attributes={'test_env': 'xtal32k'})
|
||||
|
||||
This command will trigger all tests with the attribute ``test_env`` equal to ``xtal32k``.
|
||||
|
||||
If you need to run tests by specific names, you may run:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def test_dut_run_all_single_board_cases(dut):
|
||||
dut.run_all_single_board_cases(name=["normal_case1", "multiple_stages_test"])
|
||||
|
||||
This command will trigger ``normal_case1`` and ``multiple_stages_test``
|
||||
|
||||
We also provide a fixture ``case_tester`` to trigger all kinds of test cases easier. For example:
|
||||
|
||||
|
Reference in New Issue
Block a user