diff --git a/README.md b/README.md index c4a02de0..f8e0ab06 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,36 @@ This repository includes a test suite that covers most of the API and that is de Please help us improve the coverage of the test suite! +#### To build and run unit tests + +The unit tests are automatically built by GitHub as part of pull request checks (in `.github/workflows/unit-tests.yml`). + +To build and run locally: + +**Dependencies** + +* [CMake](https://cmake.org/) +* [GCC](https://gcc.gnu.org/) + +On (Ubuntu) Linux run: + +```bash +sudo apt-get install build-essential cmake +``` + +From the project root: + +```bash +cd test && mkdir build && cd build +cmake .. +make && bin/test-ArduinoCore-API +``` + ### Implementing ArduinoCore-API In order to compile a core which is implementing ArduinoCore-API you'll need to copy/symlink the `api` directory to the target's `cores/arduino` directory as part of your development and release workflow. The most elegant and effective solution is to develop your core with `api` symlinked and produce the distributable archive by telling `tar` to follow symlinks. Example: -``` +```bash tar --exclude='*.git*' -cjhvf $yourcore-$version.tar.bz2 $yourcore/ ```