Merge pull request #919 from CartoDB/rediscell-macosx
Fix test environment in Mac OS X re:redis-cell
This commit is contained in:
commit
61dd92129a
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,4 +11,3 @@ redis.pid
|
|||||||
*.log
|
*.log
|
||||||
coverage/
|
coverage/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
libredis_cell.so
|
|
||||||
|
19
run_tests.sh
19
run_tests.sh
@ -50,17 +50,6 @@ die() {
|
|||||||
exit 1
|
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}/test/support/libredis_cell.so
|
|
||||||
rm redis-cell.tar.gz
|
|
||||||
rm libredis_cell.d
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
trap 'cleanup_and_exit' 1 2 3 5 9 13
|
trap 'cleanup_and_exit' 1 2 3 5 9 13
|
||||||
|
|
||||||
while [ -n "$1" ]; do
|
while [ -n "$1" ]; do
|
||||||
@ -122,9 +111,13 @@ fi
|
|||||||
TESTS=$@
|
TESTS=$@
|
||||||
|
|
||||||
if test x"$OPT_CREATE_REDIS" = xyes; then
|
if test x"$OPT_CREATE_REDIS" = xyes; then
|
||||||
get_redis_cell
|
|
||||||
echo "Starting redis on port ${REDIS_PORT}"
|
echo "Starting redis on port ${REDIS_PORT}"
|
||||||
echo "port ${REDIS_PORT}" | redis-server - --loadmodule ${BASEDIR}/test/support/libredis_cell.so > ${BASEDIR}/test.log &
|
REDIS_CELL_PATH="${BASEDIR}/test/support/libredis_cell.so"
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
REDIS_CELL_PATH="${BASEDIR}/test/support/libredis_cell.dylib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "port ${REDIS_PORT}" | redis-server - --loadmodule ${REDIS_CELL_PATH} > ${BASEDIR}/test.log &
|
||||||
PID_REDIS=$!
|
PID_REDIS=$!
|
||||||
echo ${PID_REDIS} > ${BASEDIR}/redis.pid
|
echo ${PID_REDIS} > ${BASEDIR}/redis.pid
|
||||||
fi
|
fi
|
||||||
|
BIN
test/support/libredis_cell.dylib
Executable file
BIN
test/support/libredis_cell.dylib
Executable file
Binary file not shown.
BIN
test/support/libredis_cell.so
Executable file
BIN
test/support/libredis_cell.so
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user