We had problems with the unit tests that the output to the console was mangled, lines would miss and the order of the output was not kept properly.
We found that the problem is related to using Python and git-bash in combination. Some users in Stackoverflow also indicate problems with php and git-bash.
The solution (workaround) is to use winpty, but with some special undocumented flags, because git-bash is not a windows console.
We describe the problem/solution as this:
I leave here the work-around we found, in case it is useful for anybody:
winpty.exe -Xallow-non-tty -Xplain /C/Users/travis/build/FreeCAD/FreeCAD/build/bin/FreeCADCmd.exe --run-test 0 | tee runlog.txt
grep FAILED runlog.txt ; [ $? == 1 ] && echo "Build succeeded and tests passed!" || ( echo "Tests failed!" && false )
Our travis.yml is: