Skip to content

ci(tests): Add linpack FPU tests #3186

ci(tests): Add linpack FPU tests

ci(tests): Add linpack FPU tests #3186

GitHub Actions / Test Results failed Oct 3, 2024 in 0s

8 errors, 23 pass in 1h 38m 46s

130 files  +130  130 suites  +130   1h 38m 46s ⏱️ + 1h 38m 46s
 31 tests + 31   23 ✅ + 23  0 💤 ±0  0 ❌ ±0   8 🔥 + 8 
277 runs  +277  263 ✅ +263  0 💤 ±0  1 ❌ +1  13 🔥 +13 

Results for commit 0573b36. ± Comparison against earlier commit ca0581b.

Annotations

Check failure on line 0 in validation.nvs.test_nvs

See this annotation in the file changed.

@github-actions github-actions / Test Results

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

./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 0x7fef5a147c70>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7fef5a146ce0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7fef5a18ce50>
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:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1111: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:431: 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 0x7fef5a147fd0>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7fef5a147b50>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7fef5a146ce0>
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-10-02_17-56-57-676030/test_nvs', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
ports_to_occupy = (), 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,
        ports_to_occupy: List[str] = (),
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None or port.endswith('*'):
            port_filter = port.strip('*') if port else ''
            available_ports = [_p for _p in esptool.get_port_list() if port_filter in _p]
            ports = list(set(available_ports) - set(self.occupied_ports.keys()) - set(ports_to_occupy))
    
            # 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:118: ValueError

Check failure on line 0 in validation.uart.test_uart

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_uart (validation.uart.test_uart) with error

./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 0x7f7aedef3d60>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f7aedef2dd0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f7aedf38e50>
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:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1111: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:431: 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 0x7f7aedc08130>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f7aedef3c40>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f7aedef2dd0>
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-10-02_17-58-21-939855/test_uart', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
ports_to_occupy = (), 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,
        ports_to_occupy: List[str] = (),
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None or port.endswith('*'):
            port_filter = port.strip('*') if port else ''
            available_ports = [_p for _p in esptool.get_port_list() if port_filter in _p]
            ports = list(set(available_ports) - set(self.occupied_ports.keys()) - set(ports_to_occupy))
    
            # 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:118: 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

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

./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 0x7f8e67a3fbe0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f8e67a3ec50>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f8e67a84f70>
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:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1111: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:431: 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 0x7f8e67a3ff40>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f8e67a3fac0>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f8e67a3ec50>
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-10-02_17-56-42-172357/test_hello_world', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
ports_to_occupy = (), 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,
        ports_to_occupy: List[str] = (),
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None or port.endswith('*'):
            port_filter = port.strip('*') if port else ''
            available_ports = [_p for _p in esptool.get_port_list() if port_filter in _p]
            ports = list(set(available_ports) - set(self.occupied_ports.keys()) - set(ports_to_occupy))
    
            # 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:118: ValueError

Check failure on line 0 in performance.psramspeed.test_psramspeed

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 6 runs with error: test_psramspeed (performance.psramspeed.test_psramspeed)

