Open gligorisaev opened 6 months ago
Implemented solution:
DUT should be accessable online:
The SD Card of the DUT should be accessable online in order to be burned with needed image files (.img)
The SD card is inserted in the USD SD Mux device which provides two connections, to the HOST and to the DUT Host is accessable online:
ssh thinedge@sikahq.myddns.me
(ssh public key needs to be provided)ssh 192.168.193.87
over ZeroTier network, the Machine that runs the test must be member of the ZeroTier network as well.Switching the SD card is done by running following commands:
sudo venv/bin/usbsdmux /dev/sg0 dut
to use it with the DUTsudo venv/bin/usbsdmux /dev/sg0 host
to use it with the HostThe DUT should be turned ON/OFF remotely to ensure new load of SD Card with new image
mosquitto_pub -h 192.168.193.87 -t cmnd/sonoff_switch /POWER -m "ON"
mosquitto_pub -h 192.168.193.87 -t cmnd/sonoff_switch /POWER -m "OFF"
Creating backup image of the SD Card:
lsblk
sudo umount /dev/sda1
& sudo umount /dev/sda2
sudo dd if=/dev/sda of=~/sdcard_backup.img bs=4M status=progress
Restoring backup image to the SD Card
sudo dd if=~/sdcard_backup.img of=/dev/sda bs=4M status=progress
IMPORTANT:
Building a setup which will provide running different tests manually or by Robot Framework Test Suites.