diff --git a/.travis.yml b/.travis.yml index 1ba0078..2a28869 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ install: - sudo apt-get install qt${RDM_QT_VERSION:0:2}base libssl1.0.0 -y -qq - sudo apt-get install gcc-4.9 g++-4.9 gdb lcov valgrind cmake -y -qq - if [ "$RDM_QT_VERSION" == "591" ]; then + sudo apt-get install python3 python-virtualenv -y -qq && sudo apt-get install dropbear -y -qq && sudo mkdir -p /etc/dropbear && sudo useradd -d /home/rdm -s /bin/bash -p $(echo test | openssl passwd -1 -stdin) rdm && @@ -56,8 +57,18 @@ install: - gcc --version - gcov --version script: - - if [ "$RDM_QT_VERSION" == "591" ]; then cd ./tests/unit_tests && ./run_tests; fi - - qmake && make + - if [ "$RDM_QT_VERSION" == "591" ]; then pushd ./tests/unit_tests && ./run_tests && popd; fi + - if [ "$RDM_QT_VERSION" == "591" ]; then + pushd ./tests/functional && + mkdir bin && + qmake "DESTDIR=./bin/" && make -s && + virtualenv .venv -p python3 && + source .venv/bin/activate && + pip install -r requirements.txt && + python tests.py && + popd; + fi + - qmake && make -s after_success: - if [ "$RDM_QT_VERSION" == "591" ]; then coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info.filtered; fi services: diff --git a/tests/functional/main.cpp b/tests/functional/main.cpp index abb9fb4..dd54a3d 100644 --- a/tests/functional/main.cpp +++ b/tests/functional/main.cpp @@ -49,17 +49,13 @@ int main(int argc, char *argv[]) QJsonArray allCommands = commands.array(); - RedisClient::ConnectionConfig config("127.0.0.1"); + RedisClient::ConnectionConfig config("127.0.0.1", "test"); config.setPort(6379); RedisClient::Connection connection(config); int processedCommandsCount = 0; int errorsCount = 0; - QObject::connect(&connection, &RedisClient::Connection::log, [](QString msg) { - qDebug() << "Connection:" << msg; - }); - QObject::connect(&connection, &RedisClient::Connection::error, [&errorsCount](QString msg) { qDebug() << "Connection error:" << msg; errorsCount++; diff --git a/tests/functional/qredis-runner.pro b/tests/functional/qredis-runner.pro index 959f738..e634a89 100644 --- a/tests/functional/qredis-runner.pro +++ b/tests/functional/qredis-runner.pro @@ -6,6 +6,8 @@ TEMPLATE = app CONFIG += debug c++11 console CONFIG-=app_bundle +DEFINES += QT_NO_DEBUG_OUTPUT + PROJECT_ROOT = $$PWD/../../ DESTDIR = $$PWD/bin