./artifacts/parent-artifacts/results/hw/validation/psram/esp32s2/psram.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/psram/esp32s3/psram0.xml [took 0s]
./artifacts/parent-artifacts/results/hw/validation/psram/esp32s3/psram1.xml [took 0s]
Raw output
failed on setup with "SystemExit: 2"
self = AddrFilenamePairAction(option_strings=[], dest='addr_filename', nargs='+', const=None, default=None, type=None, choices=None, help='Address followed by binary filename, separated by space', metavar='<address> <filename>')
parser = ArgumentParser(prog='esptool write_flash', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
namespace = Namespace(addr_filename=None, erase_all=False, flash_freq='keep', flash_mode='keep', flash_size='keep', spi_connection...=False, encrypt_files=None, ignore_flash_encryption_efuse_setting=False, force=False, compress=None, no_compress=False)
values = ['0', '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bootloader.bin', '32768', '/github/home/.arduino/te.../build0.tmp/psramspeed.ino.partitions.bin', '65536', '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bin']
option_string = None

    def __call__(self, parser, namespace, values, option_string=None):
        # validate pair arguments
        pairs = []
        for i in range(0, len(values), 2):
            try:
                address = int(values[i], 0)
            except ValueError:
                raise argparse.ArgumentError(
                    self, 'Address "%s" must be a number' % values[i]
                )
            try:
>               argfile = open(values[i + 1], "rb")
E               FileNotFoundError: [Errno 2] No such file or directory: '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bootloader.bin'

/usr/local/lib/python3.10/site-packages/esptool/__init__.py:1278: FileNotFoundError

During handling of the above exception, another exception occurred:

self = ArgumentParser(prog='esptool write_flash', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
args = ['0', '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bootloader.bin', '32768', '/github/home/.arduino/te...d0.tmp/psramspeed.ino.partitions.bin', '65536', '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bin', ...]
namespace = Namespace(addr_filename=None, erase_all=False, flash_freq='keep', flash_mode='keep', flash_size='keep', spi_connection...=False, encrypt_files=None, ignore_flash_encryption_efuse_setting=False, force=False, compress=None, no_compress=False)

    def parse_known_args(self, args=None, namespace=None):
        if args is None:
            # args default to the system args
            args = _sys.argv[1:]
        else:
            # make sure that args are mutable
            args = list(args)
    
        # default Namespace built from parser defaults
        if namespace is None:
            namespace = Namespace()
    
        # add any action defaults that aren't present
        for action in self._actions:
            if action.dest is not SUPPRESS:
                if not hasattr(namespace, action.dest):
                    if action.default is not SUPPRESS:
                        setattr(namespace, action.dest, action.default)
    
        # add any parser defaults that aren't present
        for dest in self._defaults:
            if not hasattr(namespace, dest):
                setattr(namespace, dest, self._defaults[dest])
    
        # parse the arguments and exit if there are any errors
        if self.exit_on_error:
            try:
>               namespace, args = self._parse_known_args(args, namespace)

/usr/local/lib/python3.10/argparse.py:1854: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/argparse.py:2045: in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
/usr/local/lib/python3.10/argparse.py:2022: in consume_positionals
    take_action(action, args)
/usr/local/lib/python3.10/argparse.py:1931: in take_action
    action(self, namespace, argument_values, option_string)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = AddrFilenamePairAction(option_strings=[], dest='addr_filename', nargs='+', const=None, default=None, type=None, choices=None, help='Address followed by binary filename, separated by space', metavar='<address> <filename>')
parser = ArgumentParser(prog='esptool write_flash', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
namespace = Namespace(addr_filename=None, erase_all=False, flash_freq='keep', flash_mode='keep', flash_size='keep', spi_connection...=False, encrypt_files=None, ignore_flash_encryption_efuse_setting=False, force=False, compress=None, no_compress=False)
values = ['0', '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bootloader.bin', '32768', '/github/home/.arduino/te.../build0.tmp/psramspeed.ino.partitions.bin', '65536', '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bin']
option_string = None

    def __call__(self, parser, namespace, values, option_string=None):
        # validate pair arguments
        pairs = []
        for i in range(0, len(values), 2):
            try:
                address = int(values[i], 0)
            except ValueError:
                raise argparse.ArgumentError(
                    self, 'Address "%s" must be a number' % values[i]
                )
            try:
                argfile = open(values[i + 1], "rb")
            except IOError as e:
>               raise argparse.ArgumentError(self, e)
E               argparse.ArgumentError: argument <address> <filename>: [Errno 2] No such file or directory: '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bootloader.bin'

/usr/local/lib/python3.10/site-packages/esptool/__init__.py:1280: ArgumentError

During handling of the above exception, another exception occurred:

args = ()
kwargs = {'_fixture_classes_and_options': ClassCliOptions(classes={'app': <class 'pytest_embedded_arduino.app.ArduinoApp'>, 'se...ded_arduino.app.ArduinoApp object at 0xb5581358>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0xb5569c28>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0xb55824f0>
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:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1111: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:431: 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__(
/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:130: in __init__
    super().__init__(
/usr/local/lib/python3.10/site-packages/pytest_embedded_serial/serial.py:94: in __init__
    self._start()
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:36: in _start
    self.flash()
/usr/local/lib/python3.10/site-packages/pytest_embedded_serial_esp/serial.py:174: in wrapper
    ret = func(self, *args, **kwargs)
/usr/local/lib/python3.10/site-packages/pytest_embedded_arduino/serial.py:58: in flash
    esptool.main(
/usr/local/lib/python3.10/site-packages/esptool/__init__.py:720: in main
    args = parser.parse_args(argv)
/usr/local/lib/python3.10/argparse.py:1821: in parse_args
    args, argv = self.parse_known_args(args, namespace)
/usr/local/lib/python3.10/argparse.py:1854: in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
/usr/local/lib/python3.10/argparse.py:2045: in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
/usr/local/lib/python3.10/argparse.py:2022: in consume_positionals
    take_action(action, args)
/usr/local/lib/python3.10/argparse.py:1931: in take_action
    action(self, namespace, argument_values, option_string)
/usr/local/lib/python3.10/argparse.py:1210: in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
/usr/local/lib/python3.10/argparse.py:1857: in parse_known_args
    self.error(str(err))
/usr/local/lib/python3.10/argparse.py:2578: in error
    self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = ArgumentParser(prog='esptool write_flash', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2
message = "esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: '/github/home/.arduino/tests/psram/build0.tmp/psramspeed.ino.bootloader.bin'\n"

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/usr/local/lib/python3.10/argparse.py:2565: SystemExit

Check warning on line 0 in performance.psramspeed.test_psramspeed

See this annotation in the file changed.

@github-actions github-actions / Test Results

1 out of 6 runs failed: test_psramspeed (performance.psramspeed.test_psramspeed)

./artifacts/parent-artifacts/results/hw/performance/psramspeed/esp32s3/psramspeed.xml [took 1m 18s]
Raw output
pexpect.exceptions.TIMEOUT: Not found "Runs: (\d+)"
Bytes in current buffer (color code eliminated): Serial port /dev/ttyUSB2 Connecting.... Connecting.... esptool.py v4.8.1 Found 5 serial ports Chip is ESP32-S3 (QFN56) (revision v0.1) Features: WiFi, BLE, Embedded PSRAM 8MB... (total 1715 bytes)
Please check the full log here: /tmp/pytest-embedded/2024-10-03_00-43-25-820837/test_psramspeed/dut.log
self = <pytest_embedded_serial.dut.SerialDut object at 0xb554fd78>
pattern = 'Runs: (\\d+)', expect_all = False, not_matching = (), args = ()
kwargs = {'timeout': 60}, patterns = ['Runs: (\\d+)'], res = []
debug_str = 'Not found "Runs: (\\d+)"\nBytes in current buffer (color code eliminated): Serial port /dev/ttyUSB2 Connecting.... Co...l 1715 bytes)\nPlease check the full log here: /tmp/pytest-embedded/2024-10-03_00-43-25-820837/test_psramspeed/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)

/usr/local/lib/python3.10/site-packages/pytest_embedded/dut.py:76: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut.py:131: in expect
    return self.pexpect_proc.expect(pattern, **kwargs)
/usr/local/lib/python3.10/site-packages/pexpect/spawnbase.py:354: in expect
    return self.expect_list(compiled_pattern_list,
/usr/local/lib/python3.10/site-packages/pexpect/spawnbase.py:383: in expect_list
    return exp.expect_loop(timeout)
/usr/local/lib/python3.10/site-packages/pexpect/expect.py:181: in expect_loop
    return self.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0xb554fbb0>
err = TIMEOUT("<pytest_embedded.log.PexpectProcess object at 0xb554fa18>\nsearcher: searcher_re:\n    0: re.compile(b'Runs: (\\\\d+)')")

    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 0xb554fa18>
E           searcher: searcher_re:
E               0: re.compile(b'Runs: (\\d+)')
E           <pytest_embedded.log.PexpectProcess object at 0xb554fa18>
E           searcher: searcher_re:
E               0: re.compile(b'Runs: (\\d+)')

/usr/local/lib/python3.10/site-packages/pexpect/expect.py:144: TIMEOUT

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

dut = <pytest_embedded_serial.dut.SerialDut object at 0xb554fd78>
request = <FixtureRequest for <Function test_psramspeed>>

    def test_psramspeed(dut, request):
        LOGGER = logging.getLogger(__name__)
    
        runs_results = []
    
        # Match "Runs: %d"
>       res = dut.expect(r"Runs: (\d+)", timeout=60)

tests/performance/psramspeed/test_psramspeed.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_serial.dut.SerialDut object at 0xb554fd78>
pattern = 'Runs: (\\d+)', expect_all = False, not_matching = (), args = ()
kwargs = {'timeout': 60}, patterns = ['Runs: (\\d+)'], res = []
debug_str = 'Not found "Runs: (\\d+)"\nBytes in current buffer (color code eliminated): Serial port /dev/ttyUSB2 Connecting.... Co...l 1715 bytes)\nPlease check the full log here: /tmp/pytest-embedded/2024-10-03_00-43-25-820837/test_psramspeed/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 "Runs: (\d+)"
E               Bytes in current buffer (color code eliminated): Serial port /dev/ttyUSB2 Connecting.... Connecting.... esptool.py v4.8.1 Found 5 serial ports Chip is ESP32-S3 (QFN56) (revision v0.1) Features: WiFi, BLE, Embedded PSRAM 8MB... (total 1715 bytes)
E               Please check the full log here: /tmp/pytest-embedded/2024-10-03_00-43-25-820837/test_psramspeed/dut.log

/usr/local/lib/python3.10/site-packages/pytest_embedded/dut.py:83: TIMEOUT

Check failure on line 0 in validation.psram.test_psram

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 3 runs with error: test_psram (validation.psram.test_psram)

./artifacts/parent-artifacts/results/hw/validation/psram/esp32s2/psram.xml [took 3s]
./artifacts/parent-artifacts/results/hw/validation/psram/esp32s3/psram0.xml [took 2s]
./artifacts/parent-artifacts/results/hw/validation/psram/esp32s3/psram1.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...ded_arduino.app.ArduinoApp object at 0xb4bdf4f0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0xb4bdf400>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0xb4a8fb20>
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:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1111: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:431: 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 0xb4bdf4d8>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0xb5581d48>
msg_queue = <pytest_embedded.log.MessageQueue object at 0xb4bdf400>
target = 'esp32s3', 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-10-02_18-07-43-561133/test_psram', port_target_cache={'/dev/ttyUSB2': 'esp32s3'}, port_app_cache={}, logfile_extension='.log')
ports_to_occupy = (), kwargs = {}
available_ports = ['/dev/ttyAMA0', '/dev/ttyUSB0', '/dev/ttyUSB1', '/dev/ttyUSB2', '/dev/ttyUSB3']
ports = ['/dev/ttyAMA0', '/dev/ttyUSB0', '/dev/ttyUSB1', '/dev/ttyUSB3', '/dev/ttyUSB2']

    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,
        ports_to_occupy: List[str] = (),
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None or port.endswith('*'):
            port_filter = port.strip('*') if port else ''
            available_ports = [_p for _p in esptool.get_port_list() if port_filter in _p]
            ports = list(set(available_ports) - set(self.occupied_ports.keys()) - set(ports_to_occupy))
    
            # 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:118: ValueError

Check failure on line 0 in validation.periman.test_periman

See this annotation in the file changed.

@github-actions github-actions / Test Results

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

./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 0x7fc8198e3d60>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7fc8198e2dd0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7fc81992ce50>
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:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1111: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:431: 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 0x7fc819938130>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7fc8198e3c40>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7fc8198e2dd0>
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-10-02_17-57-28-637654/test_periman', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
ports_to_occupy = (), 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,
        ports_to_occupy: List[str] = (),
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None or port.endswith('*'):
            port_filter = port.strip('*') if port else ''
            available_ports = [_p for _p in esptool.get_port_list() if port_filter in _p]
            ports = list(set(available_ports) - set(self.occupied_ports.keys()) - set(ports_to_occupy))
    
            # 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:118: ValueError

Check failure on line 0 in validation.unity.test_unity

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_unity (validation.unity.test_unity) with error

./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 0x7f6ca1f37df0>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f6ca1f36e60>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f6ca1f7ce50>
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:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1111: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:431: 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 0x7f6ca1c4c1c0>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f6ca1f37cd0>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f6ca1f36e60>
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-10-02_17-58-37-373347/test_unity', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
ports_to_occupy = (), 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,
        ports_to_occupy: List[str] = (),
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None or port.endswith('*'):
            port_filter = port.strip('*') if port else ''
            available_ports = [_p for _p in esptool.get_port_list() if port_filter in _p]
            ports = list(set(available_ports) - set(self.occupied_ports.keys()) - set(ports_to_occupy))
    
            # 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:118: ValueError

Check failure on line 0 in validation.timer.test_timer

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_timer (validation.timer.test_timer) with error

./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 0x7f9acab37c70>, 'msg_queue': <pytest_embedded.log.MessageQueue object at 0x7f9acab36ce0>}
_close_or_terminate = <function multi_dut_generator_fixture.<locals>.wrapper.<locals>._close_or_terminate at 0x7f9acab80e50>
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:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.10/site-packages/pytest_embedded/plugin.py:1111: in serial
    return serial_gn(**locals())
/usr/local/lib/python3.10/site-packages/pytest_embedded/dut_factory.py:431: 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 0x7f9acab37fd0>
pexpect_proc = <pytest_embedded.log.PexpectProcess object at 0x7f9acab37b50>
msg_queue = <pytest_embedded.log.MessageQueue object at 0x7f9acab36ce0>
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-10-02_17-58-06-374474/test_timer', port_target_cache={}, port_app_cache={}, logfile_extension='.log')
ports_to_occupy = (), 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,
        ports_to_occupy: List[str] = (),
        **kwargs,
    ) -> None:
        self._meta = meta
    
        esptool_target = beta_target or target or 'auto'
        if port is None or port.endswith('*'):
            port_filter = port.strip('*') if port else ''
            available_ports = [_p for _p in esptool.get_port_list() if port_filter in _p]
            ports = list(set(available_ports) - set(self.occupied_ports.keys()) - set(ports_to_occupy))
    
            # 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:118: ValueError

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Test Results

31 tests found

There are 31 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
performance.coremark.test_coremark ‑ test_coremark
performance.fibonacci.test_fibonacci ‑ test_fibonacci
performance.linpack_double.test_linpack_double ‑ test_linpack_double
performance.linpack_float.test_linpack_float ‑ test_linpack_float
performance.psramspeed.test_psramspeed ‑ test_psramspeed
performance.ramspeed.test_ramspeed ‑ test_ramspeed
performance.superpi.test_superpi ‑ test_superpi
periman_test
resize_buffers_test
test_fail
test_pass
timer_clock_select_test
timer_divider_test
timer_interrupt_test
timer_read_test
validation.hello_world.test_hello_world ‑ test_hello_world
validation.nvs.test_nvs ‑ test_nvs
validation.periman.test_periman ‑ test_periman
validation.psram.test_psram ‑ test_psram
validation.timer.test_timer ‑ test_timer
validation.uart.test_uart ‑ test_uart
validation.unity.test_unity ‑ test_unity