Skip to content

Commit 57d638e

Browse files
authored
Merge pull request #18 from nhs-riak/develop-2.2.X-leveled-mas
Develop 2.2.x leveled mas
2 parents 5b04b37 + 5396bbb commit 57d638e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3314
-63
lines changed

group.sh

Lines changed: 83 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,106 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
# $1 is group $2 is backend and $3 is config $4 is results directory
4+
die() {
5+
printf '%s\n' "$1" >&2
6+
exit 1
7+
}
58

9+
# Initialize all the option variables.
10+
# This ensures we are not contaminated by variables from the environment.
11+
GROUP=
12+
CONFIG=
13+
RES_DIR=
14+
BACKEND=
615

7-
echo "Running $1 with $2 and config $CONFIG"
16+
while :; do
17+
case $1 in
18+
-g|--group)
19+
if [ "$2" ]; then
20+
GROUP=$2
21+
shift
22+
else
23+
die 'ERROR: "--group | -g" requires value (e.g. kv)'
24+
fi
25+
;;
26+
-c|--config)
27+
if [ "$2" ]; then
28+
CONFIG=$2
29+
shift
30+
else
31+
die 'ERROR: "--config | -c" required (e.g. "spine")'
32+
fi
33+
;;
34+
-r|--res_dir)
35+
if [ "$2" ]; then
36+
RES_DIR=$2
37+
shift
38+
else
39+
die 'ERROR: "--res_dir | -r" value required if flag present'
40+
fi
41+
;;
42+
-b|--backend)
43+
if [ "$2" ]; then
44+
BACKEND=$2
45+
shift
46+
else
47+
die 'ERROR: "--backend | -b" value required if flag present'
48+
fi
49+
;;
850

9-
if [ "$1" != "yoko" ]; then
10-
TEST_EBIN=ebin
11-
else
12-
TEST_EBIN=~/yokozuna/riak_test/ebin
51+
-?*)
52+
printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2
53+
;;
54+
*)
55+
break
56+
esac
57+
58+
shift
59+
done
60+
61+
if [ -z "$GROUP" ]; then
62+
die "No group specified (-g | --group)"
1363
fi
1464

15-
if [ "$1" != "2i" ]; then
16-
BACKEND=${2:-bitcask}
65+
if [ -z "$CONFIG" ]; then
66+
die "No config specified (-c | --config)"
67+
fi
68+
69+
if [ "$GROUP" != "yoko" ]; then
70+
TEST_EBIN=ebin
1771
else
18-
BACKEND=eleveldb
72+
TEST_EBIN=~/yokozuna/riak_test/ebin
1973
fi
2074

21-
LOG=$1-$(date +"%FT%H%M")-$BACKEND
75+
LOG=$GROUP-$(date +"%FT%H%M")-${BACKEND:-default}
2276

23-
CONFIG=${3:-rtdev}
24-
BASE_DIR=${4:-$LOG}
77+
BASE_DIR=${RES_DIR:-$LOG}
2578

26-
echo "Backend is $BACKEND"
79+
echo "Running $GROUP with config $CONFIG"
80+
echo "Backend is ${BACKEND:-unspecified/default}"
81+
echo "Res dir is $BASE_DIR"
82+
echo "Test ebin $TEST_EBIN"
2783

2884
# copy test beams
2985
echo "Copying beams"
30-
mkdir -p $BASE_DIR/group_tests/$1
31-
while read t; do cp $TEST_EBIN/$t.beam $BASE_DIR/group_tests/$1;done <groups/$1
86+
mkdir -p $BASE_DIR/group_tests/$GROUP
87+
while read t; do cp $TEST_EBIN/$t.beam $BASE_DIR/group_tests/$GROUP;done <groups/$GROUP
3288

3389
# run tests independently
34-
mkdir -p $BASE_DIR/results/$1
90+
mkdir -p $BASE_DIR/results/$GROUP
91+
3592
echo "Running tests"
3693

37-
for t in $BASE_DIR/group_tests/$1/*; do ./riak_test --batch -c $CONFIG -b $BACKEND -t $t; done | tee $BASE_DIR/results/$1/log
94+
if [ -z "$BACKEND"]; then
95+
BECMD=
96+
else
97+
BECMD="-b $BACKEND"
98+
fi
99+
100+
echo "backend cmd $BECMD"
101+
102+
for t in $BASE_DIR/group_tests/$GROUP/*; do ./riak_test --batch -c $CONFIG $BECMD -t $t; done | tee $BASE_DIR/results/$GROUP/log
38103

39104
# output results
40105
echo "making summary"
41-
while read t; do grep $t-$BACKEND $BASE_DIR/results/$1/log ;done <groups/$1 | tee $BASE_DIR/results/$1/summary
106+
while read t; do grep $t- $BASE_DIR/results/$GROUP/log ;done <groups/$GROUP | tee $BASE_DIR/results/$GROUP/summary

groups/2i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ verify_2i_mixed_cluster
55
verify_2i_returnterms
66
verify_2i_stream
77
verify_2i_timeout
8-
verify_2i_eqc
8+
verify_2i_eqc

groups/2i_all

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
secondary_index_tests
2+
verify_2i_aae
3+
verify_2i_limit
4+
verify_2i_returnterms
5+
verify_2i_stream
6+
verify_2i_timeout

groups/admin_all

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
basic_command_line
2+
riak_admin_console_tests
3+
riaknostic_rt

groups/bitcask_only

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
verify_bitcask_tombstone2_upgrade
2+
verify_no_writes_on_read
3+
kv679_dataloss_fb2

groups/cluster_upgrade

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
loaded_upgrade
2+
node_confirms_upgrade
3+
open_source_replication
4+
repl_bucket_types
5+
replication_upgrade
6+
replication2_upgrade
7+
rolling_capabilities
8+
rt_cascading_new_to_old
9+
rt_cascading_mixed_clusters
10+
verify_basic_upgrade
11+
verify_capabilities
12+
verify_counter_capability
13+
verify_crdt_capability
14+
verify_dt_upgrade
15+
verify_handoff_mixed
16+
verify_head_capability
17+
verify_kv1356
18+
verify_membackend
19+
verify_riak_object_reformat
20+
verify_vclock_encoding_upgrade

groups/core_all

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
bucket_props_roundtrip
2+
bucket_props_validation
3+
bucket_types
4+
cluster_meta_basic
5+
cluster_meta_rmr
6+
gh_riak_core_154
7+
gh_riak_core_155
8+
gh_riak_core_176
9+
http_bucket_types
10+
verify_build_cluster
11+
verify_build_cluster_caps_race
12+
verify_claimant
13+
verify_dynamic_ring
14+
verify_leave
15+
verify_listkeys_eqcfsm
16+
verify_reset_bucket_props
17+
verify_riak_lager
18+
verify_staged_clustering

groups/datatypes_all

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
verify_counter_converge
2+
verify_dt_context
3+
verify_dt_converge
4+
verify_no_datatype_siblings

groups/eleveldb_only

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
verify_2i_mixed_cluster
2+
cuttlefish_configuration

groups/eqc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
verify_2i_eqc

0 commit comments

Comments
 (0)