lhr-solar / BPS

Battery Protection System Code
MIT License
4 stars 2 forks source link

Simulator does not error out #567

Closed manthanand closed 1 year ago

manthanand commented 1 year ago

When simulator.c calls exit(-1), the workflow does not recognize that as a fail because the python script that runs it does not error out. We should fix this (for example, if the wrong number of elements are in the voltage/temperature array, the code will pass all test cases even though they never ran).

manthanand commented 1 year ago

How Issue was seen: In Simulator.c, we used to call exit(-1) if the size of the Voltage/Temperature arrays did not match the number of voltage/temp sensors in config.h. However instead of failing the test, we would just move on to the next test. This was seen on github workflow and WSL.