~aleteoryx/muditaos

ref: 103af76459540f4a5fbf93e04496ca25f07313b4 muditaos/test/firmware_update_test/README.md -rw-r--r-- 1.2 KiB
103af764 — SP2FET [EGD-4836] Add firmware update test 5 years ago

#Firmware update test

The aim of this test is to check the correctness of the service-desktop API and upgrade the phone software.

This test is based on Harness class and uses pyTest to verify the update process. It makes use of service-desktop API to upload a tarball update package to the phone's memory and execute the update. After a successful update the phone should reset and an update check will be performed. In the end, an update verification status will be shown in the console (along with the exit code).

#Usage

To be able to conduct the test (or just use the script as an update utility) a few prerequisites have to be met:

  • Pure needs connected via USB
  • Your Python version has to be at least 3.8
  • Your Python virtual environment needs to be properly set up (as mentioned in PyTest's readme)

After all of the requirements are fulfilled, the script can be safely executed:

python3 ./update.py tarball_path

The serial port used by the phone will be detected automatically.

To obtain the tarball package use either proper CMake target (work in progress) or the genupdatepkg.sh script located in the config subfolder in the root repository.