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