diff --git a/.travis.yml b/.travis.yml index 8e387139a..3a3842d57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,10 +12,10 @@ install: - sudo apt-get -qq update - sudo apt-get -qq install libssl-dev pkg-config libhunspell-dev - if [[ "$QT" == "qt4" ]]; then sudo apt-get -qq install libqt4-dev libqt4-webkit libqt4-sql-sqlite; fi - - if [[ "$QT" == "qt5" ]]; then sudo apt-get -qq install libqt5-dev; fi + - if [[ "$QT" == "qt5" ]]; then sudo apt-add-repository -y ppa:beineri/opt-qt511; sudo apt-get update -qq; sudo apt-get install -qq qt51base qt51webkit qt51tools; fi script: - - if [[ "$QT" == "qt5" ]]; then alias qmake=`qtchooser -qt=qt5 -run-tool=qmake --help | head -n1 | cut -d" " -f2`; fi - - qmake - - make - - cd scripts && source run_tests.sh + - QMAKE="qmake" + - if [[ "$QT" == "qt5" ]]; then QMAKE="/opt/qt51/bin/qmake"; fi + - $QMAKE + - cd scripts && ./run_tests.sh $QMAKE diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 24d009057..c02e57448 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -1,8 +1,14 @@ #!/bin/bash # run_tests.sh +QMAKE="qmake" + +if [ -n "$1" ]; then + QMAKE=$1 +fi + cd ../tests/autotests -(qmake DEFINES+=NO_SYSTEM_DATAPATH && make) || exit 1 +($QMAKE DEFINES+=NO_SYSTEM_DATAPATH && make) || exit 1 cd ../../bin ./autotests