embeddedci 3.0.3__tar.gz → 3.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {embeddedci-3.0.3 → embeddedci-3.0.4}/CHANGELOG.md +64 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/PKG-INFO +197 -21
- {embeddedci-3.0.3 → embeddedci-3.0.4}/README.md +196 -20
- {embeddedci-3.0.3 → embeddedci-3.0.4}/examples/test_bmp280.py +1 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/pyproject.toml +1 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/__init__.py +7 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/ci.py +14 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/client.py +120 -16
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/error_catalog.json +51 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/errors.py +21 -3
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/feature_map.json +20 -2
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/lease.py +11 -4
- embeddedci-3.0.4/src/embeddedci/benchpod/pod_lease.py +319 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/pytest_plugin.py +16 -0
- embeddedci-3.0.4/src/embeddedci/benchpod/runs/__init__.py +60 -0
- embeddedci-3.0.4/src/embeddedci/benchpod/runs/active.py +474 -0
- embeddedci-3.0.4/src/embeddedci/benchpod/runs/api.py +233 -0
- embeddedci-3.0.4/src/embeddedci/benchpod/runs/provenance.py +175 -0
- embeddedci-3.0.4/src/embeddedci/benchpod/runs/pytest_runs.py +448 -0
- embeddedci-3.0.4/src/embeddedci/benchpod/runs/recorder.py +349 -0
- embeddedci-3.0.4/src/embeddedci/benchpod/runs/schema.py +459 -0
- embeddedci-3.0.4/src/embeddedci/benchpod/runs/upload.py +167 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/state.py +30 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/transport/cloud.py +4 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/transport/serial.py +10 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/transport/tcp.py +50 -19
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/wiring.py +2 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/api_surface.json +26 -3
- embeddedci-3.0.4/tests/benchpod-ci.yaml +23 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/README.md +12 -2
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_rev3.py +34 -5
- embeddedci-3.0.4/tests/runs_api_fake.py +81 -0
- embeddedci-3.0.4/tests/runs_fake.py +82 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_expansion.py +17 -6
- embeddedci-3.0.4/tests/test_log_level.py +92 -0
- embeddedci-3.0.4/tests/test_pod_lease.py +479 -0
- embeddedci-3.0.4/tests/test_runs.py +725 -0
- embeddedci-3.0.4/tests/test_runs_api.py +76 -0
- embeddedci-3.0.4/tests/test_runs_upload.py +316 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_serial_text_console.py +32 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_tcp_transport.py +3 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_wiring_profiles.py +26 -1
- {embeddedci-3.0.3 → embeddedci-3.0.4}/.gitignore +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/LICENSE +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/docs/aivision.md +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/docs/event-uart-design.md +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/examples/README.md +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/__init__.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/_http.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/aivision/__init__.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/aivision/client.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/aivision/cloud.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/aivision/discovery.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/aivision/errors.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/aivision/pytest_plugin.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/aivision/results.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/can.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/capabilities.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/capture.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/cli_config.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/cli_login.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/cloud_auth.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/connection.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/constants.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/control_loop.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/decode.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/discovery.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/dsp.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/esp.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/expansion.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/feature_map.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/flash.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/gpio.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/header.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/i2c.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/i2c_master.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/lowlevel.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/main.c +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/motor_emulator.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/power.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/protocol.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/replay.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/results.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/__init__.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/README.md +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/docs/format.md +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/library.json +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/analog/ntc_10k_divider.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/analog/pressure_4_20ma.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/bme280.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/bmp280.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/ina219.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/mpu6050.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/scd4x.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/sht3x.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/sht4x.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/tmp117.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/spi/lis3dh.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/spi/lis3dh_fifo.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/uart/gps_nmea.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/sensors/uart/mhz19b.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/stimuli/gps_drive.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/stimuli/pressure_drop.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/bundled/stimuli/temperature_ramp_fault.yaml +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/definition.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/emulation.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/library.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/sensors/yaml12.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/server_api.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/spi.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/transport/__init__.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/transport/base.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/transport/tls.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/transport/usblink.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/uart.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/benchpod/waveforms.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/py.typed +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/src/embeddedci/upload_build.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/conftest.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/conftest.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/e2e_bench.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/e2e_helpers.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_bench_profile.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_cloud.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_digital.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_dut.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_gpio.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_la13_14.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_pod.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_spi.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/e2e/test_e2e_usb.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/examples/test_bmp280_hil.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/examples/test_can_ecu_demo.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/examples/test_can_loopback_hil.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/examples/test_smoke.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_adc_fft_hw.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_adc_oversample.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_adc_range.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_aivision.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_aivision_cloud.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_aivision_live.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_api_surface.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_can.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_capabilities.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_capabilities_scope.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_capture.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_capture_replay_hw.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_ci.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_client_v2.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_cloud.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_connection.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_control_loop.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_control_loop_hw.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_current_out_waveforms.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_dac_limits_fixture.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_dac_path_default.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_dac_path_ranges.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_decode.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_decode_parity.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_docs_coverage.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_dsp.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_esp_flash.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_feature_map.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_flash_bridge.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_flash_build.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_generate16.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_gpio.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_header.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_http_redirect_auth.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_i2c_decode.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_i2c_master.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_i2c_parity.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_i2c_timed.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_image_switching.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_integration.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_la_voltage_fixture.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_lan_tls.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_lease.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_module.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_motor_emulator.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_one_source.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_pin_directions.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_pins_bias.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_protocol.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_pull_direction.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_refusal_errors.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_replay.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_sensor_library.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_sensors.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_serial_autodetect.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_spi.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_status_diag.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_timed_power.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_timing.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_transport_failures.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_trigger_power.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_uart_capture.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_uart_de.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_uart_frame.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_uart_half_duplex.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_uart_session.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_unsupported_feature.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_upload_build.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_usb_net.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_waveforms.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/test_wiring.py +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/testdata/i2c_decode_vectors.json +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/testdata/spi_decode_vectors.json +0 -0
- {embeddedci-3.0.3 → embeddedci-3.0.4}/tests/testdata/uart_decode_vectors.json +0 -0
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# Changelog — `embeddedci`
|
|
2
2
|
|
|
3
|
+
## 3.0.4
|
|
4
|
+
|
|
5
|
+
- **Read test runs back:** `embeddedci.benchpod.runs.api` lists the runs on embeddedci.com
|
|
6
|
+
(`list_runs`, by suite, DUT, build, pod or ref), reads one (`get_run`, `summarize_run`: the
|
|
7
|
+
failed cases and the measurements outside their limits), compares two (`compare_runs` with
|
|
8
|
+
`previous`, a run id or `baseline:<branch>`) and fetches their files (`get_run_file`,
|
|
9
|
+
`case_trace`: a case's pod calls). `RunsApi` takes your own `ServerApi`.
|
|
10
|
+
- **Console log level:** `bp.log_level()` reads how much the pod prints on its USB console and
|
|
11
|
+
`bp.set_log_level(level)` sets it (`LOG_LEVELS`: `error`, `warn`, `info`, `debug`; default
|
|
12
|
+
`info`, stored on the pod). Firmware newer than 3.10.12 (feature `log_level`); older firmware
|
|
13
|
+
raises `UnsupportedFeatureError`.
|
|
14
|
+
- **Upload test runs:** `--embeddedci-upload` (also the `embeddedci_upload` ini option and
|
|
15
|
+
`EMBEDDEDCI_UPLOAD=1`) uploads the recorded run to embeddedci.com when the session ends:
|
|
16
|
+
`run.json`, `junit.xml` and the traces of the failed and error tests. Credentials:
|
|
17
|
+
`BENCHPOD_API_KEY`, else the `benchpod login` session, else GitHub Actions OIDC. A failed upload
|
|
18
|
+
is a warning. Not under `benchpod ci`, which uploads the run itself.
|
|
19
|
+
`embeddedci.benchpod.runs.upload.upload_run(folder)` uploads a folder later.
|
|
20
|
+
- **`build_report` on test runs:** in GitHub Actions a session whose tests use `build_report`
|
|
21
|
+
records its run and uploads it linked to the build the fixture created, so the build shows every
|
|
22
|
+
test's result. The fixture still sends the pass/fail to the build for older servers.
|
|
23
|
+
`BuildReporter.api_base` and `BuildReporter.session_token` are new.
|
|
24
|
+
- Run folder file names always pass the server's rule (`[A-Za-z0-9._-]`, no leading dot): a case
|
|
25
|
+
id starting with `.` gets a trace name without it, and attachment names keep ASCII letters only.
|
|
26
|
+
- `tests/benchpod-ci.yaml` runs this repository's hardware tests with `benchpod ci`.
|
|
27
|
+
- Under `benchpod ci`, a stop of the runner's lease from the web app (`BP0026` on a lease joined
|
|
28
|
+
through `BENCHPOD_LEASE`) ends the pytest session after the test that saw it (exit code 2); the
|
|
29
|
+
step's `parts/<step>.json` still has the cases so far, `lease_lost` and the reason. With the SDK's
|
|
30
|
+
own lease the session goes on without it, as before.
|
|
31
|
+
- Test run recording: a failed case's `message` starts with the crash line (`ValueError: bad CRC:
|
|
32
|
+
6f72`), then a blank line and pytest's full report, still capped at 16 KB.
|
|
33
|
+
- **Pod lease on the LAN and the USB network:** on a pod with the `lease` feature (features table
|
|
34
|
+
revision 5), `BenchPod()` takes the pod's own lease for the session (`lease_acquire`, holder
|
|
35
|
+
`SDK: <user>`, purpose `lease_purpose=` or the recorded run's suite, else `sdk`; 120 s, renewed
|
|
36
|
+
every 40 s, released on `close()`). Every request then carries `"lease":"<id>"`, which makes it
|
|
37
|
+
the owner's (only sent to pods with the feature). A busy pod is polled every 2 s for up to `lease_wait`, then
|
|
38
|
+
`PodLeasedError` names the `holder`, `purpose` and `left_s`. Several `BenchPod` objects of one
|
|
39
|
+
process share the lease. `lease=False` / `--benchpod-no-lease` skip it; older firmware takes none.
|
|
40
|
+
- **`BENCHPOD_LEASE`:** joins that lease id instead of taking a new one (on the cloud, as the
|
|
41
|
+
server lease's id), and never renews or releases it: `benchpod ci` sets it for its child
|
|
42
|
+
processes.
|
|
43
|
+
- `BenchPod.local_lease()` returns a `LocalLease` (from `status` `local_lease`); `BenchPod.leased`
|
|
44
|
+
also covers the pod's lease. New `PodLeaseLostError` (`BP0026`, the lease was stopped from the web
|
|
45
|
+
app: raised once, then the session runs without a lease and never takes it again); `PodLeasedError` has `purpose`. The error catalog has `BP0025`-`BP0027`. A test run being
|
|
46
|
+
recorded is marked invalid (`health.lease_lost`) when its lease is stopped.
|
|
47
|
+
- **Test run recording:** `pytest --embeddedci-run-dir DIR` (or `EMBEDDEDCI_RUN_DIR`) writes a run
|
|
48
|
+
folder: `run.json` (schema version 1: outcome, counts, every test case with its measurements and
|
|
49
|
+
per-command call timings, and the firmware, tests, pod, wiring and tool versions it ran with),
|
|
50
|
+
`junit.xml`, and a trace of every pod call per test (`trace/`, large payloads in `att/`, secrets
|
|
51
|
+
redacted, 50 MB per run). `--embeddedci-suite`, `--embeddedci-dut` and `--embeddedci-keep-traces`
|
|
52
|
+
(`all`, `failed`, `none`) set the rest. Off by default. Under `benchpod ci` (`EMBEDDEDCI_RUN_DIR`
|
|
53
|
+
with `EMBEDDEDCI_RUN_STEP`) the plugin writes `parts/<step>.json` for the runner to merge.
|
|
54
|
+
- **`measure` fixture:** `measure(name, value, unit="", min=None, max=None, drift=None)` records a
|
|
55
|
+
number for the test; a value outside `min`/`max` fails it. Numeric `record_property` values are
|
|
56
|
+
recorded as measurements too.
|
|
57
|
+
- USB console: a firmware log line printed right after the prompt (`[sig] SPI1 link at ... for
|
|
58
|
+
gateware 58`, on every `status` up to firmware 3.10.12) no longer makes the serial transport
|
|
59
|
+
time out waiting for the prompt. A prompt followed only by complete `[tag] ...` lines ends the
|
|
60
|
+
reply.
|
|
61
|
+
- **Pull resistors at 1.8 V:** on firmware with the `la_pull_1v8` feature (newer than 3.10.12) the
|
|
62
|
+
pod's pulls work with the LA bank at 1.8 V (v3 boards pull up to the bank rail), so `power_on`
|
|
63
|
+
applies a 1.8 V profile's `pulls` and `expansion(pullups="pod")` (also its default) works at
|
|
64
|
+
1.8 V. With older firmware both behave as before, and `power_on` logs that the pulls stay off.
|
|
65
|
+
The `Wiring` warning for `pulls` with `la_mv` 1800 now names the firmware it needs.
|
|
66
|
+
|
|
3
67
|
## 3.0.3
|
|
4
68
|
|
|
5
69
|
- The preset of the default pins is now `Wiring.preset("embeddedci-default")` (also the default of
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: embeddedci
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.4
|
|
4
4
|
Summary: BenchPod SDK and pytest plugin for EmbeddedCI hardware-in-the-loop testing
|
|
5
5
|
Project-URL: Homepage, https://embeddedci.com
|
|
6
6
|
Project-URL: Repository, https://github.com/embeddedci-com/embeddedci-python
|
|
@@ -73,7 +73,7 @@ No pin numbers: the SWD channels, the UART pair, the baud and the power rail com
|
|
|
73
73
|
[wiring profile](#wiring-profile). Pass them explicitly when you want to override it.
|
|
74
74
|
|
|
75
75
|
**Contents:** [Install](#install) · [Quick start](#quick-start) ·
|
|
76
|
-
[API conventions](#api-conventions-and-stability) · [pytest plugin](#pytest-plugin) ·
|
|
76
|
+
[API conventions](#api-conventions-and-stability) · [pytest plugin](#pytest-plugin) · [Test runs](#test-run-recording) ·
|
|
77
77
|
[Power and reset](#power-reset-and-power-monitoring) · [Flashing](#flashing) · [UART](#uart) ·
|
|
78
78
|
[Pull resistors](#la-pull-resistors) · [Emulated sensors](#emulated-sensors) ·
|
|
79
79
|
[Analog paths](#analog-paths-dc-output-and-single-readings) · [Captures](#captures) ·
|
|
@@ -301,7 +301,7 @@ power moved to the network too; see the compatibility table above.)
|
|
|
301
301
|
| `status`, `ping`, LA voltage, target power on/off | yes | yes | yes | yes |
|
|
302
302
|
| Scheduled power changes (`delay=`), flashing, UART, analog, captures, sensor emulation, CAN, control loop | yes | yes | no | yes |
|
|
303
303
|
| `replay()` / client-side `replay_waveform()` (streams the waveform to the pod) | yes | yes | no | yes |
|
|
304
|
-
| Device lease |
|
|
304
|
+
| Device lease | the pod's lease (feature `lease`) | the pod's lease (feature `lease`) | no | the server's lease |
|
|
305
305
|
|
|
306
306
|
### TLS on the LAN
|
|
307
307
|
|
|
@@ -333,6 +333,22 @@ cloud connection; over plaintext Ethernet or Wi-Fi the pod refuses (`PodLockedEr
|
|
|
333
333
|
`set_lan_tls_cert` needs a network connection (it uploads the bundle); after it and after
|
|
334
334
|
`regenerate_lan_tls()` the SDK pins the new certificate for the address it used.
|
|
335
335
|
|
|
336
|
+
### Console log level
|
|
337
|
+
|
|
338
|
+
How much the pod prints on its USB console (firmware newer than 3.10.12, feature `log_level`).
|
|
339
|
+
`info` is the default; `debug` adds the per-command trace (`[cmd] <- ...`, `[cmd] -> ok ...`) and
|
|
340
|
+
the retry detail of the cloud, Wi-Fi and DHCP loops, `warn` and `error` print less. Errors always
|
|
341
|
+
print. The pod stores the level, so it survives a reboot and a firmware update; any connection may
|
|
342
|
+
read or set it.
|
|
343
|
+
|
|
344
|
+
```python
|
|
345
|
+
bp.log_level() # "info"
|
|
346
|
+
bp.set_log_level("debug") # one of LOG_LEVELS: "error", "warn", "info", "debug"
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Another name raises `ValueError` without asking the pod; older firmware raises
|
|
350
|
+
`UnsupportedFeatureError` (it has no levels and prints everything).
|
|
351
|
+
|
|
336
352
|
### MAC addresses (managed networks)
|
|
337
353
|
|
|
338
354
|
A lab network that hands out addresses only to registered devices needs the pod's MACs first.
|
|
@@ -363,6 +379,7 @@ macs = bp.mac_addresses() # MacAddresses(eth_mac='02:35:c7:76:b7:9b', wifi_
|
|
|
363
379
|
| `BENCHPOD_TLS_CA` | network connections over TLS | PEM file of CA certificates: verify the pod's certificate and host name instead of pinning it |
|
|
364
380
|
| `BENCHPOD_STALL_TIMEOUT` | flashing | seconds with no SWD traffic before a flash attempt is aborted and retried (default 60) |
|
|
365
381
|
| `BENCHPOD_SENSOR_LIBRARY` | no `version` argument / `--benchpod-sensor-library` | sensor library version: `latest` or a release such as `0.2.0` (default: the version the SDK pins), see [Emulated sensors](#emulated-sensors) |
|
|
382
|
+
| `BENCHPOD_LEASE` | connecting | a lease id to join instead of taking a new lease (set by `benchpod ci` for its child processes), see [Device leases](#device-leases) |
|
|
366
383
|
| `BENCHPOD_SENSOR_CACHE` | sensor library downloads | cache folder for downloaded library versions (default `<user cache>/embeddedci/benchpod-sensors`) |
|
|
367
384
|
|
|
368
385
|
## Error codes
|
|
@@ -524,10 +541,15 @@ The `benchpod` fixture is a `BenchPod` instance, not the module — import const
|
|
|
524
541
|
| `--benchpod-discover` | — | off | when no connection is configured, find one pod via mDNS (needs `[discovery]`) |
|
|
525
542
|
| `--benchpod-api-key` | `BENCHPOD_API_KEY` | — | API key for the cloud destination and the waveform library; it, `--benchpod-api-base` and the lease options also reach the short connection that lifts the DAC limits (`BENCHPOD_LIFT_DAC_LIMITS=1`) |
|
|
526
543
|
| `--benchpod-api-base` | `BENCHPOD_API_BASE` | `https://www.embeddedci.com` | embeddedci server |
|
|
527
|
-
| `--benchpod-lease-wait` | — | `600` | seconds to wait for a busy cloud device |
|
|
528
|
-
| `--benchpod-no-lease` | — | off | don't lock the
|
|
544
|
+
| `--benchpod-lease-wait` | — | `600` | seconds to wait for a busy pod (its lease, or the cloud device's) |
|
|
545
|
+
| `--benchpod-no-lease` | — | off | don't lock the pod (only when nothing else can use it) |
|
|
529
546
|
| `--benchpod-build-target` | `BENCHPOD_BUILD_TARGET` | — | platform id recorded by `build_report` (e.g. `stm32f4`) |
|
|
530
547
|
| `--benchpod-sensor-library` | `BENCHPOD_SENSOR_LIBRARY` | the pinned version | sensor library version for `benchpod_sensors` (`latest` or a release) |
|
|
548
|
+
| `--embeddedci-run-dir` | `EMBEDDEDCI_RUN_DIR` | off | record the run into this folder (`auto`: `./embeddedci-runs/<started UTC>-<suite>/`), see [Test run recording](#test-run-recording) |
|
|
549
|
+
| `--embeddedci-suite` | — | `pytest` | suite name recorded in `run.json` |
|
|
550
|
+
| `--embeddedci-dut` | — | `""` | name of the board under test recorded in `run.json` |
|
|
551
|
+
| `--embeddedci-keep-traces` | `EMBEDDEDCI_KEEP_TRACES` | `all` | which pod-call traces to keep: `all`, `failed` or `none` |
|
|
552
|
+
| `--embeddedci-upload` | `EMBEDDEDCI_UPLOAD` | off | upload the recorded run to embeddedci.com at the end (also the `embeddedci_upload` ini option), see [Uploading a run](#uploading-a-run) |
|
|
531
553
|
|
|
532
554
|
Connection resolution order: `--benchpod-connection` → `benchpod_connection` ini option →
|
|
533
555
|
`BENCHPOD_CONNECTION` → `--benchpod-discover`.
|
|
@@ -559,6 +581,7 @@ benchpod_connection = 192.168.1.213
|
|
|
559
581
|
| `benchpod_pins` / `pins` | session | `pin_1` … `pin_14`, `efuse`, and `has_pullup()`, `has_pulldown()`, `pull_ohms()`, `pullup_ohms()`, `pull_direction()` |
|
|
560
582
|
| `firmware` | function | the `--benchpod-firmware` path (skips when unset) |
|
|
561
583
|
| `build_report` | function | a build reporter — see [Build reporting](#build-reporting) |
|
|
584
|
+
| `measure` | function | `measure(name, value, unit="", min=None, max=None, drift=None)`: records a number for the test; a value outside `min`/`max` fails it, see [Test run recording](#test-run-recording) |
|
|
562
585
|
|
|
563
586
|
`benchpod` is shared by the whole session, so state a test leaves behind (a running DAC, engaged
|
|
564
587
|
pull-ups, a running sensor) carries into the next one — use the teardown fixtures.
|
|
@@ -583,6 +606,118 @@ nothing changes.
|
|
|
583
606
|
firmware that does not announce the flag ran on analog boards only and counts as analog, like
|
|
584
607
|
`BenchPod.can_analog`.
|
|
585
608
|
|
|
609
|
+
### Test run recording
|
|
610
|
+
|
|
611
|
+
With `--embeddedci-run-dir DIR` the plugin records the whole run into one folder: the outcome of
|
|
612
|
+
every test, the numbers tests measured, and every call each test made to a pod, with the
|
|
613
|
+
provenance needed to compare two runs (the firmware file's hash, the tests' git commit, the pod's
|
|
614
|
+
firmware, gateware and calibration, the wiring profile, tool versions). It needs no account and
|
|
615
|
+
writes nothing anywhere else. Recording is off unless the option or `EMBEDDEDCI_RUN_DIR` is set, so
|
|
616
|
+
an existing suite writes nothing new.
|
|
617
|
+
|
|
618
|
+
```bash
|
|
619
|
+
pytest --embeddedci-run-dir=auto --embeddedci-suite=process-node-hil --embeddedci-dut=process-node \
|
|
620
|
+
--embeddedci-keep-traces=failed
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
```
|
|
624
|
+
<run folder>/
|
|
625
|
+
run.json the record (schema_version 1), written last
|
|
626
|
+
junit.xml the same tests as JUnit XML, for CI test reporters
|
|
627
|
+
trace/<test>.ndjson the pod calls of one test, one JSON object per line
|
|
628
|
+
att/<n>-<command>.json large requests and replies a trace line points to (.json.zst with zstandard)
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
`run.json` holds `key` (suite, dut), `inputs` (`dut_firmware` from `--benchpod-firmware`, `tests`
|
|
632
|
+
from git, `pod`, `wiring`, `tools`, `github`), `health`, and `results`: the run's `outcome`
|
|
633
|
+
(`passed`, `failed`, `error`, `invalid`), `counts` and one entry per test in `cases`. A case has its
|
|
634
|
+
`id` (the pytest node id), `outcome` (`passed`, `failed`, `error` for a failure in setup or
|
|
635
|
+
teardown, `skipped`, `xfailed`, `xpassed`), `duration_ms`, `message` (the failure: its crash line, such as `ValueError: bad CRC`, then pytest's full report; up to 16 KB), `skip_reason`,
|
|
636
|
+
`log` (captured output of failed tests, up to 64 KB), `trace` (the trace file, `""` when not kept),
|
|
637
|
+
`measurements`, and `calls`: per pod command the number of calls, the 50th and 95th percentile and
|
|
638
|
+
maximum time in ms, and the errors. `calls` is filled even when the trace file is not kept.
|
|
639
|
+
|
|
640
|
+
A trace line looks like
|
|
641
|
+
`{"t": 12.304, "op": "command", "cmd": "can_write", "req": {...}, "ms": 3.1, "ok": true, "resp": {...}}`:
|
|
642
|
+
`t` is seconds since the run started, `op` one of `command`, `sequence`, `samples`, `stream`,
|
|
643
|
+
`raw` (a CMSIS-DAP or UART proxy session, logged when it closes, with its byte counts), `status`,
|
|
644
|
+
`power`. Requests and replies over 4 KB move to `att/`. Passwords, tokens, keys and other secrets
|
|
645
|
+
are replaced by `"<redacted>"` before anything is written. A run keeps at most 50 MB of traces and
|
|
646
|
+
attachments; past that, lines keep only `t`, `op`, `cmd`, `ms` and `ok`, and `health` says so.
|
|
647
|
+
Every `BenchPod` opened while the run records is traced, also one a test opens itself.
|
|
648
|
+
|
|
649
|
+
`--embeddedci-keep-traces` picks which traces stay: `all` (default), `failed` (failed and error
|
|
650
|
+
tests only) or `none`.
|
|
651
|
+
|
|
652
|
+
**Measurements.** The `measure` fixture records named numbers with optional limits:
|
|
653
|
+
|
|
654
|
+
```python
|
|
655
|
+
def test_heater_response(benchpod, measure):
|
|
656
|
+
...
|
|
657
|
+
measure("settle_ms", 840, unit="ms", max=1000) # fails the test above 1000
|
|
658
|
+
measure("overshoot_c", 0.6, unit="C", drift="15%") # recorded, compared later
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
`value`, `min` and `max` must be finite numbers (`bool`, NaN and infinity raise an error), and a
|
|
662
|
+
name is used once per test. A value outside `min`/`max` fails the test after its body ran, listing
|
|
663
|
+
every failed limit; the limits are checked also when no run is being recorded. `drift` (`"20%"` or
|
|
664
|
+
`0.2`) is a tolerance for comparisons with a baseline and never fails the test. Numeric values a
|
|
665
|
+
test passes to pytest's `record_property` are recorded too (with source `record_property`; other
|
|
666
|
+
values are left out). A test keeps at most 200 measurements; the rest are dropped and counted in
|
|
667
|
+
`health.measurements_dropped`.
|
|
668
|
+
|
|
669
|
+
**Uploading a run.** `--embeddedci-upload` (or `embeddedci_upload = true` in the ini file, or
|
|
670
|
+
`EMBEDDEDCI_UPLOAD=1`) uploads the run to embeddedci.com when the session ends, where it shows
|
|
671
|
+
next to the build it tested and can be compared with earlier runs. Without `--embeddedci-run-dir` it
|
|
672
|
+
records into `./embeddedci-runs/<started UTC>-<suite>/` first. What goes up: `run.json`,
|
|
673
|
+
`junit.xml`, and the traces (with their attachments) of the failed and error tests only; the
|
|
674
|
+
folder on disk keeps what `--embeddedci-keep-traces` says. Credentials: `BENCHPOD_API_KEY`, else
|
|
675
|
+
the `benchpod login` session, else the workflow's OIDC token in GitHub Actions (`id-token: write`);
|
|
676
|
+
`--benchpod-api-base` / `BENCHPOD_API_BASE` picks the server. The run's URL is printed at the end.
|
|
677
|
+
A failed upload is a warning: it never changes the test result. Under `benchpod ci` the plugin does
|
|
678
|
+
not upload; the runner uploads the whole run.
|
|
679
|
+
|
|
680
|
+
The upload can be done later, or from another machine, with the same code:
|
|
681
|
+
|
|
682
|
+
```python
|
|
683
|
+
from embeddedci.benchpod.runs.upload import upload_run
|
|
684
|
+
|
|
685
|
+
print(upload_run("embeddedci-runs/20261118T140211Z-hil")["url"])
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
**Reading runs back.** `embeddedci.benchpod.runs.api` lists, reads and compares the runs on
|
|
689
|
+
embeddedci.com, with the same credentials as the upload:
|
|
690
|
+
|
|
691
|
+
```python
|
|
692
|
+
from embeddedci.benchpod.runs import api
|
|
693
|
+
|
|
694
|
+
runs = api.list_runs(suite="process-node-hil", ref="main", limit=5)["runs"] # newest first
|
|
695
|
+
run = api.get_run(runs[0]["id"])
|
|
696
|
+
print(api.summarize_run(run)["failed_cases"]) # id, outcome, the message's first line
|
|
697
|
+
diff = api.compare_runs(run["id"], "previous") # or a run id, or "baseline:main"
|
|
698
|
+
print(diff["cases"]["newly_failing"], diff["inputs_changed"])
|
|
699
|
+
trace = api.case_trace(run, "test_ack", errors_only=True) # the failed case's pod calls
|
|
700
|
+
junit = api.get_run_file(run["id"], "junit.xml")
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
`list_runs` takes `suite`, `dut`, `build`, `pod` (name or id), `ref`, `limit` (up to 200) and
|
|
704
|
+
`before` (the previous page's `next_before`). `RunsApi(server)` does the same with a `ServerApi`
|
|
705
|
+
of your own. The MCP server's `cloud_runs_list`, `cloud_run_get`, `cloud_run_compare` and
|
|
706
|
+
`cloud_run_trace` tools are built on it.
|
|
707
|
+
|
|
708
|
+
**Inside `benchpod ci`.** The `benchpod ci` runner hands its run folder to the `pytest` steps it
|
|
709
|
+
starts through the environment; the plugin then writes `parts/<step>.json` (the cases, health
|
|
710
|
+
counters, tool versions and pod) and its traces into that folder, and the runner merges them into
|
|
711
|
+
one `run.json`:
|
|
712
|
+
|
|
713
|
+
| Variable | Value |
|
|
714
|
+
|---|---|
|
|
715
|
+
| `EMBEDDEDCI_RUN_DIR` | the run folder (alone, without `EMBEDDEDCI_RUN_STEP`: same as `--embeddedci-run-dir`) |
|
|
716
|
+
| `EMBEDDEDCI_RUN_STEP` | the step id: write `parts/<step>.json` instead of `run.json` and `junit.xml` |
|
|
717
|
+
| `EMBEDDEDCI_RUN_ID` | the run id recorded in `run.json` |
|
|
718
|
+
| `EMBEDDEDCI_RUN_T0` | the run's start in unix seconds, so every step's trace shares one timeline |
|
|
719
|
+
| `EMBEDDEDCI_KEEP_TRACES` | `all`, `failed` or `none` (`--embeddedci-keep-traces` wins) |
|
|
720
|
+
|
|
586
721
|
## Wiring profile
|
|
587
722
|
|
|
588
723
|
The pod has no role-named pins, so the bench's wiring — which DUT signal is on which LA channel —
|
|
@@ -907,7 +1042,7 @@ slave-SPI configuration port). It needs a LAN or cloud connection and firmware w
|
|
|
907
1042
|
Pods with gateware v55+ (`bp.capabilities.gateware`, `bp.capabilities.bus_master`) are an I2C master
|
|
908
1043
|
on any two LA pins, 10 kHz to 1 MHz: read and write registers of a chip on the DUT's board, or scan
|
|
909
1044
|
the bus. The pins are open drain, so the bus needs pull-ups: the pod's own on LA1-LA6 (switch them
|
|
910
|
-
on first; they pull to
|
|
1045
|
+
on first; they pull to the LA voltage, at 1.8 V on firmware newer than 3.10.12), or the board's with
|
|
911
1046
|
`pullups="external"`.
|
|
912
1047
|
|
|
913
1048
|
```python
|
|
@@ -1261,9 +1396,10 @@ arguments it returns the `ExpansionStatus`, and `expansion(None)` detaches.
|
|
|
1261
1396
|
several chips on one bus: `addr=[0x20, 0x21]` gives `EXT1`..`EXT32`, numbered in that order.
|
|
1262
1397
|
- `sda` and `scl` default to the wiring profile's `i2c_sda` and `i2c_scl`, so the expander can sit
|
|
1263
1398
|
on the DUT's I2C bus.
|
|
1264
|
-
- `pullups`: `"pod"` switches on the pod's pull-ups (LA1-LA6 only; they pull to
|
|
1265
|
-
`"external"` relies on the breakout's. By default `"pod"` when
|
|
1266
|
-
|
|
1399
|
+
- `pullups`: `"pod"` switches on the pod's pull-ups (LA1-LA6 only; they pull to the LA voltage)
|
|
1400
|
+
and `"external"` relies on the breakout's. By default `"pod"` when both pins are on LA1-LA6 and
|
|
1401
|
+
the pod has pull-ups at this LA voltage, else `"external"`. At 1.8 V that needs firmware newer
|
|
1402
|
+
than 3.10.12; with older firmware the breakout needs its own pull-ups to 1.8 V.
|
|
1267
1403
|
- `hz` defaults to 400 kHz for I2C chips (100 kHz for the PCF8574) and 1 MHz for SPI chips.
|
|
1268
1404
|
- SPI chips take `spi=(sck, mosi, miso, cs)` (or a dict with those keys) instead of `sda`/`scl`;
|
|
1269
1405
|
omitted, the wiring profile's `spi_sclk`, `spi_mosi`, `spi_miso` and `spi_cs`. The pod's SPI
|
|
@@ -2214,12 +2350,39 @@ failed**. Auth failures raise `CloudAuthError`.
|
|
|
2214
2350
|
|
|
2215
2351
|
### Device leases
|
|
2216
2352
|
|
|
2217
|
-
A pod can be driven by one consumer at a time, so a
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
`lease_ttl` (default 120 s) sets
|
|
2353
|
+
A pod can be driven by one consumer at a time, so a `BenchPod` takes an exclusive **lease** on it
|
|
2354
|
+
for its lifetime: acquired on connect, renewed by a background heartbeat, released on `close()` (or
|
|
2355
|
+
it runs out if the process dies). A run that finds the pod busy waits up to `lease_wait` seconds
|
|
2356
|
+
(default 600, `--benchpod-lease-wait`) and then raises `PodLeasedError` (a `DeviceBusyError`) with
|
|
2357
|
+
the `holder`, its `purpose` and the seconds it has left (`left_s`), so concurrent runs queue instead
|
|
2358
|
+
of colliding. `lease=False` / `--benchpod-no-lease` skips locking; `lease_ttl` (default 120 s) sets
|
|
2359
|
+
the lease length.
|
|
2360
|
+
|
|
2361
|
+
- **Cloud** (`embeddedci:<device>`): the lease is the server's.
|
|
2362
|
+
- **LAN and the USB network** (`usb`): on a pod with the `lease` feature the lease is the pod's
|
|
2363
|
+
own, kept in its memory and shared by every transport: while it is held, other connections (from
|
|
2364
|
+
this computer or another, over the LAN, USB or the cloud) can read the status but not drive the
|
|
2365
|
+
pod. Every request this session sends carries the lease id (`"lease":"<id>"`), which is what makes
|
|
2366
|
+
it the owner's; the extra key is only sent to pods with the feature. The holder is `SDK: <user>` and the purpose `lease_purpose=` (default: the suite of the test
|
|
2367
|
+
run being recorded, else `sdk`). Without the feature (older firmware) nothing is locked. The USB
|
|
2368
|
+
console never leases.
|
|
2369
|
+
- Several `BenchPod` objects of one process on the same pod share its lease, so a test that opens
|
|
2370
|
+
its own connection next to the pytest `benchpod` fixture does not wait for it.
|
|
2371
|
+
- `bp.local_lease()` reads the pod's lease from its status: a `LocalLease` with `held`, `holder`,
|
|
2372
|
+
`purpose`, `left_s`, `mine` (this session holds it) and `reported` (the firmware reports a
|
|
2373
|
+
lease). `bp.leased` is true while this session holds either lease.
|
|
2374
|
+
- If the lease is stopped from the web app, the next command raises `PodLeaseLostError` (with `by`,
|
|
2375
|
+
who stopped it) once; the session stops renewing it, later commands run without a lease, and it
|
|
2376
|
+
is never taken again. A test run being recorded is marked invalid (`health.lease_lost`). A lease
|
|
2377
|
+
that only ran out (the pod restarted, say) is taken again by the heartbeat.
|
|
2378
|
+
|
|
2379
|
+
**Joining a runner's lease.** With `BENCHPOD_LEASE` set (`benchpod ci` sets it for the processes it
|
|
2380
|
+
starts), `BenchPod` joins the lease with that id instead of taking its own: on the LAN and the USB
|
|
2381
|
+
network it becomes an owner of the pod's lease, over the cloud it uses the id for the server's
|
|
2382
|
+
lease. Either way it never renews or releases it; the runner does. On a pod without the `lease`
|
|
2383
|
+
feature it logs one warning and runs without a lease. When the runner's lease is stopped from the
|
|
2384
|
+
web app, the pytest plugin ends the session after the test that saw it (exit code 2, "run stopped
|
|
2385
|
+
by ..."); the cases so far, `health.lease_lost` and the reason still go to the run folder.
|
|
2223
2386
|
|
|
2224
2387
|
Over the cloud, ordinary commands go through the server's command channel rather than the byte
|
|
2225
2388
|
tunnel, so they keep working while a UART session holds the tunnel.
|
|
@@ -2229,7 +2392,8 @@ tunnel, so they keep working while a UART session holds the tunnel.
|
|
|
2229
2392
|
| `api_base=` / `--benchpod-api-base` / `BENCHPOD_API_BASE` | `https://www.embeddedci.com` | embeddedci server |
|
|
2230
2393
|
| `api_key=` / `--benchpod-api-key` / `BENCHPOD_API_KEY` | — | API-key authentication (preferred over OIDC when set) |
|
|
2231
2394
|
| `cloud_token=`, `cloud_audience=` | — | supply a session token / override the OIDC audience |
|
|
2232
|
-
| `lease=`, `lease_wait=`, `lease_ttl=` | `True`, `600`, `120` | device lease |
|
|
2395
|
+
| `lease=`, `lease_wait=`, `lease_ttl=`, `lease_purpose=` | `True`, `600`, `120`, the run's suite or `"sdk"` | device lease |
|
|
2396
|
+
| `BENCHPOD_LEASE` | — | join this lease id (set by `benchpod ci`) instead of taking a new lease |
|
|
2233
2397
|
|
|
2234
2398
|
## Build reporting
|
|
2235
2399
|
|
|
@@ -2253,7 +2417,18 @@ def test_boots(benchpod, firmware, build_report):
|
|
|
2253
2417
|
|
|
2254
2418
|
Reporting is active only inside GitHub Actions with a mintable session token (`id-token: write`,
|
|
2255
2419
|
repo trusted in the web app). Everywhere else the fixture yields an inert reporter
|
|
2256
|
-
(`build_report.active` is false), so the same test runs unchanged.
|
|
2420
|
+
(`build_report.active` is false), so the same test runs unchanged.
|
|
2421
|
+
|
|
2422
|
+
**Test results on the build.** When `build_report` reports, the session's tests are also recorded
|
|
2423
|
+
as a [test run](#test-run-recording) and uploaded at the end, linked to the build the fixture
|
|
2424
|
+
created (`inputs.dut_firmware.build_id`): every test's outcome, duration, measurements and pod-call
|
|
2425
|
+
timings, and the traces of the failed tests. The build page shows them under Tests. The fixture
|
|
2426
|
+
still sends the pass/fail with the build, so older servers keep showing it; current servers keep
|
|
2427
|
+
the build's own status for the build and show the tests from the run, so a failed test no longer
|
|
2428
|
+
turns the build red. With several tests using the fixture, the run is linked to the first build. The run is uploaded
|
|
2429
|
+
with the reporter's own credentials (`build_report.api_base`, `build_report.session_token`).
|
|
2430
|
+
Recording starts by itself in GitHub Actions when a collected test uses `build_report`; pass
|
|
2431
|
+
`--embeddedci-run-dir` to choose the folder. `--benchpod-build-target` /
|
|
2257
2432
|
`BENCHPOD_BUILD_TARGET` records a platform id. Outside pytest, `make_build_reporter()` returns the
|
|
2258
2433
|
same `BuildReporter` / `NoopBuildReporter`.
|
|
2259
2434
|
|
|
@@ -2291,12 +2466,13 @@ Invalid arguments raise `ValueError` before anything is sent. Everything else ra
|
|
|
2291
2466
|
| `FirmwareError` | the pod replied with an error (e.g. "la voltage not set"); a fix the firmware spells as a raw protocol command is rewritten into the SDK call in the message, and `firmware_message` keeps the pod's own text | `firmware_message`, `cmd` |
|
|
2292
2467
|
| `FlashError` | OpenOCD failed, is missing, or lacks the TCP backend | |
|
|
2293
2468
|
| `TargetUnreachableError` (a `FlashError`) | the probe worked but no target answered on SWD | |
|
|
2294
|
-
| `DeviceBusyError` | a
|
|
2469
|
+
| `DeviceBusyError` | a device lease was not granted within `lease_wait` | |
|
|
2295
2470
|
| `CloudAuthError` | no session token: API key rejected, OIDC unavailable, exchange failed | |
|
|
2296
2471
|
| `ServerApiError` | an embeddedci server API call failed | `status` (HTTP) |
|
|
2297
2472
|
| `PodLockedError` (a `FirmwareError`) | the pod's LAN policy keeps the command for the cloud or the USB console | `firmware_message`, `cmd` |
|
|
2298
2473
|
| `PodBusyError` (a `FirmwareError`) | the pod is busy (`busy: …`), e.g. a capture or upload is running | `firmware_message`, `cmd` |
|
|
2299
|
-
| `PodLeasedError` (a `PodBusyError`, `DeviceBusyError` and `TransportError`) | a cloud job holds the pod (its refusal on the LAN, or the server's HTTP 409) | `holder`, `left_s`, `expires_at`, `status` |
|
|
2474
|
+
| `PodLeasedError` (a `PodBusyError`, `DeviceBusyError` and `TransportError`) | someone else holds the pod's lease (`BP0025`), a cloud job holds the pod (its refusal on the LAN, or the server's HTTP 409), or the lease did not free within `lease_wait` | `holder`, `purpose`, `left_s`, `expires_at`, `status` |
|
|
2475
|
+
| `PodLeaseLostError` (a `FirmwareError`) | the pod's lease this session held was stopped from the web app or the cloud (`BP0026`); the command did not run | `by` |
|
|
2300
2476
|
| `PermissionDeniedError` (a `FirmwareError` and `TransportError`) | the pod's `forbidden: …` on a cloud tunnel, or a server HTTP 403 (`ServerPermissionDeniedError`, also a `ServerApiError`, from `ServerApi`) | `status` |
|
|
2301
2477
|
| `UnsupportedFeatureError` (a `FirmwareError`) | the pod lacks the feature: its capabilities say so (raised before anything is sent), it answers `unknown cmd`, or the digital-only board has no analog front end | `feature`, `firmware_version`, `firmware_message`, `cmd` |
|
|
2302
2478
|
| `UartTimeout` | `UartSession.expect` timed out | `text` |
|
|
@@ -2331,11 +2507,11 @@ from this README, so the list stays complete.
|
|
|
2331
2507
|
|
|
2332
2508
|
`BenchPod(connection=None, *, la_voltage=None, timeout=30.0, transport=None, api_base=None,
|
|
2333
2509
|
api_key=None, cloud_token=None, cloud_audience=None, cloud_user_token=None, lease=True,
|
|
2334
|
-
lease_wait=600.0, lease_ttl=120, wiring=None)`. A context manager; `close()` is idempotent.
|
|
2510
|
+
lease_wait=600.0, lease_ttl=120, wiring=None, lease_purpose=None)`. A context manager; `close()` is idempotent.
|
|
2335
2511
|
|
|
2336
2512
|
| Area | Methods and properties |
|
|
2337
2513
|
|---|---|
|
|
2338
|
-
| Connection and device | `ping()`, `status()`, `diag()` (heap, per-task stacks, network-stack and console counters: the `diag` command on firmware 3.10.9+, else the full `status`), `mac_addresses(status=None)` (the Ethernet and Wi-Fi MACs, see [MAC addresses](#mac-addresses-managed-networks)), `capabilities`, `refresh_capabilities()` (drop the cached capabilities and read them again), `close()`, `leased` (true while this client holds the
|
|
2514
|
+
| Connection and device | `ping()`, `status()`, `diag()` (heap, per-task stacks, network-stack and console counters: the `diag` command on firmware 3.10.9+, else the full `status`), `mac_addresses(status=None)` (the Ethernet and Wi-Fi MACs, see [MAC addresses](#mac-addresses-managed-networks)), `capabilities`, `refresh_capabilities()` (drop the cached capabilities and read them again), `close()`, `leased` (true while this client holds a lease, see [Device leases](#device-leases)), `local_lease()` (the pod's own lease: `LocalLease`), `wiring`, `save_wiring(wiring=None, name=None)` (store a wiring profile on the pod; firmware before 3.10.8: on embeddedci.com), `signal(name)`, `fpga_image(image)`, `usb_cc()`, `usb_network(on=None)` (the USB network setting; `False` turns the adapter off over the USB link), `lan_tls()`, `set_lan_tls_https_only(on)`, `regenerate_lan_tls()`, `set_lan_tls_cert(cert_pem, key_pem)` (the LAN API over TLS, see [TLS on the LAN](#tls-on-the-lan)) |
|
|
2339
2515
|
| LA voltage | `set_la_voltage(volts)`, `get_la_voltage()` |
|
|
2340
2516
|
| Power and reset | `power_on(efuse=None, *, delay=None)`, `power_off(efuse=None, *, delay=None)`, `target_power(efuse=None, *, on, delay=None)`, `target_status()`, `power_status()`, `measure_power(duration, *, efuse=None, rate_hz=500.0, keep_samples=0)`, `power_profile(*, efuse=None, rate_hz=500.0, keep_samples=4096, max_duration=60.0)`, `reset_target(*, pulse=0.1)`, `set_reset(asserted)`, `reset_state()` |
|
|
2341
2517
|
| Flashing | `flash(...)`, `spi_flash(image, addr=0, *, erase=True, verify=True, hold_reset=False, sck=, mosi=, miso=, cs=)`, `open_spi(...)`, `open_motor_emulator(...)` |
|