pytest_startup_time.py 494 B

1234567891011121314151617181920
  1. # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: CC0-1.0
  3. import logging
  4. import pytest
  5. from pytest_embedded import Dut
  6. @pytest.mark.supported_targets
  7. @pytest.mark.generic
  8. @pytest.mark.parametrize('config', [
  9. 'defaults',
  10. 'always_skip',
  11. ], indirect=True)
  12. def test_startup_time_example(dut: Dut) -> None:
  13. res = dut.expect(r'\((\d+)\) [^:]+: App started!')
  14. time = int(res[1])
  15. logging.info(f'[Performance][startup_time]: {time}')