scotty-test#
scotty-test
is a helper tool to run tests on real hardware.
It will guide the user through the needed steps and create a test report.
usage: scotty-test [-h] [--token TOKEN] [--ghcruser GHCRUSER]
[--ghcrtoken GHCRTOKEN] [--sdkpath SDKPATH]
[--sdcard {manual,sdwire}]
options:
-h, --help show this help message and exit
--token TOKEN Azure Storage connection string
--ghcruser GHCRUSER Github username
--ghcrtoken GHCRTOKEN
Github personal access token
--sdkpath SDKPATH Path to custom SDK
--sdcard {manual,sdwire}
SDCard handler
To run you will need
an Azure access token
SAS_TOKEN
access to simplecore-tools repository
a Github account
a computer running Linux -
sudo
,dd
,git
installed - your git client propely setupa SDCard
Internet access
the hardware you want to test
$ SAS_TOKEN=abcdef scotty-test
The tool will download the necessary images and SDKs, run the tests and create a Markdown report that will be pushed to the simplecore-tools repository.
Manual or Automatic tests#
The user can choose to run manual tests, meaning that all the tests will be run but some will need an interaction with the user. For example, the user will have to change switches or measure the pins’ voltage with a multimeter.
Otherwise if the user chooses automatic tests, it will run only the tests that do not need an interaction with the user. And for example, if there is a GPIO Expander connected, it will use it to check the voltage of the pins automatically.
Use Labgrid#
Labgrid is a tool for automated testing. It can be used to flash the SD Card used for the tests.
To run the tests with Labgrid the user will need:
a SDWireC
a serial connection to the board
a USB hub
It is then necessary to configure the exporter file corresponding to the machine in tools/labgrid/client/.
For the serial port, the SDWireC and the Numato GPIO Expander, it is possible to use this kind of command to get the ID_PATH:
$ udevadm info /dev/ttyUSB0
For the Tasmota Power, it is possible to get the topics names after setting it up using the manual.
Labgrid creates places for each board and associates to them a serial port, a SDWireC, a GPIO Expander and a Tasmota power plug. The user can check the places acquired by Labgrid at 172.17.0.2.
Labgrid flashes the image automatically thanks to the SDWireC and then gives the IP address of the board to scotty-test so it could run the tests.