espressif / pytest-embedded

A pytest plugin that designed for embedded testing
https://docs.espressif.com/projects/pytest-embedded/en/latest/
MIT License
93 stars 26 forks source link

refactor: change logic of threading control in CaseTester for MultiDev (RDT-534) #223

Closed horw closed 12 months ago

horw commented 1 year ago

Replaced logic of creating thread before: new case every time create new thread now: create thread once, and then thread wait for task closes #184 closes #162

horw commented 1 year ago

Hello, I've refactored thread depends code, now it works with generator functions

hfudev commented 1 year ago

@ginkgm @L-KAYA PTAL as well.

After this PR got merged, the old case_tester used in ESP-IDF could be replaced by this unity_tester

The benefits of this approach are:

  1. merged junit reports, with stdout (including performance data)
  2. correct test case name even app got panic'ed
  3. remove thread/process. Support multi OS.
L-KAYA commented 1 year ago

Have went through the code, I love the idea of iterator! LGTM!

horw commented 1 year ago
FAILED pytest-embedded-idf/tests/test_idf.py::test_dut_run_all_single_board_cases - AssertionError: assert 10.896 < 10.1

~I've got this error in the pipeline, will check for it~

p.s. problem was with device reset

hfudev commented 1 year ago
FAILED pytest-embedded-idf/tests/test_idf.py::test_dut_run_all_single_board_cases - AssertionError: assert 10.896 < 10.1

~I've got this error in the pipeline, will check for it~

p.s. problem was with device reset

oh, somehow I missed it in the review. Glad you found it :)

hfudev commented 12 months ago

Thank you @horw LGTM!