...
To do this, we work with the open source "google test" test harness, which google wrote so that they can unit test their own C++ code and decided to release so that the public could make use of it. A test harness is a piece of software that allows us to poke at our code and that gives us a bunch of mechanisms to check that certain conditions are met. Below are the instructions for installing the harness and running the tests.
...
MacOS
Prerequisites
...
Have Cmake installed
Install instructions
...
Attached to this page, you will find a file named GtestInstall_Mac.bash
. Download it and run it with ./GtestInstall_Mac.bash
in whatever directory interests you.
Linux/WSL
...
Prerequisites
...
Have Cmake installed
Install instructions
...
Attached to this page, you will find a file named GtestInstall_Linux.bash
. Download it and run it with ./GtestInstall_Linux.bash
in whatever directory interests you.
Windows
...
Prerequisites
...
Have Cmake installed
Have git bash installed
Install instructions
...
Install chocolatey
Open the windows PowerShell in admin mode.
Inside it, run:
Code Block Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Note that this script has not worked for everyone. If it produces any errors, try running the following instead (from powershell admin):
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
Attached to this page (top right under the three dots then attachements), you will find a file named
GtestInstall_Windows.bash
. Download it and, from git bash in admin mode (having git bash in admin mode is really important!!!), run it with./GtestInstall_Windows.bash
in whatever directory interests you.
...
cd into ZeroPilot-SW\Autopilot
run
./Tools/build.bash -c -t
(-c is only needed the first time, or occasionally when you are switching from a regular build to a unitTest build).
...