-
Notifications
You must be signed in to change notification settings - Fork 44
/
mongo_regression.sh
executable file
·38 lines (30 loc) · 1.58 KB
/
mongo_regression.sh
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
31
32
33
34
35
36
37
#!/bin/bash
# Created by Roel Van de Paar, Percona LLC
SCRIPT_PWD=$(cd `dirname $0` && pwd)
RANDOMD=$(echo $RANDOM$RANDOM$RANDOM | sed 's/..\(......\).*/\1/') # Random number generator (6 digits)
PORT=$[50000 + ( $RANDOM % ( 9999 ) ) ]
TEST_SUITE=jsCore
echoit(){
echo "[$(date +'%T')] [$SAVED] $1"
if [ "${WORKDIR}" != "" ]; then echo "[$(date +'%T')] [$SAVED] $1" >> /${WORKDIR}/startup_mongo.log; fi
}
echoit "Checking Prerequisites..."
if [ ! -r mongod -o ! -r mongo -o ! -r mongos ]; then
echo "Assert: required binaries ./mongod, ./mongo and ./mongos not present!"
exit 1
fi
echoit "Terminating all owned mongod instances..."
${SCRIPT_PWD}/mongo_kill_procs.sh
echoit "Setting up work directory [/dev/shm/${RANDOMD}]..."
WORKDIR="/dev/shm/${RANDOMD}"
mkdir -p ${WORKDIR}
# Test suites
# --mode=files|suite (files= individual .js files)
# * Core JS: js or jsCore (same core/*.js)
# * Others: quota,jsPerf,disk,noPassthroughWithMongod,noPassthrough,parallel,concurrency,clone, repl,replSets,dur,auth,sharding,tool,aggregation, multiVersion,failPoint,ssl,sslSpecial,gle,slow1,slow2
# Other SE's we do not use: mmap_v1/rocksDB
echoit "Running test suite ${TEST_SUITE}..."
#buildscripts/smoke.py --mode=suite --port=$PORT --dont-start-mongod --with-cleanbb --report-file=${WORKDIR}/smoke.py.log --smoke-db-prefix ${WORKDIR} --storageEngine=tokuft jsCore
buildscripts/smoke.py --mode=suite --port=$PORT --with-cleanbb --report-file=${WORKDIR}/smoke.py.log --smoke-db-prefix ${WORKDIR} --storageEngine=tokuft jsCore
echoit "Terminating all owned mongod instances..."
${SCRIPT_PWD}/mongo_kill_procs.sh