SpaceTeam / STS1_COBC_SW

Software for the communication and onboard computer (COBC) of SpaceTeamSat1 (STS1)
MIT License
10 stars 2 forks source link

Find a way to use Catch2 with `main()` from Rodos #321

Open PatrickKa opened 2 months ago

PatrickKa commented 2 months ago

Description

If we want to unit test something that needs to run Rodos like EdacVariable which uses a Rodos semaphore, we cannot use Catch2 out of the box. We need to use Catch2 with a custom main(). This should be possible since Rodos allows users to provide their own main function. More precisely, the main() from Rodos calls MAIN() which can be user provided. Unfortunately, this MAIN() does not get the argc, argv arguments which Catch2 needs. This means we have to hack Rodos a bit more to change that.