Files
timely-reference/test
Max Regan f455ce9113 Fix RTC synchronization after sleep, add many more tests
There were two issues with the tests

1. Incorrect print formats causing incorrect output.

2. The RTC driver was not waiting for the shadow registers to be
updated after sleeping, their reset values to be read.
2020-05-14 09:47:38 -07: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.