During the development of the Nim bindings we started doing automated headless testing.
We noticed there's a way to exit the simulator from Lua, but there isn't one in the C API.
A C function to do the same would be nice to have!
Also, a way to specify the exit code (for failed tests and such) would be very useful!
you could read some inaccessible memory to bring down the simulator haha
I know it’s a half joke, but the reason this doesn’t work is that exit codes matter. In this case, the simulator is running tests, so the build needs to fail if the tests fail. Exit codes are currently how that failure is communicated from inside the simulator to the container.
The code could be adjusted to create a file based flag that gets written after the tests pass, but this is more complicated, indirect, and less obvious behavior.
Alright. I’ll try to find where I put my sense of humor.
Haha no worries, it was more suggested as a possible workaround while the true behavior isn't available. I agree it would be non-obvious and not ideal
Indeed, this feature could be even more useful if we could specify the exit code.
I'll add this to the proposal!
Filed! I'll try and get this into the next API update, 1.14.0
Any update on this?
Seems like this feature didn't make it into OS 2.0
Sorry for the delay, I'll make sure this is still on our radar!