Permalink
Browse files

Travis: run FreeCAD and check log against .log_errors

All phrases that should trigger test build failure should be
added to .log_errors, one per line.

Tested-by: sgrogan
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information...
1 parent f85352d commit e544a660868aa804d4cfb50e1a04dd73bc55e87e @PrzemoF PrzemoF committed with wwmayer Sep 15, 2015
Showing with 13 additions and 0 deletions.
  1. +3 −0 .log_errors
  2. +10 −0 .travis.yml
View
@@ -0,0 +1,3 @@
+Wrn:
+Err:
+Cannot find icon:
View
@@ -44,6 +44,8 @@ before_install:
- sudo apt-get install -y swig
#Patch the system - there is a bug related to invalid location of libs on ubuntu 12.04
- sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib/i386-linux-gnu
+ - "export DISPLAY=:99.0"
+ - "sh -e /etc/init.d/xvfb start"
install:
- mkdir build && cd build && cmake ../
@@ -52,4 +54,12 @@ script:
- make -j2
- PYTHONPATH=$(pwd)/lib/ python -c "import sys, unittest, FreeCAD, TestApp; sys.exit(0 if unittest.TextTestRunner().run(TestApp.All()).wasSuccessful() else 1)"
- sudo make install
+ - bin/FreeCAD --log-file /tmp/FreeCAD.log &
+ - sleep 10 && pkill FreeCAD
+ - cat /tmp/FreeCAD.log
+ - grep --file=../.log_errors /tmp/FreeCAD.log ; [ $? == 1 ] && echo "No errors from .log_errors file found in the log after start from build directory" || ( echo "Error from .log_errors found!" && false )
+ - /usr/local/bin/FreeCAD --log-file /tmp/FreeCAD_installed.log &
+ - sleep 10 && pkill FreeCAD
+ - cat /tmp/FreeCAD_installed.log
+ - grep --file=../.log_errors /tmp/FreeCAD_installed.log ; [ $? == 1 ] && echo "No errors from .log_errors file found in the log after start from /usr/local/bin" || ( echo "Error from .log_errors found!" && false )

0 comments on commit e544a66

Please sign in to comment.