File: start_redis_and_auto_install.sh

package info (click to toggle)
ruby-redis 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 700 kB
  • ctags: 1,123
  • sloc: ruby: 7,391; sh: 14; makefile: 8
file content (30 lines) | stat: -rwxr-xr-x 606 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
# start_mysqld_and_auto_install.sh - starts an instance of mysqld before
# auto_installing and running do_mysql's test suite. It is inspired by
# debian/test_mysql.sh from libdbi-drivers source package.



set -e

MYTEMP_DIR=`mktemp -d`
ME=`whoami`

export MYSQL_UNIX_PORT=${MYTEMP_DIR}/mysql.sock
DO_MYSQL_USER=root
DO_MYSQL_PASS=
DO_MYSQL_DBNAME=test
DO_MYSQL_DATABASE=/${DO_MYSQL_DBNAME}

redis-server test/test.conf

echo "waiting 5 seconds for redis server to start..."
sleep 5

dh_auto_install

kill -9 `cat test/db/redis.pid`
rm -rf test/db/redis.sock test/db/redis.pid test/db/stdout