Tests reference¶
Protoplaster contains tests described in the following sections:
ADC12DJ3200 SPI test¶
This module provides tests for the ADC12DJ3200:
Tests¶
test_default_valuescheck if some ADC12DJ3200 registers have default reset values
LTC2493 device test¶
This module provides tests for LTC2493:
Tests¶
test_is_alivecheck if responds correctly to simple requests
LTC2499 device test¶
This module provides tests for LTC2499:
Tests¶
test_is_alivecheck if responds correctly to simple requests
ADC device test¶
This module provides tests for ADC devices:
Tests¶
test_device_namecheck if the device name is ``
test_is_alivecheck if `` exists
test_read_adcverify that the ADC output stays between the defined minimum(-inf) and maximum(+inf)
Eye Scan tests¶
This module provides tests for Eye Scan using IBERT:
Tests¶
test_create_diagramparse `` and create diagram
test_eye_sizeparse `` and assert eye size
test_transceiver_statuscheck if the transceiver link is correctly established via verifying STATUS property
Camera sensor tests¶
This module provides tests dedicated to V4L devices on specific video node: device
Parameters¶
camera_name:str, requiredCamera sensor name
device:str, requiredVideo device
driver_name:str, requiredVideo driver name
save_file:strOutput file for frame test
Tests¶
test_device_namecheck if the camera sensor name is
camera_nametest_driver_namecheck if the camera sensor driver name is
driver_nametest_frametry to capture frame
LMK04828 SPI test¶
This module provides tests for the LMK04828:
Tests¶
test_default_valuescheck if read-only LMK04828 registers have their default reset value
LTC2655 device test¶
This module provides tests for LTC2655:
Tests¶
test_is_alivecheck if LTC2655 responds correctly to simple requests
LTC2657 device test¶
This module provides tests for LTC2657:
Tests¶
test_is_alivecheck if LTC2657 responds correctly to simple requests
DAC device test¶
This module provides tests for DAC devices:
Tests¶
test_sysfs_interfacecheck if the sysfs interface exists: ``
Eye Scan tests¶
This module provides tests for Eye Scan:
Tests¶
test_create_diagramparse `` and create diagram
test_eye_sizeparse `` and assert eye size
DAC38J8x SPI test¶
This module provides tests for the DAC38J8x:
Tests¶
test_config127_valueverify the default value of the read-only CONFIG127 register
Extended simple tests¶
This module extends TestSimple:
Parameters¶
device:str, requiredName to use in dummy tests
skipped_devices:list[str]List of devices to skip
Tests¶
test_conditional_skipThis test is skipped if the device name is “skip” or its contained in skipped_devices list
test_configure_runs_onceThis test asserts
configurehas been executed and the class state is correctly initialized for the current test run.test_failureThis test always fails.
test_record_artifactThis test always succeeds, and records an artifact.
test_successThis test always succeeds.
Flashing FPGA test¶
This module provides tests for flashing the fpga:
Tests¶
PI4IO tests¶
This module provides tests dedicated to PI4IO
Tests¶
test_is_alivecheck if PI4IOE5V96224 responds correctly to simple requests
GPIOs tests¶
This module provides tests dedicated to GPIO on specific pin number
Tests¶
test_read_writeread the input value and confirm it is ``
HTTP echo tests¶
This module tests HTTP responses between nodes: dev1, dev2
Parameters¶
dev1:str, requiredDevice 1 to be used in tests
dev2:str, requiredDevice 2 to be used in tests
port:intPort for this machine to run server on
test_string:strString to send in tests (default: “Hello World!”)
Tests¶
test_echo_asyncAsync Orchestration test:
Main PC starts HTTP server.
dev2 starts polling for the message (non-blocking).
Main PC thread sleeps for 5 seconds.
dev1 connects to Main PC and POSTs “Hello world”.
dev2 receives the message and returns it.
test_echo_fully_asyncFully Async test:
Main PC starts HTTP server.
Triggers dev2 (read) AND dev1 (write) asynchronously.
Waits for both to complete.
test_echo_multinodeOrchestration test:
Main PC starts HTTP server.
dev1 connects to Main PC and POSTs “Hello world”.
dev2 connects to Main PC and GETs the message.
Main PC verifies the message matches.
I2C devices tests¶
This module provides tests dedicated to i2c devices on specific buses:
Parameters¶
bus:int, requiredSMBus I2C interface
devices:list[i2c.__I2C_Device], requiredList of I2C devices
__I2C_Device(type with attributes defined below)
name:strName of I2C device
address:intAddress of I2C device
Tests¶
test_addressesdetection test:
check for device
nameon addressaddress
TCA9548A test¶
This module provides tests for the TCA9548A:
Tests¶
test_is_alivecheck if TCA9548A responds correctly to simple requests
test_resetCheck whether the TCA9548A responds correctly to a reset triggered by pulling low
DMA test¶
This module provides tests for DMA:
Tests¶
test_memoryverify the integrity of memory of size with iterations.
Network interface tests¶
This module provides tests dedicated to network interfaces: interface
Parameters¶
interface:str, requiredNetwork device to perform tests on
speed:strSpeed of network device [Mbit/s]
Tests¶
test_existcheck if the interface exists
test_speedcheck if the interface speed is
speedMbit/s
DA9062 device test¶
This module provides tests for DA9062:
Tests¶
test_config_idverify that the DA9062 PMIC returns the expected config ID: ``
test_current_ldosverify voltage of:
test_current_selectionsverify selection of:
test_customer_idverify that the DA9062 PMIC returns the expected customer ID: ``
test_is_alivecheck if DA9062 responds correctly to simple requests
test_variant_idverify that the DA9062 PMIC returns the expected variant ID: ``
UCD90320U device test¶
This module provides tests for UCD90320U:
Tests¶
test_clear_faultsclear the faults latched by the UCD90320U in preparation for a new test run
test_is_alivecheck if UCD90320U responds correctly to simple requests
test_read_faultsread the faults latched by the UCD90320U after the test run
Simple tests¶
This module provides simple dummy tests: device
Parameters¶
device:str, requiredName to use in dummy tests
Tests¶
test_conditional_skipThis test is skipped if the device name is “skip”
test_configure_runs_onceThis test asserts
configurehas been executed and the class state is correctly initialized for the current test run.test_failureThis test always fails.
test_record_artifactThis test always succeeds, and records an artifact.
test_successThis test always succeeds.
SPI device tests¶
This module provides tests dedicated to SPI devices:
Tests¶
test_loopbackcheck if an SPI device loops back data transferred to it
TMP431 device test¶
This module provides tests for TMP431:
Tests¶
test_is_alivecheck if TMP431 responds correctly to simple requests
USB tests¶
This module provides tests for USB devices: device
Parameters¶
device:str, requiredName of device as seen by kernel
speed:intExpected speed [Mbps]
Tests¶
test_negotiated_speedcheck if the negotiated USB speed is Mbps
test_sysfs_interfacecheck if the sysfs interface exists: ``