Skip to content

ci(tests): Fix workflow errors #2416

ci(tests): Fix workflow errors

ci(tests): Fix workflow errors #2416

GitHub Actions / Test Results failed Jul 24, 2024 in 0s

8 errors, 21 pass in 14m 35s

112 files  ±0  112 suites  ±0   14m 35s ⏱️ +53s
 29 tests ±0   21 ✅ ±0  0 💤 ±0  0 ❌ ±0   8 🔥 ±0 
221 runs  +2  185 ✅ +4  0 💤 ±0  0 ❌ ±0  36 🔥  - 2 

Results for commit fcbcd51. ± Comparison against earlier commit 4a92902.

Annotations

Check failure on line 0 in validation.nvs.test_nvs

See this annotation in the file changed.

@github-actions github-actions / Test Results

12 out of 34 runs with error: test_nvs (validation.nvs.test_nvs)

./artifacts/parent-artifacts/results/hw/validation/nvs/esp32c3/nvs0.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32c3/nvs1.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32c6/nvs0.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32c6/nvs1.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32c6/nvs2.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32c6/nvs3.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32h2/nvs0.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32h2/nvs1.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32h2/nvs2.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32h2/nvs3.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32s2/nvs0.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/nvs/esp32s2/nvs1.xml [took 3s]
Raw output
failed on setup with "ValueError: Couldn't auto detect chip. Please manually specify with "--port""
args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ino.app.ArduinoApp object at 0x7f7990044e80>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f7990017ee0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f7990036950>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)

