Tock Hardware CI

Overview

Tock is an embedded operating system that supports many embedded boards and provides an abstraction layer for many of their features and capabilities. Up until our project, developers have had to manually test the OS on each of their respective boards and provide feedback in forums and Github issue threads. Our goal is to speed up and automate this process, allowing for a true CI experience. After every to the main tock repository, our system automatically runs a set of tests on actual hardware and then reports back the outcome of these tests to the Github "Actions" tab.

Motivation

Because Tock is an open source software, many people contribute features to make it a better place. However, developers usually only carry out tests on different boards before the release every year, and this makes debugging very hard. Issues and bugs could potentially appear in any added feature since the prior release. The goal of our hardware CI test is to test features on all supported boards as soon as the developers add them. Therefore, at the end of the release cycle, the developers won't need to go through an extensive trial and error process to figure out which added features in the past year have caused failures.

Workflow Diagram

  1. Code is pushed or accepted via a pull request.
  2. Github servers send a message to each Raspberry Pi.
  3. The Raspberry Pi starts by getting the most recent copy of Tock OS.
  4. The Raspberry Pi starts its tests.
  5. The Pi reads its local config file for information on what board is connected to it.
  6. This information is parsed.
  7. The Pi builds the version of Tock respective to its own embedded target board.
  8. The Pi flashes the newly built binary onto the embedded target board.
  9. The Pi retrieves the newest version of the tests and builds them.
  10. The Pi installs and runs the test apps serially.
  11. The Action Runner listens to standard out where the Pi logs the output.
  12. Finally, the action runner sends the output and return code to Github where it is displayed in the "Actions" tab.

Project Overview

Project Specification

Oral Project Update

Milestone Report

Final Oral Presentation

Final Project Video

Final Report