diff --git a/.gitignore b/.gitignore index 948ddaec..ed26bf95 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,3 @@ test/test.log test/acceptance/oauth/venv/* coverage/ npm-debug.log -libredis_cell.so diff --git a/test/run_tests.sh b/test/run_tests.sh index db030305..c3f2cb67 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -18,7 +18,6 @@ OPT_DROP_PGSQL=yes # drop the postgreql test environment OPT_DROP_REDIS=yes # drop the redis test environment OPT_COVERAGE=no # run tests with coverage OPT_OFFLINE=no # do not donwload scripts -OPT_REDIS_CELL=yes # download redis cell cd $(dirname $0) @@ -55,17 +54,6 @@ die() { exit 1 } -get_redis_cell() { - if test x"$OPT_REDIS_CELL" = xyes; then - echo "Downloading redis-cell" - curl -L https://github.com/brandur/redis-cell/releases/download/v0.2.2/redis-cell-v0.2.2-x86_64-unknown-linux-gnu.tar.gz --output redis-cell.tar.gz > /dev/null 2>&1 - tar xvzf redis-cell.tar.gz > /dev/null 2>&1 - mv libredis_cell.so ${BASEDIR}/support/libredis_cell.so - rm redis-cell.tar.gz - rm libredis_cell.d - fi -} - trap 'cleanup_and_exit' 1 2 3 5 9 13 while [ -n "$1" ]; do @@ -103,10 +91,6 @@ while [ -n "$1" ]; do OPT_OFFLINE=yes shift continue - elif test "$1" = "--norediscell"; then - OPT_REDIS_CELL=no - shift - continue else break fi @@ -128,9 +112,12 @@ fi TESTS=$@ if test x"$OPT_CREATE_REDIS" = xyes; then - get_redis_cell echo "Starting redis on port ${REDIS_PORT}" - echo "port ${REDIS_PORT}" | redis-server - --loadmodule ${BASEDIR}/support/libredis_cell.so > ${BASEDIR}/test.log & + REDIS_CELL_PATH="${BASEDIR}/support/libredis_cell.so" + if [[ "$OSTYPE" == "darwin"* ]]; then + REDIS_CELL_PATH="${BASEDIR}/support/libredis_cell.dylib" + fi + echo "port ${REDIS_PORT}" | redis-server - --loadmodule ${REDIS_CELL_PATH} > ${BASEDIR}/test.log & PID_REDIS=$! echo ${PID_REDIS} > ${BASEDIR}/redis.pid fi diff --git a/test/support/libredis_cell.dylib b/test/support/libredis_cell.dylib new file mode 100755 index 00000000..7c7d6c88 Binary files /dev/null and b/test/support/libredis_cell.dylib differ diff --git a/test/support/libredis_cell.so b/test/support/libredis_cell.so new file mode 100755 index 00000000..1da8aa66 Binary files /dev/null and b/test/support/libredis_cell.so differ