Our unit test suite is a separate C project which compiled a desktop binary - not an ARM binary, so it's either an .exe file if you compile it on Windows or a unit binary if you compile it somewhere else.
Our unit tests compile only a subset of our files, here is the list of folders we test:
Code: Select all
controllers\algo
controllers\math
controllers\sensors
util
ext_algo
This is done so that we do not need to compile ChibiOS or any hardware-specific files for the tests - we only compile the files which contain pure platform-independed logic. This rule also helps with the design and responsibility separation, too.
For Eclipse project on win32 there is a hacky
makelinks.bat batch file which creates symbolic inks for these five directories, If you are using make, you are good to go without the symlinks. One day we will eliminate the symlink hack for Eclipse, too.