unit tests

It's all about the code!
Post Reply
User avatar
AndreyB
Site Admin
Posts: 14325
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

unit tests

Post by AndreyB »

We have unit tests. They are in a folder with a misleading 'win32_something' name, but in fact you can compile them under unix as @ does.

If you use cygwin, you need 'gcc core':
Image
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14325
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: unit tests

Post by AndreyB »

Continues integration system is up at http://jenkins.rusefi.com
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14325
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: unit tests

Post by AndreyB »

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.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply