# - linux
# - osx
+python:
+ - "3.4"
+
before_script:
- sudo apt-get update -qq
- - sudo apt-get install -qq cmake libevent-dev libglib2.0-dev libgmime-2.6-dev libluajit-5.1-dev liblua5.1-0-dev libpcre3-dev libsqlite3-dev libmagic-dev ragel make libssl-dev
+ - sudo apt-get install -qq cmake libevent-dev libglib2.0-dev libgmime-2.6-dev libluajit-5.1-dev liblua5.1-0-dev libmagic-dev libpcre3-dev libsqlite3-dev libssl-dev make ragel redis-server
# - echo $TRAVIS_OS_NAME
# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq ; fi
# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq cmake libevent-dev libglib2.0-dev libgmime-2.6-dev libluajit-5.1-dev libpcre3-dev libsqlite3-dev libhiredis-dev ; fi
# - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi
# - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install cmake gmime glib luajit pcre hiredis sqlite libevent ; fi
-script:
- - mkdir _build
- - cd _build
- - cmake .. -DCMAKE_INSTALL_PREFIX=../_install -DCMAKE_C_COMPILER=$CC
+script:
+ - chmod a+rx /home/travis
+ - cmake . -DCMAKE_INSTALL_PREFIX=./_install -DCMAKE_C_COMPILER=$CC
- cmake --build . --target install
+ - sudo pip install robotframework
+ - sudo robot test/functional/cases
compiler:
- clang
Resource lib.robot
*** Variables ***
-${REDIS_SERVER} servers = "${LOCAL_ADDR}:${REDIS_PORT}"
+${REDIS_SERVER} servers = "${REDIS_ADDR}:${REDIS_PORT}"
${STATS_BACKEND} redis
${STATS_HASH} hash = "siphash";
${STATS_KEY} key = "${KEY_PVT1}";
Resource lib.robot
*** Variables ***
-${REDIS_SERVER} servers = "${LOCAL_ADDR}:${REDIS_PORT}"
+${REDIS_SERVER} servers = "${REDIS_ADDR}:${REDIS_PORT}"
${STATS_BACKEND} redis
${STATS_HASH} hash = "xxhash";
${STATS_KEY} key = "${KEY_PVT1}";
Resource lib.robot
*** Variables ***
-${REDIS_SERVER} servers = "${LOCAL_ADDR}:${REDIS_PORT}"
+${REDIS_SERVER} servers = "${REDIS_ADDR}:${REDIS_PORT}"
${STATS_BACKEND} redis
${STATS_HASH} hash = "siphash";
Resource lib.robot
*** Variables ***
-${REDIS_SERVER} servers = "${LOCAL_ADDR}:${REDIS_PORT}"
+${REDIS_SERVER} servers = "${REDIS_ADDR}:${REDIS_PORT}"
${STATS_BACKEND} redis
${STATS_HASH} hash = "xxhash";
-bind ${LOCAL_ADDR}
+bind ${REDIS_ADDR}
daemonize yes
+logfile ${TMPDIR}/redis.log
pidfile ${TMPDIR}/redis.pid
port ${REDIS_PORT}
${template} = Get File ${TESTDIR}/configs/redis-server.conf
${config} = Replace Variables ${template}
Create File ${TMPDIR}/redis-server.conf ${config}
+ Log ${config}
${result} = Run Process redis-server ${TMPDIR}/redis-server.conf
+ Run Keyword If ${result.rc} != 0 Log ${result.stderr}
Should Be Equal As Integers ${result.rc} 0
${REDIS_PID} = Get File ${TMPDIR}/redis.pid
Run Keyword If '${REDIS_SCOPE}' == 'Test' Set Test Variable ${REDIS_PID}
... ELSE IF '${REDIS_SCOPE}' == 'Suite' Set Suite Variable ${REDIS_PID}
+ ${redis_log} = Get File ${TMPDIR}/redis.log
+ Log ${redis_log}
Run Rspamc
[Arguments] @{args}
PORT_CONTROLLER = 56790
PORT_FUZZY = 56791
PORT_NORMAL = 56789
+REDIS_ADDR = '127.0.0.1'
REDIS_PORT = 56379
RSPAMD_GROUP = 'nogroup'
RSPAMD_USER = 'nobody'