Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tusb_serial_device not working (IDFGH-13925) #14764

Closed
3 tasks done
LeonBirkel opened this issue Oct 22, 2024 · 6 comments
Closed
3 tasks done

tusb_serial_device not working (IDFGH-13925) #14764

LeonBirkel opened this issue Oct 22, 2024 · 6 comments
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@LeonBirkel
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.3.1

Espressif SoC revision.

ESP32-s3 (QFN56) (revision v0.2)

Operating System used.

Windows

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

PowerShell

Development Kit.

ESP32 S3 DevKitC 1 N16R8 ESP32 S3 WROOM1 N16R8 Development Board

Power Supply used.

USB

What is the expected behavior?

After importing the example, builing and flashing. I expect the pytest to run.

What is the actual behavior?

Pytest is failing (Debug Logs)

Steps to reproduce.

  1. Import example
  2. build and flash
  3. run pytest

Debug Logs.

PS C:\BA\bastion\hardware-trust-anchor\board-v5> pytest ./pytest_usb_device_serial.py
============================================================ test session starts ============================================================
platform win32 -- Python 3.13.0, pytest-8.3.3, pluggy-1.5.0
rootdir: C:\BA\bastion\hardware-trust-anchor\board-v5
plugins: embedded-1.11.6
collected 1 item

pytest_usb_device_serial.py F                                                                                                          [100%]

================================================================= FAILURES ==================================================================
______________________________________________________ test_usb_device_serial_example _______________________________________________________

self = <pytest_embedded.dut.Dut object at 0x0000022A6F335FD0>, pattern = 'USB initialization DONE', expect_all = False, not_matching = ()
args = (), kwargs = {}, patterns = ['USB initialization DONE'], res = []
debug_str = 'Not found "USB initialization DONE"\nBytes in current buffer (color code eliminated): \nPlease check the full log her...ers\\leonb\\AppData\\Local\\Temp\\pytest-embedded\\2024-10-22_09-27-25-840324\\test_usb_device_serial_example\\dut.log'

    @functools.wraps(func)
    def wrapper(
        self, pattern, *args, expect_all: bool = False, not_matching: List[Union[str, re.Pattern]] = (), **kwargs
    ) -> Union[Union[Match, AnyStr], List[Union[Match, AnyStr]]]:
        patterns = to_list(pattern)
        res = []
        while patterns:
            try:
>               index = func(self, pattern, *args, **kwargs)

c:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pytest_embedded\dut.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
c:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pytest_embedded\dut.py:153: in expect_exact
    return self.pexpect_proc.expect_exact(pattern, **kwargs)
C:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pexpect\spawnbase.py:432: in expect_exact
    return exp.expect_loop(timeout)
C:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pexpect\expect.py:181: in expect_loop
    return self.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0x0000022A6F336270>
err = TIMEOUT("<pytest_embedded.log.PexpectProcess object at 0x0000022A6F335A90>\nsearcher: searcher_string:\n    0: b'USB initialization DONE'")

    def timeout(self, err=None):
        spawn = self.spawn

        spawn.before = spawn._before.getvalue()
        spawn.after = TIMEOUT
        index = self.searcher.timeout_index
        if index >= 0:
            spawn.match = TIMEOUT
            spawn.match_index = index
            return index
        else:
            spawn.match = None
            spawn.match_index = None
            msg = str(spawn)
            msg += '\nsearcher: %s' % self.searcher
            if err is not None:
                msg = str(err) + '\n' + msg

            exc = TIMEOUT(msg)
            exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
>           raise exc
E           pexpect.exceptions.TIMEOUT: <pytest_embedded.log.PexpectProcess object at 0x0000022A6F335A90>
E           searcher: searcher_string:
E               0: b'USB initialization DONE'
E           <pytest_embedded.log.PexpectProcess object at 0x0000022A6F335A90>
E           searcher: searcher_string:
E               0: b'USB initialization DONE'

C:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pexpect\expect.py:144: TIMEOUT

The above exception was the direct cause of the following exception:

dut = <pytest_embedded.dut.Dut object at 0x0000022A6F335FD0>

    @pytest.mark.esp32s3
    # @pytest.mark.esp32p4
    @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='lack of runners with usb_device tag')
    @pytest.mark.usb_device
    def test_usb_device_serial_example(dut: Dut) -> None:
>       dut.expect_exact('USB initialization DONE')

pytest_usb_device_serial.py:17:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded.dut.Dut object at 0x0000022A6F335FD0>, pattern = 'USB initialization DONE', expect_all = False, not_matching = ()     
args = (), kwargs = {}, patterns = ['USB initialization DONE'], res = []
debug_str = 'Not found "USB initialization DONE"\nBytes in current buffer (color code eliminated): \nPlease check the full log her...ers\\leonb\\AppData\\Local\\Temp\\pytest-embedded\\2024-10-22_09-27-25-840324\\test_usb_device_serial_example\\dut.log'

    @functools.wraps(func)
    def wrapper(
        self, pattern, *args, expect_all: bool = False, not_matching: List[Union[str, re.Pattern]] = (), **kwargs
    ) -> Union[Union[Match, AnyStr], List[Union[Match, AnyStr]]]:
        patterns = to_list(pattern)
        res = []
        while patterns:
            try:
                index = func(self, pattern, *args, **kwargs)
            except (pexpect.EOF, pexpect.TIMEOUT) as e:
                debug_str = (
                    f'Not found "{pattern!s}"\n'
                    f'Bytes in current buffer (color code eliminated): {self.pexpect_proc.buffer_debug_str}\n'
                    f'Please check the full log here: {self.logfile}'
                )
