Running and Testing TAOS - TAOS-Labs/TAOS GitHub Wiki

Running TAOS

With a clone of the TAOS repository and the tools and packages listed on the TAOS dependencies page TAOS can be easily run with targets from the Makefile. The targets of interest (also listed in this repository's README) are:

  • make run to run TAOS in QEMU with graphics
  • make run-term to run TAOS in QEMU without graphics
  • make test to run TAOS unit tests (described in more detail below)

All of these targets are shorthand for passing certain arguments into cargo to compile then launch TAOS in QEMU. The only difference between run and run-term is that run-term will always boot into a TAOS system that is only capable of displaying a singular terminal to the virtual host's user.

Testing TAOS

The TAOS repository will include the resources required for both process integration tests and unit testing of system elements, the details of which are below.

Unit Tests

Unit tests in the TAOS project are managed via the TAOS fork of the limage crate (link in the dependencies page linked above) and its custom_test_frameworks feature. The limage crate intercepts calls to cargo run and will perform various configuration actions based on arguments provided to it: Including telling cargo to collect and run all functions tagged as unit tests. Functions that implement unit tests should be tagged with the decorator #[test_case] for this purpose.

The TAOS Makefile exists to wrap all desirable calls to cargo run <ARGUMENTS> into a target and to abstract the arguments of the linage crate. For example, to run unit tests one only needs to add their #[test_case] decorated functions to the code base and run make test in the top-level directory of the TAOS repository.

Integration Tests

more details on these resources will be added when they are implemented

⚠️ **GitHub.com Fallback** ⚠️