]> git.proxmox.com Git - ceph.git/blob - ceph/qa/workunits/rados/test-upgrade-to-mimic.sh
update sources to v12.2.5
[ceph.git] / ceph / qa / workunits / rados / test-upgrade-to-mimic.sh
1 #!/bin/bash -ex
2
3 parallel=1
4 [ "$1" = "--serial" ] && parallel=0
5
6 color=""
7 [ -t 1 ] && color="--gtest_color=yes"
8
9 function cleanup() {
10 pkill -P $$ || true
11 }
12 trap cleanup EXIT ERR HUP INT QUIT
13
14 declare -A pids
15
16 for f in \
17 api_aio api_io api_list api_lock api_misc \
18 api_tier api_pool api_snapshots api_stat api_watch_notify api_cmd \
19 api_service \
20 api_c_write_operations \
21 'api_c_read_operations --gtest_filter=-CReadOpsTest.Exec' \
22 list_parallel \
23 open_pools_parallel \
24 delete_pools_parallel \
25 watch_notify
26 do
27 if [ $parallel -eq 1 ]; then
28 r=`printf '%25s' $f`
29 ff=`echo $f | awk '{print $1}'`
30 bash -o pipefail -exc "ceph_test_rados_$f $color 2>&1 | tee ceph_test_rados_$ff.log | sed \"s/^/$r: /\"" &
31 pid=$!
32 echo "test $f on pid $pid"
33 pids[$f]=$pid
34 else
35 ceph_test_rados_$f
36 fi
37 done
38
39 ret=0
40 if [ $parallel -eq 1 ]; then
41 for t in "${!pids[@]}"
42 do
43 pid=${pids[$t]}
44 if ! wait $pid
45 then
46 echo "error in $t ($pid)"
47 ret=1
48 fi
49 done
50 fi
51
52 exit $ret