>               raise e.__class__(debug_str) from e
E               pexpect.exceptions.TIMEOUT: Not found "USB initialization DONE"
E               Bytes in current buffer (color code eliminated): 
E               Please check the full log here: C:\Users\leonb\AppData\Local\Temp\pytest-embedded\2024-10-22_09-27-25-840324\test_usb_device_serial_example\dut.log

c:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pytest_embedded\dut.py:83: TIMEOUT
nMarkWarning: Unknown pytest.mark.temp_skip_ci - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='lack of runners with usb_device tag')

pytest_usb_device_serial.py:15
  C:\BA\bastion\hardware-trust-anchor\board-v5\pytest_usb_device_serial.py:15: PytestUnknownMarkWarning: Unknown pytest.mark.usb_device - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html        
    @pytest.mark.usb_device

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================== short test summary info ========================================================== 
FAILED pytest_usb_device_serial.py::test_usb_device_serial_example - pexpect.exceptions.TIMEOUT: Not found "USB initialization DONE"
====================================================== 1 failed, 3 warnings in 30.13s ======================================================= 
PS C:\BA\bastion\hardware-trust-anchor\board-v5>






                                                 pytest ./pytest_usb_device_serial.py
============================================================ test session starts ============================================================
platform win32 -- Python 3.13.0, pytest-8.3.3, pluggy-1.5.0
rootdir: C:\BA\bastion\hardware-trust-anchor\board-v5
plugins: embedded-1.11.6
collected 1 item

pytest_usb_device_serial.py F                                                                                                          [100%]

================================================================= FAILURES ==================================================================
______________________________________________________ test_usb_device_serial_example _______________________________________________________ 

self = <pytest_embedded.dut.Dut object at 0x00000210EEE95FD0>, pattern = 'USB initialization DONE', expect_all = False, not_matching = ()     
args = (), kwargs = {}, patterns = ['USB initialization DONE'], res = []
debug_str = 'Not found "USB initialization DONE"\nBytes in current buffer (color code eliminated): \nPlease check the full log her...ers\\leonb\\AppData\\Local\\Temp\\pytest-embedded\\2024-10-22_09-32-23-859453\\test_usb_device_serial_example\\dut.log'

    @functools.wraps(func)
    def wrapper(
        self, pattern, *args, expect_all: bool = False, not_matching: List[Union[str, re.Pattern]] = (), **kwargs
    ) -> Union[Union[Match, AnyStr], List[Union[Match, AnyStr]]]:
        patterns = to_list(pattern)
        res = []
        while patterns:
            try:
>               index = func(self, pattern, *args, **kwargs)

c:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pytest_embedded\dut.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
c:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pytest_embedded\dut.py:153: in expect_exact
    return self.pexpect_proc.expect_exact(pattern, **kwargs)
C:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pexpect\spawnbase.py:432: in expect_exact
    return exp.expect_loop(timeout)
C:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pexpect\expect.py:181: in expect_loop
    return self.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0x00000210EEE96270>
err = TIMEOUT("<pytest_embedded.log.PexpectProcess object at 0x00000210EEE95A90>\nsearcher: searcher_string:\n    0: b'USB initialization DONE'")

    def timeout(self, err=None):
        spawn = self.spawn

        spawn.before = spawn._before.getvalue()
        spawn.after = TIMEOUT
        index = self.searcher.timeout_index
        if index >= 0:
            spawn.match = TIMEOUT
            spawn.match_index = index
            return index
        else:
            spawn.match = None
            spawn.match_index = None
            msg = str(spawn)
            msg += '\nsearcher: %s' % self.searcher
            if err is not None:
                msg = str(err) + '\n' + msg

            exc = TIMEOUT(msg)
            exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
>           raise exc
E           pexpect.exceptions.TIMEOUT: <pytest_embedded.log.PexpectProcess object at 0x00000210EEE95A90>
E           searcher: searcher_string:
E               0: b'USB initialization DONE'
E           <pytest_embedded.log.PexpectProcess object at 0x00000210EEE95A90>
E           searcher: searcher_string:
E               0: b'USB initialization DONE'

C:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pexpect\expect.py:144: TIMEOUT

The above exception was the direct cause of the following exception:

dut = <pytest_embedded.dut.Dut object at 0x00000210EEE95FD0>

    @pytest.mark.esp32s3
    # @pytest.mark.esp32p4
    @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='lack of runners with usb_device tag')
    @pytest.mark.usb_device
    def test_usb_device_serial_example(dut: Dut) -> None:
>       dut.expect_exact('USB initialization DONE')

