Every test is executed in a separate process. It allows main program not to hang or crash when the test does.
Applications that runs a test is protected from deadly signals (SIGSEGV, FPE and other), any other test's crashes and its hanging.
All the asserts from the test body are being sent to the main process through the shared memory. There are some more things to do, but I want to know that what I do is useful. If it is, I'll do the following:
- Remove the memory limit (now only 1Mb of asserts data can be returned to main process)
- Add correct description output to all the modes (Only basic mode works correctly now)
- You'll find other bugs, I'll fix it.
Added global functions:
set_protected_mode_on(void) - call it before the test run, and it will be executed in protected mode.
set_test_timeout(unsigned int seconds) - set time in seconds for test to run. After that time test will be terminated. Set to 0 to disable this feature.