/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1086: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:409: in serial_gn
    return cls(**_drop_none_kwargs(kwargs))
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:26: in __init__
    super().__init__(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_arduino.serial.ArduinoSerial object at 0x7f7990045300>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f7990044d60>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f7990017ee0>
target = 'esp32h2', beta_target = None, port = None, port_mac = None
baud = 115200, esptool_baud = 921600, esp_flash_force = False
skip_autoflash = False, erase_all = False
meta = Meta(logdir='/tmp/pytest-embedded/2024-07-24_21-33-51-344518/test_nvs', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
kwargs = {}, available_ports = ['/dev/ttyS0'], ports = ['/dev/ttyS0']

    def __init__(
        self,
        pexpect_proc: PexpectProcess,
        msg_queue: MessageQueue,
        target: Optional[str] = None,
        beta_target: Optional[str] = None,
        port: Optional[str] = None,
        port_mac: Optional[str] = None,
        baud: int = Serial.DEFAULT_BAUDRATE,
        esptool_baud: int = ESPTOOL_DEFAULT_BAUDRATE,
        esp_flash_force: bool = False,
        skip_autoflash: bool = False,
        erase_all: bool = False,
        meta: Optional[Meta] = None,
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None:
            available_ports = esptool.get_port_list()
            ports = list(set(available_ports) - set(self.occupied_ports.keys()))
    
            # sort to make /dev/ttyS* ports before /dev/ttyUSB* ports
            # esptool will reverse the list
            ports.sort()
            if port_mac:
                for port in ports:
                    if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                        ports = [port]
                        break
                else:
                    raise ValueError(f'The specified MAC address {port_mac} cannot be found.')
    
            # prioritize the cache recorded target port
            if esptool_target and self._meta:
                ports.sort(key=lambda x: self._meta.hit_port_target_cache(x, esptool_target))
    
            logging.debug(f'Detecting ports from {", ".join(ports)}')
        else:
            if port_mac:
                if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                    ports = [port]
                else:
                    raise ValueError(f'The specified MAC address {port_mac} binds with different port, not with {port}')
            else:
                ports = [port]
    
        # normal loader
        if esptool_target not in ['auto', *ESPTOOL_CHIPS]:
            raise ValueError(
                f'esptool version {ESPTOOL_VERSION} not support target {esptool_target}\n'
                f'Supported targets: {ESPTOOL_CHIPS}'
            )
    
        with contextlib.redirect_stdout(msg_queue):
            self.esp = esptool.get_default_connected_device(
                ports,
                port=port,
                connect_attempts=3,
                initial_baud=baud,
                chip=esptool_target,
            )
    
        if not self.esp:
>           raise ValueError('Couldn\'t auto detect chip. Please manually specify with "--port"')
E           ValueError: Couldn't auto detect chip. Please manually specify with "--port"

/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:116: ValueError

Check failure on line 0 in validation.timer.test_timer

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 4 runs with error: test_timer (validation.timer.test_timer)

./artifacts/parent-artifacts/results/hw/validation/timer/esp32c3/timer.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/timer/esp32c6/timer.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/timer/esp32h2/timer.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/timer/esp32s2/timer.xml [took 3s]
Raw output
failed on setup with "ValueError: Couldn't auto detect chip. Please manually specify with "--port""
args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ino.app.ArduinoApp object at 0x7f1556fe4fd0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f1556fe4070>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f1556fd6950>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)

/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1086: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:409: in serial_gn
    return cls(**_drop_none_kwargs(kwargs))
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:26: in __init__
    super().__init__(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_arduino.serial.ArduinoSerial object at 0x7f1556fe5450>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f1556fe4eb0>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f1556fe4070>
target = 'esp32s2', beta_target = None, port = None, port_mac = None
baud = 115200, esptool_baud = 921600, esp_flash_force = False
skip_autoflash = False, erase_all = False
meta = Meta(logdir='/tmp/pytest-embedded/2024-07-24_21-37-14-935279/test_timer', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
kwargs = {}, available_ports = ['/dev/ttyS0'], ports = ['/dev/ttyS0']

    def __init__(
        self,
        pexpect_proc: PexpectProcess,
        msg_queue: MessageQueue,
        target: Optional[str] = None,
        beta_target: Optional[str] = None,
        port: Optional[str] = None,
        port_mac: Optional[str] = None,
        baud: int = Serial.DEFAULT_BAUDRATE,
        esptool_baud: int = ESPTOOL_DEFAULT_BAUDRATE,
        esp_flash_force: bool = False,
        skip_autoflash: bool = False,
        erase_all: bool = False,
        meta: Optional[Meta] = None,
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None:
            available_ports = esptool.get_port_list()
            ports = list(set(available_ports) - set(self.occupied_ports.keys()))
    
            # sort to make /dev/ttyS* ports before /dev/ttyUSB* ports
            # esptool will reverse the list
            ports.sort()
            if port_mac:
                for port in ports:
                    if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                        ports = [port]
                        break
                else:
                    raise ValueError(f'The specified MAC address {port_mac} cannot be found.')
    
            # prioritize the cache recorded target port
            if esptool_target and self._meta:
                ports.sort(key=lambda x: self._meta.hit_port_target_cache(x, esptool_target))
    
            logging.debug(f'Detecting ports from {", ".join(ports)}')
        else:
            if port_mac:
                if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                    ports = [port]
                else:
                    raise ValueError(f'The specified MAC address {port_mac} binds with different port, not with {port}')
            else:
                ports = [port]
    
        # normal loader
        if esptool_target not in ['auto', *ESPTOOL_CHIPS]:
            raise ValueError(
                f'esptool version {ESPTOOL_VERSION} not support target {esptool_target}\n'
                f'Supported targets: {ESPTOOL_CHIPS}'
            )
    
        with contextlib.redirect_stdout(msg_queue):
            self.esp = esptool.get_default_connected_device(
                ports,
                port=port,
                connect_attempts=3,
                initial_baud=baud,
                chip=esptool_target,
            )
    
        if not self.esp:
>           raise ValueError('Couldn\'t auto detect chip. Please manually specify with "--port"')
E           ValueError: Couldn't auto detect chip. Please manually specify with "--port"

/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:116: ValueError

Check failure on line 0 in validation.democfg.test_democfg

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 12 runs with error: test_cfg (validation.democfg.test_democfg)

./artifacts/parent-artifacts/results/hw/validation/democfg/esp32c3/democfg.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/democfg/esp32c6/democfg.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/democfg/esp32s2/democfg.xml [took 3s]
Raw output
failed on setup with "ValueError: Couldn't auto detect chip. Please manually specify with "--port""
args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ino.app.ArduinoApp object at 0x7fa961c50eb0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7fa961c1ff10>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7fa961c42950>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)

/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1086: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:409: in serial_gn
    return cls(**_drop_none_kwargs(kwargs))
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:26: in __init__
    super().__init__(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_arduino.serial.ArduinoSerial object at 0x7fa961c51330>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7fa961c50d90>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7fa961c1ff10>
target = 'esp32s2', beta_target = None, port = None, port_mac = None
baud = 115200, esptool_baud = 921600, esp_flash_force = False
skip_autoflash = False, erase_all = False
meta = Meta(logdir='/tmp/pytest-embedded/2024-07-24_21-35-57-400015/test_cfg', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
kwargs = {}, available_ports = ['/dev/ttyS0'], ports = ['/dev/ttyS0']

    def __init__(
        self,
        pexpect_proc: PexpectProcess,
        msg_queue: MessageQueue,
        target: Optional[str] = None,
        beta_target: Optional[str] = None,
        port: Optional[str] = None,
        port_mac: Optional[str] = None,
        baud: int = Serial.DEFAULT_BAUDRATE,
        esptool_baud: int = ESPTOOL_DEFAULT_BAUDRATE,
        esp_flash_force: bool = False,
        skip_autoflash: bool = False,
        erase_all: bool = False,
        meta: Optional[Meta] = None,
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None:
            available_ports = esptool.get_port_list()
            ports = list(set(available_ports) - set(self.occupied_ports.keys()))
    
            # sort to make /dev/ttyS* ports before /dev/ttyUSB* ports
            # esptool will reverse the list
            ports.sort()
            if port_mac:
                for port in ports:
                    if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                        ports = [port]
                        break
                else:
                    raise ValueError(f'The specified MAC address {port_mac} cannot be found.')
    
            # prioritize the cache recorded target port
            if esptool_target and self._meta:
                ports.sort(key=lambda x: self._meta.hit_port_target_cache(x, esptool_target))
    
            logging.debug(f'Detecting ports from {", ".join(ports)}')
        else:
            if port_mac:
                if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                    ports = [port]
                else:
                    raise ValueError(f'The specified MAC address {port_mac} binds with different port, not with {port}')
            else:
                ports = [port]
    
        # normal loader
        if esptool_target not in ['auto', *ESPTOOL_CHIPS]:
            raise ValueError(
                f'esptool version {ESPTOOL_VERSION} not support target {esptool_target}\n'
                f'Supported targets: {ESPTOOL_CHIPS}'
            )
    
        with contextlib.redirect_stdout(msg_queue):
            self.esp = esptool.get_default_connected_device(
                ports,
                port=port,
                connect_attempts=3,
                initial_baud=baud,
                chip=esptool_target,
            )
    
        if not self.esp:
>           raise ValueError('Couldn\'t auto detect chip. Please manually specify with "--port"')
E           ValueError: Couldn't auto detect chip. Please manually specify with "--port"

/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:116: ValueError

Check failure on line 0 in validation.uart.test_uart

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 4 runs with error: test_uart (validation.uart.test_uart)

./artifacts/parent-artifacts/results/hw/validation/uart/esp32c3/uart.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/uart/esp32c6/uart.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/uart/esp32h2/uart.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/uart/esp32s2/uart.xml [took 3s]
Raw output
failed on setup with "ValueError: Couldn't auto detect chip. Please manually specify with "--port""
args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ino.app.ArduinoApp object at 0x7fe5565dcfa0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7fe5565dc040>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7fe5565ce950>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)

/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1086: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:409: in serial_gn
    return cls(**_drop_none_kwargs(kwargs))
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:26: in __init__
    super().__init__(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_arduino.serial.ArduinoSerial object at 0x7fe5565dd420>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7fe5565dce80>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7fe5565dc040>
target = 'esp32h2', beta_target = None, port = None, port_mac = None
baud = 115200, esptool_baud = 921600, esp_flash_force = False
skip_autoflash = False, erase_all = False
meta = Meta(logdir='/tmp/pytest-embedded/2024-07-24_21-34-53-219671/test_uart', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
kwargs = {}, available_ports = ['/dev/ttyS0'], ports = ['/dev/ttyS0']

    def __init__(
        self,
        pexpect_proc: PexpectProcess,
        msg_queue: MessageQueue,
        target: Optional[str] = None,
        beta_target: Optional[str] = None,
        port: Optional[str] = None,
        port_mac: Optional[str] = None,
        baud: int = Serial.DEFAULT_BAUDRATE,
        esptool_baud: int = ESPTOOL_DEFAULT_BAUDRATE,
        esp_flash_force: bool = False,
        skip_autoflash: bool = False,
        erase_all: bool = False,
        meta: Optional[Meta] = None,
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None:
            available_ports = esptool.get_port_list()
            ports = list(set(available_ports) - set(self.occupied_ports.keys()))
    
            # sort to make /dev/ttyS* ports before /dev/ttyUSB* ports
            # esptool will reverse the list
            ports.sort()
            if port_mac:
                for port in ports:
                    if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                        ports = [port]
                        break
                else:
                    raise ValueError(f'The specified MAC address {port_mac} cannot be found.')
    
            # prioritize the cache recorded target port
            if esptool_target and self._meta:
                ports.sort(key=lambda x: self._meta.hit_port_target_cache(x, esptool_target))
    
            logging.debug(f'Detecting ports from {", ".join(ports)}')
        else:
            if port_mac:
                if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                    ports = [port]
                else:
                    raise ValueError(f'The specified MAC address {port_mac} binds with different port, not with {port}')
            else:
                ports = [port]
    
        # normal loader
        if esptool_target not in ['auto', *ESPTOOL_CHIPS]:
            raise ValueError(
                f'esptool version {ESPTOOL_VERSION} not support target {esptool_target}\n'
                f'Supported targets: {ESPTOOL_CHIPS}'
            )
    
        with contextlib.redirect_stdout(msg_queue):
            self.esp = esptool.get_default_connected_device(
                ports,
                port=port,
                connect_attempts=3,
                initial_baud=baud,
                chip=esptool_target,
            )
    
        if not self.esp:
>           raise ValueError('Couldn\'t auto detect chip. Please manually specify with "--port"')
E           ValueError: Couldn't auto detect chip. Please manually specify with "--port"

/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:116: ValueError

Check failure on line 0 in validation.hello_world.test_hello_world

See this annotation in the file changed.

@github-actions github-actions / Test Results

4 out of 12 runs with error: test_hello_world (validation.hello_world.test_hello_world)

./artifacts/parent-artifacts/results/hw/validation/hello_world/esp32c3/hello_world.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/hello_world/esp32c6/hello_world.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/hello_world/esp32h2/hello_world.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/hello_world/esp32s2/hello_world.xml [took 3s]
Raw output
failed on setup with "ValueError: Couldn't auto detect chip. Please manually specify with "--port""
args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ino.app.ArduinoApp object at 0x7fcaa7000dc0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7fcaa6fcfe20>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7fcaa6feea70>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)

/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1086: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:409: in serial_gn
    return cls(**_drop_none_kwargs(kwargs))
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:26: in __init__
    super().__init__(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_arduino.serial.ArduinoSerial object at 0x7fcaa7001240>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7fcaa7000ca0>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7fcaa6fcfe20>
target = 'esp32s2', beta_target = None, port = None, port_mac = None
baud = 115200, esptool_baud = 921600, esp_flash_force = False
skip_autoflash = False, erase_all = False
meta = Meta(logdir='/tmp/pytest-embedded/2024-07-24_21-36-12-959827/test_hello_world', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
kwargs = {}, available_ports = ['/dev/ttyS0'], ports = ['/dev/ttyS0']

    def __init__(
        self,
        pexpect_proc: PexpectProcess,
        msg_queue: MessageQueue,
        target: Optional[str] = None,
        beta_target: Optional[str] = None,
        port: Optional[str] = None,
        port_mac: Optional[str] = None,
        baud: int = Serial.DEFAULT_BAUDRATE,
        esptool_baud: int = ESPTOOL_DEFAULT_BAUDRATE,
        esp_flash_force: bool = False,
        skip_autoflash: bool = False,
        erase_all: bool = False,
        meta: Optional[Meta] = None,
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None:
            available_ports = esptool.get_port_list()
            ports = list(set(available_ports) - set(self.occupied_ports.keys()))
    
            # sort to make /dev/ttyS* ports before /dev/ttyUSB* ports
            # esptool will reverse the list
            ports.sort()
            if port_mac:
                for port in ports:
                    if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                        ports = [port]
                        break
                else:
                    raise ValueError(f'The specified MAC address {port_mac} cannot be found.')
    
            # prioritize the cache recorded target port
            if esptool_target and self._meta:
                ports.sort(key=lambda x: self._meta.hit_port_target_cache(x, esptool_target))
    
            logging.debug(f'Detecting ports from {", ".join(ports)}')
        else:
            if port_mac:
                if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                    ports = [port]
                else:
                    raise ValueError(f'The specified MAC address {port_mac} binds with different port, not with {port}')
            else:
                ports = [port]
    
        # normal loader
        if esptool_target not in ['auto', *ESPTOOL_CHIPS]:
            raise ValueError(
                f'esptool version {ESPTOOL_VERSION} not support target {esptool_target}\n'
                f'Supported targets: {ESPTOOL_CHIPS}'
            )
    
        with contextlib.redirect_stdout(msg_queue):
            self.esp = esptool.get_default_connected_device(
                ports,
                port=port,
                connect_attempts=3,
                initial_baud=baud,
                chip=esptool_target,
            )
    
        if not self.esp:
>           raise ValueError('Couldn\'t auto detect chip. Please manually specify with "--port"')
E           ValueError: Couldn't auto detect chip. Please manually specify with "--port"

/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:116: ValueError

Check failure on line 0 in validation.periman.test_periman

See this annotation in the file changed.

@github-actions github-actions / Test Results

4 out of 6 runs with error: test_periman (validation.periman.test_periman)

./artifacts/parent-artifacts/results/hw/validation/periman/esp32c3/periman.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/periman/esp32c6/periman.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/periman/esp32h2/periman.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/periman/esp32s2/periman.xml [took 3s]
Raw output
failed on setup with "ValueError: Couldn't auto detect chip. Please manually specify with "--port""
args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ino.app.ArduinoApp object at 0x7f44c2bb8f10>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f44c2b8bf70>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f44c2baa950>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)

/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1086: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:409: in serial_gn
    return cls(**_drop_none_kwargs(kwargs))
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:26: in __init__
    super().__init__(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_arduino.serial.ArduinoSerial object at 0x7f44c2bb9390>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f44c2bb8df0>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f44c2b8bf70>
target = 'esp32c6', beta_target = None, port = None, port_mac = None
baud = 115200, esptool_baud = 921600, esp_flash_force = False
skip_autoflash = False, erase_all = False
meta = Meta(logdir='/tmp/pytest-embedded/2024-07-24_21-34-36-755994/test_periman', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
kwargs = {}, available_ports = ['/dev/ttyS0'], ports = ['/dev/ttyS0']

    def __init__(
        self,
        pexpect_proc: PexpectProcess,
        msg_queue: MessageQueue,
        target: Optional[str] = None,
        beta_target: Optional[str] = None,
        port: Optional[str] = None,
        port_mac: Optional[str] = None,
        baud: int = Serial.DEFAULT_BAUDRATE,
        esptool_baud: int = ESPTOOL_DEFAULT_BAUDRATE,
        esp_flash_force: bool = False,
        skip_autoflash: bool = False,
        erase_all: bool = False,
        meta: Optional[Meta] = None,
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None:
            available_ports = esptool.get_port_list()
            ports = list(set(available_ports) - set(self.occupied_ports.keys()))
    
            # sort to make /dev/ttyS* ports before /dev/ttyUSB* ports
            # esptool will reverse the list
            ports.sort()
            if port_mac:
                for port in ports:
                    if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                        ports = [port]
                        break
                else:
                    raise ValueError(f'The specified MAC address {port_mac} cannot be found.')
    
            # prioritize the cache recorded target port
            if esptool_target and self._meta:
                ports.sort(key=lambda x: self._meta.hit_port_target_cache(x, esptool_target))
    
            logging.debug(f'Detecting ports from {", ".join(ports)}')
        else:
            if port_mac:
                if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                    ports = [port]
                else:
                    raise ValueError(f'The specified MAC address {port_mac} binds with different port, not with {port}')
            else:
                ports = [port]
    
        # normal loader
        if esptool_target not in ['auto', *ESPTOOL_CHIPS]:
            raise ValueError(
                f'esptool version {ESPTOOL_VERSION} not support target {esptool_target}\n'
                f'Supported targets: {ESPTOOL_CHIPS}'
            )
    
        with contextlib.redirect_stdout(msg_queue):
            self.esp = esptool.get_default_connected_device(
                ports,
                port=port,
                connect_attempts=3,
                initial_baud=baud,
                chip=esptool_target,
            )
    
        if not self.esp:
>           raise ValueError('Couldn\'t auto detect chip. Please manually specify with "--port"')
E           ValueError: Couldn't auto detect chip. Please manually specify with "--port"

/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:116: ValueError

Check failure on line 0 in validation.unity.test_unity

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 4 runs with error: test_unity (validation.unity.test_unity)

./artifacts/parent-artifacts/results/hw/validation/unity/esp32c3/unity.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/unity/esp32c6/unity.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/unity/esp32h2/unity.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/unity/esp32s2/unity.xml [took 3s]
Raw output
failed on setup with "ValueError: Couldn't auto detect chip. Please manually specify with "--port""
args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ino.app.ArduinoApp object at 0x7f0d7f6b5030>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f0d7f6b40d0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f0d7f6a6950>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)

/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1086: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:409: in serial_gn
    return cls(**_drop_none_kwargs(kwargs))
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:26: in __init__
    super().__init__(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_arduino.serial.ArduinoSerial object at 0x7f0d7f6b54b0>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f0d7f6b4f10>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f0d7f6b40d0>
target = 'esp32c6', beta_target = None, port = None, port_mac = None
baud = 115200, esptool_baud = 921600, esp_flash_force = False
skip_autoflash = False, erase_all = False
meta = Meta(logdir='/tmp/pytest-embedded/2024-07-24_21-35-23-199216/test_unity', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
kwargs = {}, available_ports = ['/dev/ttyS0'], ports = ['/dev/ttyS0']

    def __init__(
        self,
        pexpect_proc: PexpectProcess,
        msg_queue: MessageQueue,
        target: Optional[str] = None,
        beta_target: Optional[str] = None,
        port: Optional[str] = None,
        port_mac: Optional[str] = None,
        baud: int = Serial.DEFAULT_BAUDRATE,
        esptool_baud: int = ESPTOOL_DEFAULT_BAUDRATE,
        esp_flash_force: bool = False,
        skip_autoflash: bool = False,
        erase_all: bool = False,
        meta: Optional[Meta] = None,
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None:
            available_ports = esptool.get_port_list()
            ports = list(set(available_ports) - set(self.occupied_ports.keys()))
    
            # sort to make /dev/ttyS* ports before /dev/ttyUSB* ports
            # esptool will reverse the list
            ports.sort()
            if port_mac:
                for port in ports:
                    if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                        ports = [port]
                        break
                else:
                    raise ValueError(f'The specified MAC address {port_mac} cannot be found.')
    
            # prioritize the cache recorded target port
            if esptool_target and self._meta:
                ports.sort(key=lambda x: self._meta.hit_port_target_cache(x, esptool_target))
    
            logging.debug(f'Detecting ports from {", ".join(ports)}')
        else:
            if port_mac:
                if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                    ports = [port]
                else:
                    raise ValueError(f'The specified MAC address {port_mac} binds with different port, not with {port}')
            else:
                ports = [port]
    
        # normal loader
        if esptool_target not in ['auto', *ESPTOOL_CHIPS]:
            raise ValueError(
                f'esptool version {ESPTOOL_VERSION} not support target {esptool_target}\n'
                f'Supported targets: {ESPTOOL_CHIPS}'
            )
    
        with contextlib.redirect_stdout(msg_queue):
            self.esp = esptool.get_default_connected_device(
                ports,
                port=port,
                connect_attempts=3,
                initial_baud=baud,
                chip=esptool_target,
            )
    
        if not self.esp:
>           raise ValueError('Couldn\'t auto detect chip. Please manually specify with "--port"')
E           ValueError: Couldn't auto detect chip. Please manually specify with "--port"

/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:116: ValueError

Check failure on line 0 in validation.touch.test_touch

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_touch (validation.touch.test_touch) with error

./artifacts/parent-artifacts/results/hw/validation/touch/esp32s2/touch.xml [took 3s]
Raw output
failed on setup with "ValueError: Couldn't auto detect chip. Please manually specify with "--port""
args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ino.app.ArduinoApp object at 0x7f47ed869030>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f47ed8680d0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f47ed856950>
res = None

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        def _close_or_terminate(obj):
            if obj is None:
                del obj
                return
    
            try:
                if isinstance(obj, (subprocess.Popen, multiprocessing.process.BaseProcess)):
                    obj.terminate()
                    obj.kill()
                elif isinstance(obj, io.IOBase):
                    try:
                        obj.close()
                    except Exception as e:
                        logging.debug('file %s closed failed with error: %s', obj, str(e))
                else:
                    try:
                        obj.close()
                    except AttributeError:
                        try:
                            obj.terminate()
                        except AttributeError:
                            pass
                    except Exception as e:
                        logging.debug('Not properly caught object %s: %s', obj, str(e))
            except Exception as e:
                logging.debug('%s: %s', obj, str(e))
                return  # swallow up all error
            finally:
                referrers = gc.get_referrers(obj)
                for _referrer in referrers:
                    if isinstance(_referrer, list):
                        for _i, val in enumerate(_referrer):
                            if val is obj:
                                _referrer[_i] = None
                    elif isinstance(_referrer, dict):
                        for key, value in _referrer.items():
                            if value is obj:
                                _referrer[key] = None
                del obj
    
        if _COUNT == 1:
            res = None
            try:
>               res = func(*args, **kwargs)

/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1086: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:409: in serial_gn
    return cls(**_drop_none_kwargs(kwargs))
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:26: in __init__
    super().__init__(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_arduino.serial.ArduinoSerial object at 0x7f47ed8694b0>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f47ed868f10>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f47ed8680d0>
target = 'esp32s2', beta_target = None, port = None, port_mac = None
baud = 115200, esptool_baud = 921600, esp_flash_force = False
skip_autoflash = False, erase_all = False
meta = Meta(logdir='/tmp/pytest-embedded/2024-07-24_21-37-30-451579/test_touch', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
kwargs = {}, available_ports = ['/dev/ttyS0'], ports = ['/dev/ttyS0']

    def __init__(
        self,
        pexpect_proc: PexpectProcess,
        msg_queue: MessageQueue,
        target: Optional[str] = None,
        beta_target: Optional[str] = None,
        port: Optional[str] = None,
        port_mac: Optional[str] = None,
        baud: int = Serial.DEFAULT_BAUDRATE,
        esptool_baud: int = ESPTOOL_DEFAULT_BAUDRATE,
        esp_flash_force: bool = False,
        skip_autoflash: bool = False,
        erase_all: bool = False,
        meta: Optional[Meta] = None,
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None:
            available_ports = esptool.get_port_list()
            ports = list(set(available_ports) - set(self.occupied_ports.keys()))
    
            # sort to make /dev/ttyS* ports before /dev/ttyUSB* ports
            # esptool will reverse the list
            ports.sort()
            if port_mac:
                for port in ports:
                    if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                        ports = [port]
                        break
                else:
                    raise ValueError(f'The specified MAC address {port_mac} cannot be found.')
    
            # prioritize the cache recorded target port
            if esptool_target and self._meta:
                ports.sort(key=lambda x: self._meta.hit_port_target_cache(x, esptool_target))
    
            logging.debug(f'Detecting ports from {", ".join(ports)}')
        else:
            if port_mac:
                if _is_port_mac_verified(pexpect_proc, port, port_mac, msg_queue):
                    ports = [port]
                else:
                    raise ValueError(f'The specified MAC address {port_mac} binds with different port, not with {port}')
            else:
                ports = [port]
    
        # normal loader
        if esptool_target not in ['auto', *ESPTOOL_CHIPS]:
            raise ValueError(
                f'esptool version {ESPTOOL_VERSION} not support target {esptool_target}\n'
                f'Supported targets: {ESPTOOL_CHIPS}'
            )
    
        with contextlib.redirect_stdout(msg_queue):
            self.esp = esptool.get_default_connected_device(
                ports,
                port=port,
                connect_attempts=3,
                initial_baud=baud,
                chip=esptool_target,
            )
    
        if not self.esp:
>           raise ValueError('Couldn\'t auto detect chip. Please manually specify with "--port"')
E           ValueError: Couldn't auto detect chip. Please manually specify with "--port"

/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:116: ValueError

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Test Results

29 tests found

There are 29 tests, see "Raw output" for the full list of tests.
Raw output
auto_baudrate_test
basic_transmission_test
begin_when_running_test
change_baudrate_test
change_cpu_frequency_test
change_pins_test
disabled_uart_calls_test
enabled_uart_calls_test
end_when_stopped_test
periman_test
resize_buffers_test
test_fail
test_pass
test_touch_errors
test_touch_interrtupt
test_touch_read
timer_clock_select_test
timer_divider_test
timer_interrupt_test
timer_read_test
validation.democfg.test_democfg ‑ test_cfg
validation.hello_world.test_hello_world ‑ test_hello_world
validation.nvs.test_nvs ‑ test_nvs
validation.periman.test_periman ‑ test_periman
validation.timer.test_timer ‑ test_timer
validation.touch.test_touch ‑ test_touch
validation.uart.test_uart ‑ test_uart
validation.unity.test_unity ‑ test_unity
validation.wifi.test_wifi ‑ test_wifi