FreeCAD: master 272cbd19

Author Committer Branch Timestamp Parent
blacey blacey master 2016-03-10 06:47:53 master 3ca1ec2c
Changeset Exit with non-zero status when unit tests fail.
1. Enhanced TestApp.py to return the unittest TestResult object to the calling method
2. FreeCADTest.py now checks the TestResult object. If all tests pass, FreeCADTest.py exits with a 0 however if any tests fail, then it exits with 1. FreeCADTest.py calls os._exit() with the exit code instead of sys.exit() because Base::Interpreter:SystemExitException intercepts sys.exit() calls and swallows the exit code so there is no way to propogate the non-zero code from the python test cases through the interpreter to the shell in the current call stack.
mod - src/App/FreeCADTest.py Diff File
mod - src/Mod/Test/TestApp.py Diff File