Files
timely-reference/test
Max Regan 08085c465d Verify the main app mostly sleeps
This validates that the main watch app spends at
least 99.5% of it's time sleeping in the first 10
seconds.
2020-06-14 18:12:36 +00:00
..

This directory contains the test code and other requirements in order to run the hardware integration tests for the Timely Reference.

The Docker image uses SEGGER's JLink software tools, and requires accepting their license. This may be swapped out for OpenOCD in the future.

Of course, the tools can also be installed directly into the host- Docker provides a (more) consistent runtime environment and forces documentation of setup steps.

Hardware Requirements

Current:

The current hardware detection mechanisms may fail if more than one these devices is connected.

Execution

First, build the docker image. Depending on your execution environment, you may need to escalate privileges in order to run docker.

cd <project-root>
docker build -t tr-test test/

Then, execute the tests. The tests require access to the USB hardware components, so their files need to be volume-mounted in, and the container must be given privilege in order to access the devices.

docker run --privileged -it -v /dev/bus/usb:/dev/bus/usb -v $(pwd):/build-dir tr-test /build-dir/test/src/tr_test/test.py

The tests also accept other arguments accepted by pytest.