pytest_usb_device_serial.py:17:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded.dut.Dut object at 0x00000210EEE95FD0>, pattern = 'USB initialization DONE', expect_all = False, not_matching = ()     
args = (), kwargs = {}, patterns = ['USB initialization DONE'], res = []
debug_str = 'Not found "USB initialization DONE"\nBytes in current buffer (color code eliminated): \nPlease check the full log her...ers\\leonb\\AppData\\Local\\Temp\\pytest-embedded\\2024-10-22_09-32-23-859453\\test_usb_device_serial_example\\dut.log'

    @functools.wraps(func)
    def wrapper(
        self, pattern, *args, expect_all: bool = False, not_matching: List[Union[str, re.Pattern]] = (), **kwargs
    ) -> Union[Union[Match, AnyStr], List[Union[Match, AnyStr]]]:
        patterns = to_list(pattern)
        res = []
        while patterns:
            try:
                index = func(self, pattern, *args, **kwargs)
            except (pexpect.EOF, pexpect.TIMEOUT) as e:
                debug_str = (
                    f'Not found "{pattern!s}"\n'
                    f'Bytes in current buffer (color code eliminated): {self.pexpect_proc.buffer_debug_str}\n'
                    f'Please check the full log here: {self.logfile}'
                )
>               raise e.__class__(debug_str) from e
E               pexpect.exceptions.TIMEOUT: Not found "USB initialization DONE"
E               Bytes in current buffer (color code eliminated): 
E               Please check the full log here: C:\Users\leonb\AppData\Local\Temp\pytest-embedded\2024-10-22_09-32-23-859453\test_usb_device_serial_example\dut.log

c:\Users\leonb\AppData\Local\Programs\Python\Python313\Lib\site-packages\pytest_embedded\dut.py:83: TIMEOUT
============================================================= warnings summary ============================================================== 
pytest_usb_device_serial.py:12
  C:\BA\bastion\hardware-trust-anchor\board-v5\pytest_usb_device_serial.py:12: PytestUnknownMarkWarning: Unknown pytest.mark.esp32s3 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.esp32s3

pytest_usb_device_serial.py:14
  C:\BA\bastion\hardware-trust-anchor\board-v5\pytest_usb_device_serial.py:14: PytestUnknownMarkWarning: Unknown pytest.mark.temp_skip_ci - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html      
    @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='lack of runners with usb_device tag')

pytest_usb_device_serial.py:15
  C:\BA\bastion\hardware-trust-anchor\board-v5\pytest_usb_device_serial.py:15: PytestUnknownMarkWarning: Unknown pytest.mark.usb_device - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html        
    @pytest.mark.usb_device

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================== short test summary info ========================================================== 
FAILED pytest_usb_device_serial.py::test_usb_device_serial_example - pexpect.exceptions.TIMEOUT: Not found "USB initialization DONE"
====================================================== 1 failed, 3 warnings in 30.14s =======================================================

More Information.

I did not do Pin Assignment since I undestand that this is not required for my board.
Both USB cables are currently connected.
If I do manual tests(putty), I can see the example log outputs on the board, but it seems like the board cannot send any data back. See below for more details to my manual testing

image

