Bläddra i källkod

testing

tags/v0.17.0
Jonathan Cobb 4 år sedan
förälder
incheckning
46da707464
2 ändrade filer med 24 tillägg och 9 borttagningar
  1. +23
    -8
      bin/jenkins/test-redis
  2. +1
    -1
      utils/cobbzilla-wizard

+ 23
- 8
bin/jenkins/test-redis Visa fil

@@ -31,12 +31,10 @@ function start_redis() {

echo "Starting redis..."
redis-server ${REDIS_CONF} || die "Error starting redis"
echo "Redis successfully started on port ${port}"
}

function stop_redis() {
port=$(redis_port)
REDIS_DIR=/tmp/redis-${port}
function stop_redis_by_dir() {
REDIS_DIR=${1}
PID_FILE=${REDIS_DIR}/redis.pid
if [[ ! -f ${PID_FILE} ]] ; then
echo "Redis pid file not found: ${PID_FILE}"
@@ -45,26 +43,43 @@ function stop_redis() {
kill $(cat ${PID_FILE}) || die "Error killing redis using pid file: ${PID_FILE}"
fi

echo "Removing redis dir: ${REDIS_DIR}"
rm -rf ${REDIS_DIR} || die "Error removing redis dir: ${REDIS_DIR}"
if [[ -d ${REDIS_DIR} ]] ; then
echo "Removing redis dir: ${REDIS_DIR}"
rm -rf ${REDIS_DIR} || die "Error removing redis dir: ${REDIS_DIR}"
fi
}

echo "Redis stopped and cleaned up"
function stop_redis() {
port=$(redis_port)
REDIS_DIR=/tmp/redis-${port}
stop_redis_by_dir ${REDIS_DIR}
}

function redis_clean() {
for REDIS_DIR in $(find /tmp -maxdepth 1 -type d -name "redis-*") ; do
stop_redis_by_dir ${REDIS_DIR}
done
}

if [[ -z ${1} ]] ; then
die "expected one of: start stop port"
die "expected one of: start stop clean port"
fi

case ${1} in
"start")
start_redis
echo "Redis successfully started"
;;
"stop")
stop_redis
echo "Redis stopped and cleaned up"
;;
"port")
redis_port
;;
"clean")
redis_clean
;;
*)
die "invalid argument: ${1}"
;;


+ 1
- 1
utils/cobbzilla-wizard

@@ -1 +1 @@
Subproject commit 13fd0bc476779b7c1d7c28fd7bf1171ea11703f0
Subproject commit 6d0900b9cdf1f47824ea6c50642fd0dfc664cb58

Laddar…
Avbryt
Spara