From da4946d336b747a99c10561e1ac794fac5300ca8 Mon Sep 17 00:00:00 2001 From: abdullahtahiriyo Date: Mon, 27 May 2019 09:58:48 +0200 Subject: [PATCH] Travis winpty (#2214) * Travis: FreeCAD tests invert bars in direct call * Travis: Run FreeCADCmd through winpty * Travis: stdin is not a tty * Travis: winpty -Xallow-non-tty * Travis: winpty -Xplain * Travis: Force build failure on any error during testing * Travis: Use grep/tee to determine failure * Travis: Correct build output --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 18ecb6133e82..f7d78b8092ef 100755 --- a/.travis.yml +++ b/.travis.yml @@ -239,6 +239,7 @@ before_install: curl -L https://github.com/frerich/clcache/releases/download/v4.2.0/clcache-4.2.0.zip --output clcache-4.2.0.zip 7z x clcache-4.2.0.zip > /dev/null export PATH=$CLCACHE_PATH:$PATH + export PATH=$TEST_PATH:$PATH #reset clcache hit stats cmd.exe /C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -z' # clcache stats before compilation @@ -280,8 +281,11 @@ script: # show clcache hit stats cmd.exe /C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s' # run the tests - cmd.exe /C 'cd C:\Users\travis\build\FreeCAD\FreeCAD\build\bin && FreeCADCmd.exe --run-test 0' - cd $HOME + #cmd.exe /C 'cd C:\Users\travis\build\FreeCAD\FreeCAD\build\bin && FreeCADCmd.exe --run-test 0' + # Make build fail if ANY of the following fails + set -ev + 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 ) else sudo make -j2 install ${INSTALLED_APP_PATH} --console --run-test 0