PS C:\BA\bastion\hardware-trust-anchor\board-v5> & 'C:\Users\leonb\.espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe' 'C:\Users\leonb\esp\v5.3.1\esp-idf\tools\idf_monitor.py' -p COM9 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 'c:\BA\bastion\hardware-trust-anchor\board-v5\build\board-v5.elf'
--- Warning: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM9 instead...
--- esp-idf-monitor 1.5.0 on \\.\COM9 115200
--- Warning: ELF file 'c:\BA\bastion\hardware-trust-anchor\board-v5\build\board-v5.elf' does not exist
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2810,len:0x178c
load:0x403c8700,len:0x4
load:0x403c8704,len:0xcb8
load:0x403cb700,len:0x2db0
entry 0x403c8914
I (27) boot: ESP-IDF v5.3.1-dirty 2nd stage bootloader
I (27) boot: compile time Oct 22 2024 10:49:27
I (27) boot: Multicore bootloader
I (30) boot: chip revision: v0.2
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (39) boot.esp32s3: SPI Mode       : DIO
I (44) boot.esp32s3: SPI Flash Size : 2MB
I (48) boot: Enabling RNG early entropy source...
I (54) boot: Partition Table:
I (57) boot: ## Label            Usage          Type ST Offset   Length
I (65) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (72) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (80) boot:  2 factory          factory app      00 00 00010000 00100000
I (87) boot: End of partition table
I (91) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=0ad8ch ( 44428) map
I (108) esp_image: segment 1: paddr=0001adb4 vaddr=3fc92500 size=02ad4h ( 10964) load
I (110) esp_image: segment 2: paddr=0001d890 vaddr=40374000 size=02788h ( 10120) load
I (119) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=1fa94h (129684) map
I (148) esp_image: segment 4: paddr=0003fabc vaddr=40376788 size=0bc7ch ( 48252) load
I (165) boot: Loaded app from partition at offset 0x10000
I (165) boot: Disabling RNG early entropy source...
I (177) cpu_start: Multicore app
I (186) cpu_start: Pro cpu start user code
I (191) cpu_start: cpu freq: 160000000 Hz
I (191) app_init: Application information:
I (194) app_init: Project name:     board-v5
I (199) app_init: App version:      d6d6919-dirty
I (205) app_init: Compile time:     Oct 22 2024 10:49:18
I (211) app_init: ELF file SHA256:  116124e3c...
I (216) app_init: ESP-IDF:          v5.3.1-dirty
I (221) efuse_init: Min chip rev:     v0.0
I (226) efuse_init: Max chip rev:     v0.99 
I (231) efuse_init: Chip rev:         v0.2
I (236) heap_init: Initializing. RAM available for dynamic allocation:
I (243) heap_init: At 3FC962E0 len 00053430 (333 KiB): RAM
I (249) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (255) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (261) heap_init: At 600FE100 len 00001EE8 (7 KiB): RTCRAM
I (269) spi_flash: detected chip: generic
I (272) spi_flash: flash io: dio
W (276) spi_flash: Detected size(16384k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (289) sleep: Configure to isolate all GPIO pins in sleep state
I (296) sleep: Enable automatic switching of GPIO sleep configuration
I (304) main_task: Started on CPU0
I (324) main_task: Calling app_main()
I (324) example: USB initialization
W (324) tusb_desc: No Device descriptor provided, using default.
W (324) tusb_desc: No FullSpeed configuration descriptor provided, using default.
W (334) tusb_desc: No String descriptors provided, using default.
I (344) tusb_desc:
┌─────────────────────────────────┐
│  USB Device Descriptor Summary  │
├───────────────────┬─────────────┤
│bDeviceClass       │ 239         │
├───────────────────┼─────────────┤
│bDeviceSubClass    │ 2           │
├───────────────────┼─────────────┤
│bDeviceProtocol    │ 1           │
├───────────────────┼─────────────┤
│bMaxPacketSize0    │ 64          │
├───────────────────┼─────────────┤
│idVendor           │ 0x303a      │
├───────────────────┼─────────────┤
│idProduct          │ 0x4001      │
├───────────────────┼─────────────┤
│bcdDevice          │ 0x100       │
├───────────────────┼─────────────┤
│iManufacturer      │ 0x1         │
├───────────────────┼─────────────┤
│iProduct           │ 0x2         │
├───────────────────┼─────────────┤
│iSerialNumber      │ 0x3         │
├───────────────────┼─────────────┤
│bNumConfigurations │ 0x1         │
└───────────────────┴─────────────┘
I (514) TinyUSB: TinyUSB Driver installed
I (514) example: USB initialization DONE
I (824) example: Line state changed on channel 0: DTR:0, RTS:0
I (2554) example: Line state changed on channel 0: DTR:1, RTS:1
I (12164) example: GGGGG 
I (12164) example: Data from channel 0:
I (12164) example: 0x3fc98b50   74 65 73 74                                       |test|
I (12164) example: TEST 
@LeonBirkel LeonBirkel added the Type: Bug bugs in IDF label Oct 22, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Oct 22, 2024
@github-actions github-actions bot changed the title tusb_serial_device not working tusb_serial_device not working (IDFGH-13925) Oct 22, 2024
@roma-jam
Copy link
Collaborator

Hi @LeonBirkel,

could you provide all the commands, how do you configure esp-idf (install & export), build and flash example and run pytest.

Thanks.

@LeonBirkel
Copy link
Author

Thank you for the fast reply.
Pytest: PS C:\BA\bastion\hardware-trust-anchor\board-v5> pytest ./pytest_usb_device_serial.py

Install & import is handled by the VsCode extension. I select Express installation.

For building and flashing I use the VScode UI, it prints this command into my console:
C:\Users\leonb.espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe C:\Users\leonb\esp\v5.3.1\esp-idf\components\esptool_py\esptool\esptool.py -p COM9 -b 460800 --before default_reset --after hard_reset --chip esp32s3 write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x0 bootloader/bootloader.bin 0x10000 board-v5.bin 0x8000 partition_table/partition-table.bin

Is this the information you need @roma-jam or did I misunterstand something?

@peter-marcisovsky
Copy link
Collaborator

peter-marcisovsky commented Oct 23, 2024

Hi @LeonBirkel Can you run any other pytest, even from a different example?

I can see you are running the pytest outside of the esp-idf, could you try to run a pytest from within the esp-idf?
It would be something like this:

peter@peter ➜  ~/esp/esp-idf/examples/peripherals/usb/device/tusb_serial_device git:(master) ✗ pytest --target esp32s3
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.10.12, pytest-8.3.3, pluggy-1.5.0 -- /home/peter/.espressif/python_env/idf5.4_py3.10_env/bin/python
cachedir: .pytest_cache
rootdir: /home/peter/esp/esp-idf
configfile: pytest.ini
plugins: ignore-test-results-0.2.2, rerunfailures-14.0, timeout-2.3.1, cpp-2.6.0, embedded-1.11.6
collected 1 item 

The pytest searches for a configuration file called pytest.ini, which is present in the root dir of the esp-idf
In your log, the pytest.ini is missing, as well as plugins for pytest. I am wondering, if that could be an issue.

@LeonBirkel
Copy link
Author

LeonBirkel commented Oct 23, 2024

Hello @peter-marcisovsky ,

thank you for your reply!

I am on a different machine and OS now (ubuntu), and I get the a similar error.

If I try to run pytest in the idf folder, I get following error:

leon@LeonsNotebookMInt:~/esp/v5.3.1/esp-idf$ pytest --target esp32s3
ImportError while loading conftest '/home/leon/esp/v5.3.1/esp-idf/conftest.py'.
conftest.py:30: in <module>
    import common_test_methods  # noqa: F401
tools/ci/python_packages/common_test_methods.py:13: in <module>
    os.path.join(os.environ['IDF_PATH'], 'EnvConfig.yml'),
/usr/lib/python3.10/os.py:680: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'IDF_PATH'

I used the VS Code Extension installer, might this be the reason?
However, if I just call pytest in my VSCode directory I get following errors, which is a bit confusing since I did install the pytest dependencies with : $ install.sh --enable-pytest

leon@LeonsNotebookMInt:~/uni/WS24/BA/bastion/hardware-trust-anchor/v15$ pytest
======================================= test session starts =======================================
platform linux -- Python 3.10.12, pytest-7.0.1, pluggy-1.2.0
rootdir: /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15
plugins: timeout-2.1.0, embedded-1.11.6, xdist-2.5.0, xonsh-0.11.0, forked-1.4.0
collected 503 items / 47 errors / 456 selected                                                    

============================================= ERRORS ==============================================
___________ ERROR collecting components/components/fatfs/test_fatfsgen/test_fatfsgen.py ___________
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/fatfs/test_fatfsgen/test_fatfsgen.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/fatfs/test_fatfsgen/test_fatfsgen.py:11: in <module>
    from test_utils import CFG, fill_sector, generate_test_dir_1, generate_test_dir_2
components/components/fatfs/test_fatfsgen/test_utils.py:8: in <module>
    import fatfsgen  # noqa E402  # pylint: disable=C0413
components/components/fatfs/fatfsgen.py:9: in <module>
    from fatfs_utils.boot_sector import BootSector
components/components/fatfs/fatfs_utils/boot_sector.py:6: in <module>
    from construct import Bytes, Const, Int8ul, Int16ul, Int32ul, PaddedString, Padding, Struct, core
E   ModuleNotFoundError: No module named 'construct'
__________ ERROR collecting components/components/fatfs/test_fatfsgen/test_fatfsparse.py __________
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/fatfs/test_fatfsgen/test_fatfsparse.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/fatfs/test_fatfsgen/test_fatfsparse.py:11: in <module>
    from test_utils import compare_folders, fill_sector, generate_local_folder_structure, generate_test_dir_2
components/components/fatfs/test_fatfsgen/test_utils.py:8: in <module>
    import fatfsgen  # noqa E402  # pylint: disable=C0413
components/components/fatfs/fatfsgen.py:9: in <module>
    from fatfs_utils.boot_sector import BootSector
components/components/fatfs/fatfs_utils/boot_sector.py:6: in <module>
    from construct import Bytes, Const, Int8ul, Int16ul, Int32ul, PaddedString, Padding, Struct, core
E   ModuleNotFoundError: No module named 'construct'
____________ ERROR collecting components/components/fatfs/test_fatfsgen/test_utils.py _____________
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/fatfs/test_fatfsgen/test_utils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/fatfs/test_fatfsgen/test_utils.py:8: in <module>
    import fatfsgen  # noqa E402  # pylint: disable=C0413
components/components/fatfs/fatfsgen.py:9: in <module>
    from fatfs_utils.boot_sector import BootSector
components/components/fatfs/fatfs_utils/boot_sector.py:6: in <module>
    from construct import Bytes, Const, Int8ul, Int16ul, Int32ul, PaddedString, Padding, Struct, core
E   ModuleNotFoundError: No module named 'construct'
_________ ERROR collecting components/components/fatfs/test_fatfsgen/test_wl_fatfsgen.py __________
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/fatfs/test_fatfsgen/test_wl_fatfsgen.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/fatfs/test_fatfsgen/test_wl_fatfsgen.py:10: in <module>
    from test_utils import CFG, fill_sector, generate_test_dir_1, generate_test_dir_2
components/components/fatfs/test_fatfsgen/test_utils.py:8: in <module>
    import fatfsgen  # noqa E402  # pylint: disable=C0413
components/components/fatfs/fatfsgen.py:9: in <module>
    from fatfs_utils.boot_sector import BootSector
components/components/fatfs/fatfs_utils/boot_sector.py:6: in <module>
    from construct import Bytes, Const, Int8ul, Int16ul, Int32ul, PaddedString, Padding, Struct, core
E   ModuleNotFoundError: No module named 'construct'
_____ ERROR collecting components/components/linux/test_apps/linux_test/pytest_linux_test.py ______
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/linux/test_apps/linux_test/pytest_linux_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/linux/test_apps/linux_test/pytest_linux_test.py:4: in <module>
    from pytest_embedded_idf.dut import IdfDut
E   ModuleNotFoundError: No module named 'pytest_embedded_idf'
_ ERROR collecting components/components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/test_gen_crt_bundle.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/test_gen_crt_bundle.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
components/components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/test_gen_crt_bundle.py:8: in <module>
    import gen_crt_bundle
E   ModuleNotFoundError: No module named 'gen_crt_bundle'

During handling of the above exception, another exception occurred:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/test_gen_crt_bundle.py:11: in <module>
    import gen_crt_bundle
E   ModuleNotFoundError: No module named 'gen_crt_bundle'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/misc/test_rcp_reset.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/misc/test_rcp_reset.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/misc/test_rcp_reset.py:32: in <module>
    from spinel.const import SPINEL
E   ModuleNotFoundError: No module named 'spinel'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_detach.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_detach.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_detach.py:35: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_inform_previous_parent_on_reattach.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_inform_previous_parent_on_reattach.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_inform_previous_parent_on_reattach.py:36: in <module>
    from pktverify.packet_filter import PacketFilter
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_filter.py:38: in <module>
    from pktverify.packet import Packet
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet.py:33: in <module>
    from pyshark.packet.layer import Layer as RawLayer
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_leader_reboot_multiple_link_request.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_leader_reboot_multiple_link_request.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_leader_reboot_multiple_link_request.py:38: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_pbbr_aloc.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_pbbr_aloc.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_pbbr_aloc.py:35: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_ping.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_ping.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_ping.py:34: in <module>
    from pktverify import packet_verifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_ping_lla_src.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_ping_lla_src.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_ping_lla_src.py:34: in <module>
    from pktverify import packet_verifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_router_multicast_link_request.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_router_multicast_link_request.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_router_multicast_link_request.py:35: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_router_reboot_multiple_link_request.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_router_reboot_multiple_link_request.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_router_reboot_multiple_link_request.py:38: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/test_srp_client_change_lease.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/test_srp_client_change_lease.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/test_srp_client_change_lease.py:44: in <module>
    from pktverify.packet_filter import PacketFilter
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_filter.py:38: in <module>
    from pktverify.packet import Packet
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet.py:33: in <module>
    from pyshark.packet.layer import Layer as RawLayer
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_bmlr.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_bmlr.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_bmlr.py:43: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_dad.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_dad.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_dad.py:37: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_routing.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_routing.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_routing.py:36: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_routing_med.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_routing_med.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_routing_med.py:37: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mle_must_not_send_icmpv6_destination_unreachable.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mle_must_not_send_icmpv6_destination_unreachable.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mle_must_not_send_icmpv6_destination_unreachable.py:36: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing.py:36: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_across_thread_pans.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_across_thread_pans.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_across_thread_pans.py:35: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_commissioner_timeout.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_commissioner_timeout.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_commissioner_timeout.py:35: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_timeout.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_timeout.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_timeout.py:35: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_ndproxy.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_ndproxy.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_ndproxy.py:38: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_end_device_udp_reachability.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_end_device_udp_reachability.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_end_device_udp_reachability.py:35: in <module>
    import pktverify.verify
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/verify.py:41: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_firewall.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_firewall.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_firewall.py:36: in <module>
    import pktverify.packet_verifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_manual_maddress.py _
components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_manual_maddress.py:52: in <module>
    class ManualMulticastAddressConfig(thread_cert.TestCase):
components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_manual_maddress.py:97: in ManualMulticastAddressConfig
    def verify(self, pv: pktverify.packet_verifier.PacketVerifier):
E   AttributeError: module 'pktverify' has no attribute 'packet_verifier'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_manual_omr_prefix.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_manual_omr_prefix.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_manual_omr_prefix.py:35: in <module>
    from pktverify.packet_verifier import PacketVerifier
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_radvd_coexist.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_radvd_coexist.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_radvd_coexist.py:34: in <module>
    from pktverify import packet_verifier, packet_filter, consts
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_verifier.py:34: in <module>
    from pktverify.pcap_reader import PcapReader
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/pcap_reader.py:34: in <module>
    import pyshark
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_trel_connectivity.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_trel_connectivity.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_trel_connectivity.py:46: in <module>
    from pktverify.packet_filter import PacketFilter
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet_filter.py:38: in <module>
    from pktverify.packet import Packet
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/packet.py:33: in <module>
    from pyshark.packet.layer import Layer as RawLayer
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/border_router/nat64/test_multi_border_routers.py _
import file mismatch:
imported module 'test_multi_border_routers' has this __file__ attribute:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_multi_border_routers.py
which is not the same as the test file we want to collect:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/nat64/test_multi_border_routers.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/border_router/nat64/test_single_border_router.py _
import file mismatch:
imported module 'test_single_border_router' has this __file__ attribute:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_single_border_router.py
which is not the same as the test file we want to collect:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/border_router/nat64/test_single_border_router.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/test_layer_fields.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/test_layer_fields.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/test_layer_fields.py:35: in <module>
    from pktverify import layer_fields
components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/layer_fields.py:34: in <module>
    from pyshark.packet.fields import LayerFieldsContainer, LayerField
E   ModuleNotFoundError: No module named 'pyshark'
_ ERROR collecting components/components/openthread/openthread/third_party/mbedtls/repo/scripts/mbedtls_dev/test_case.py _
import file mismatch:
imported module 'mbedtls_dev.test_case' has this __file__ attribute:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/scripts/mbedtls_dev/test_case.py
which is not the same as the test file we want to collect:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/third_party/mbedtls/repo/scripts/mbedtls_dev/test_case.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting components/components/openthread/openthread/third_party/mbedtls/repo/scripts/mbedtls_dev/test_data_generation.py _
import file mismatch:
imported module 'mbedtls_dev.test_data_generation' has this __file__ attribute:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/scripts/mbedtls_dev/test_data_generation.py
which is not the same as the test file we want to collect:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/third_party/mbedtls/repo/scripts/mbedtls_dev/test_data_generation.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_config_script.py _
import file mismatch:
imported module 'test_config_script' has this __file__ attribute:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/tests/scripts/test_config_script.py
which is not the same as the test file we want to collect:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_config_script.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_generate_test_code.py _
import file mismatch:
imported module 'test_generate_test_code' has this __file__ attribute:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/tests/scripts/test_generate_test_code.py
which is not the same as the test file we want to collect:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_generate_test_code.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_psa_compliance.py _
import file mismatch:
imported module 'test_psa_compliance' has this __file__ attribute:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/tests/scripts/test_psa_compliance.py
which is not the same as the test file we want to collect:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_psa_compliance.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_psa_constant_names.py _
import file mismatch:
imported module 'test_psa_constant_names' has this __file__ attribute:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/tests/scripts/test_psa_constant_names.py
which is not the same as the test file we want to collect:
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_psa_constant_names.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
___ ERROR collecting components/components/openthread/openthread/tools/cp-caps/rcp_caps_test.py ___
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tools/cp-caps/rcp_caps_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tools/cp-caps/rcp_caps_test.py:38: in <module>
    import otci
E   ModuleNotFoundError: No module named 'otci'
___ ERROR collecting components/components/openthread/openthread/tools/otci/tests/test_otci.py ____
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tools/otci/tests/test_otci.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/openthread/openthread/tools/otci/tests/test_otci.py:36: in <module>
    import otci
E   ModuleNotFoundError: No module named 'otci'
_ ERROR collecting components/components/partition_table/test_gen_esp32part_host/check_sizes_test.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/partition_table/test_gen_esp32part_host/check_sizes_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
components/components/partition_table/test_gen_esp32part_host/check_sizes_test.py:18: in <module>
    import check_sizes
E   ModuleNotFoundError: No module named 'check_sizes'

During handling of the above exception, another exception occurred:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
components/components/partition_table/test_gen_esp32part_host/check_sizes_test.py:21: in <module>
    import check_sizes
E   ModuleNotFoundError: No module named 'check_sizes'
____ ERROR collecting components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py _____
In test_mspi_bus: function uses no fixture 'config'
_______________ ERROR collecting components/components/spiffs/spiffs/py/sp_test.py ________________
/home/leon/.local/lib/python3.10/site-packages/_pytest/python.py:599: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/home/leon/.local/lib/python3.10/site-packages/_pytest/pathlib.py:533: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
    ???
<frozen importlib._bootstrap>:1027: in _find_and_load
    ???
<frozen importlib._bootstrap>:1006: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:688: in _load_unlocked
    ???
/home/leon/.local/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:162: in exec_module
    source_stat, co = _rewrite_test(fn, self.config)
/home/leon/.local/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:364: in _rewrite_test
    tree = ast.parse(source, filename=strfn)
/usr/lib/python3.10/ast.py:50: in parse
    return compile(source, filename, mode, flags,
E     File "/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spiffs/spiffs/py/sp_test.py", line 38
E       print "filesystem size =",flash_size
E       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
_ ERROR collecting managed_components/espressif__tinyusb/examples/device/hid_generic_inout/hid_test.py _
ImportError while importing test module '/home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/managed_components/espressif__tinyusb/examples/device/hid_generic_inout/hid_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
managed_components/espressif__tinyusb/examples/device/hid_generic_inout/hid_test.py:2: in <module>
    import hid
E   ModuleNotFoundError: No module named 'hid'
======================================== warnings summary =========================================
components/components/bt/test_apps/basic_unit_test/pytest_basic_unit_test.py:7
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/bt/test_apps/basic_unit_test/pytest_basic_unit_test.py:7: PytestUnknownMarkWarning: Unknown pytest.mark.generic - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.generic

components/components/bt/test_apps/basic_unit_test/pytest_basic_unit_test.py:8
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/bt/test_apps/basic_unit_test/pytest_basic_unit_test.py:8: PytestUnknownMarkWarning: Unknown pytest.mark.esp32 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.esp32

components/components/bt/test_apps/basic_unit_test/pytest_basic_unit_test.py:9
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/bt/test_apps/basic_unit_test/pytest_basic_unit_test.py:9: PytestUnknownMarkWarning: Unknown pytest.mark.esp32c3 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.esp32c3

components/components/mbedtls/mbedtls/scripts/mbedtls_dev/test_case.py:25
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/scripts/mbedtls_dev/test_case.py:25: PytestCollectionWarning: cannot collect test class 'TestCase' because it has a __init__ constructor (from: components/components/mbedtls/mbedtls/scripts/mbedtls_dev/test_case.py)
    class TestCase:

components/components/mbedtls/mbedtls/scripts/mbedtls_dev/test_data_generation.py:140
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/scripts/mbedtls_dev/test_data_generation.py:140: PytestCollectionWarning: cannot collect test class 'TestGenerator' because it has a __init__ constructor (from: components/components/mbedtls/mbedtls/scripts/mbedtls_dev/test_data_generation.py)
    class TestGenerator:

components/components/mbedtls/mbedtls/tests/scripts/test_psa_constant_names.py:101
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/mbedtls/mbedtls/tests/scripts/test_psa_constant_names.py:101: PytestCollectionWarning: cannot collect test class 'Tests' because it has a __init__ constructor (from: components/components/mbedtls/mbedtls/tests/scripts/test_psa_constant_names.py)
    class Tests:

components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/test_info.py:37
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/test_info.py:37: PytestCollectionWarning: cannot collect test class 'TestInfo' because it has a __init__ constructor (from: components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/test_info.py)
    class TestInfo(object):

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:8
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:8: PytestUnknownMarkWarning: Unknown pytest.mark.temp_skip_ci - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD')  # TODO: IDF-8985

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:9
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:9: PytestUnknownMarkWarning: Unknown pytest.mark.supported_targets - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.supported_targets

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:10
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:10: PytestUnknownMarkWarning: Unknown pytest.mark.generic - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.generic

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:23
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:23: PytestUnknownMarkWarning: Unknown pytest.mark.esp32s2 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.esp32s2

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:24
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:24: PytestUnknownMarkWarning: Unknown pytest.mark.esp32s3 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.esp32s3

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:25
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:25: PytestUnknownMarkWarning: Unknown pytest.mark.generic - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.generic

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:37
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:37: PytestUnknownMarkWarning: Unknown pytest.mark.esp32 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.esp32

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:38
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:38: PytestUnknownMarkWarning: Unknown pytest.mark.esp32s2 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.esp32s2

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:39
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:39: PytestUnknownMarkWarning: Unknown pytest.mark.esp32s3 - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.esp32s3

components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:40
  /home/leon/uni/WS24/BA/bastion/hardware-trust-anchor/v15/components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py:40: PytestUnknownMarkWarning: Unknown pytest.mark.generic - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.generic

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===================================== short test summary info =====================================
ERROR components/components/fatfs/test_fatfsgen/test_fatfsgen.py
ERROR components/components/fatfs/test_fatfsgen/test_fatfsparse.py
ERROR components/components/fatfs/test_fatfsgen/test_utils.py
ERROR components/components/fatfs/test_fatfsgen/test_wl_fatfsgen.py
ERROR components/components/linux/test_apps/linux_test/pytest_linux_test.py
ERROR components/components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/test_gen_crt_bundle.py
ERROR components/components/openthread/openthread/tests/scripts/misc/test_rcp_reset.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_detach.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_inform_previous_parent_on_reattach.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_leader_reboot_multiple_link_request.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_pbbr_aloc.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_ping.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_ping_lla_src.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_router_multicast_link_request.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_router_reboot_multiple_link_request.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/test_srp_client_change_lease.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_bmlr.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_dad.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_routing.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_dua_routing_med.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mle_must_not_send_icmpv6_destination_unreachable.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_across_thread_pans.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_commissioner_timeout.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_mlr_multicast_routing_timeout.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/backbone/test_ndproxy.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_end_device_udp_reachability.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_firewall.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_manual_maddress.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_manual_omr_prefix.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_radvd_coexist.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/border_router/test_trel_connectivity.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/border_router/nat64/test_multi_border_routers.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/border_router/nat64/test_single_border_router.py
ERROR components/components/openthread/openthread/tests/scripts/thread-cert/pktverify/test_layer_fields.py
ERROR components/components/openthread/openthread/third_party/mbedtls/repo/scripts/mbedtls_dev/test_case.py
ERROR components/components/openthread/openthread/third_party/mbedtls/repo/scripts/mbedtls_dev/test_data_generation.py
ERROR components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_config_script.py
ERROR components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_generate_test_code.py
ERROR components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_psa_compliance.py
ERROR components/components/openthread/openthread/third_party/mbedtls/repo/tests/scripts/test_psa_constant_names.py
ERROR components/components/openthread/openthread/tools/cp-caps/rcp_caps_test.py
ERROR components/components/openthread/openthread/tools/otci/tests/test_otci.py
ERROR components/components/partition_table/test_gen_esp32part_host/check_sizes_test.py
ERROR components/components/spi_flash/test_apps/mspi_test/pytest_mspi_test.py
ERROR components/components/spiffs/spiffs/py/sp_test.py
ERROR managed_components/espressif__tinyusb/examples/device/hid_generic_inout/hid_test.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 47 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================= 17 warnings, 47 errors in 3.59s =================================
leon@LeonsNotebookMInt:~/uni/WS24/BA/bastion/hardware-trust-anchor/v15$ 

@peter-marcisovsky
Copy link
Collaborator

Hi,

If I try to run pytest in the idf folder, I get following error

By doing so (by running esp-idf/ pytest --target esp32s3) you ordered the pytest to run all the pytest*.py files within the esp-idf. Try to run a pytest from a hello world example, for start, it should be something like
peter@peter ➜ ~/esp/esp-idf/examples/get-started/hello_world git:(master) ✗ pytest --target esp32s3

However, if I just call pytest in my VSCode directory

AFAIK, calling just pytest does not do anything useful, until you don't specify a target pytest --targe tesp32xx

I get following errors, which is a bit confusing since I did install the pytest dependencies with : $ install.sh --enable-pytest

Please take a look at the idf pytest docs about installation and running the pytest locally here.
I think you are missing . ./export.sh call after install.sh --enable-pytest

E KeyError: 'IDF_PATH'

Looks like you do not have the IDF_PATH set

Just try echo $IDF_PATH it should return you a path to the esp-idf (if the path has been set)

Please follow instructions how to install and setup esp-idf on your linux machine.
Looks like the same problem as above, missing . ./export.sh

@LeonBirkel
Copy link
Author

I decided to just not use pytest. I followed all the setup docs.
Maybe a missed something. Thank you for your help and replies!

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Won't Do This will not be worked on and removed Status: Opened Issue is new labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

4 participants