Skip to main content

Crate device_tests

Crate device_tests 

Source
Expand description

Support code for the on-device integration tests of the QMI crates on the Quectel AG35.

The tests are in the device test target. See the crate README for how to build and run them.

ModulesΒ§

autosleep πŸ”’
connected πŸ”’
device πŸ”’
digits πŸ”’
display πŸ”’
failure πŸ”’
model πŸ”’
print πŸ”’
restore πŸ”’
servers πŸ”’
system
Reads the state of the system: interface addresses, processes and mounts.

MacrosΒ§

skip
Prints why the test can’t run and returns Ok(()) from it.

StructsΒ§

AutosleepGuard
Restores the autosleep setting that the guard found when it was created.
Chain
Formats an error and its sources as error: source: source.
Connected
A client whose connection runs in a task.
Device
An AG35 that the test has to itself.
Guard
Sets modem state back on every path.
Hex
Formats bytes as lowercase hex.
OrNone
Formats an optional value as the value or none.
Outcome
Formats the result of a step as ok or the error chain.
Revision
The Rev line of the project version file.
Servers
The servers of a QMI service.

EnumsΒ§

DigitsError
Error in a digit string.
Failure
Why a test failed.
Model
Module variant.

ConstantsΒ§

PROJECT_VERSION
Path of the file with the firmware revision.
REQUEST_TIMEOUT
Timeout of one QMI request.

TraitsΒ§

Restore
Modem state that a test changed and must set back.

FunctionsΒ§

check_iccid
Checks that an ICCID has 19 or 20 digits and a valid Luhn check digit.
check_imei
Checks that an IMEI has 15 digits and a valid Luhn check digit.
check_imsi
Checks that an IMSI has 6 to 15 digits and a plausible MCC.
device
Checks that the test runs as root on an AG35 and waits until no other test uses the device.
print_skip
Prints why a test can’t run.