go test -v -failfast -count 1
where:
-v
is to enable verbose output-failfast
makes the test stop after first failure-count 1
is to avoid Go test caching for example when testing a rebuilt snap
Environment variables can modify the test functionality. Refer to these in
the documentation
of the matter-snap-testing
Go package.
For running Thread tests, two Radio Co-Processors (RCPs) are needed for both local and remote machines.
For building and flashing RCP firmware, please refer to Build and flash RCP firmware on nRF52480 dongle.
LOCAL_INFRA_IF="eno1" \
REMOTE_INFRA_IF="eth0" \
REMOTE_USER="ubuntu" \
REMOTE_PASSWORD="abcdef" \
REMOTE_HOST="192.168.178.95" \
go test -v -failfast -count 1 ./thread_tests
Variable name | Required | Default value | Description |
---|---|---|---|
LOCAL_INFRA_IF | no | wlan0 | Local backhaul network interface |
LOCAL_RADIO_URL | no | spinel+hdlc+uart:///dev/ttyACM0 | Local RCP URL |
REMOTE_HOST | yes | Remote device IP or hostname | |
REMOTE_USER | yes | Remote device SSH username | |
REMOTE_PASSWORD | yes | Remote device SSH password | |
REMOTE_INFRA_IF | no | wlan0 | Remote backhaul network interface |
REMOTE_RADIO_URL | no | spinel+hdlc+uart:///dev/ttyACM0 | Remote RCP URL |