~aleteoryx/muditaos

ref: 7d7003d62639426be8eb00f4fc288b68139f5566 muditaos/test/firmware_update_test/README.md -rw-r--r-- 1.2 KiB
7d7003d6 — Marcin Smoczyński Merge branch 'master' into stable 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.