]> git.proxmox.com Git - ceph.git/blame - ceph/qa/workunits/rados/test.sh
import quincy beta 17.1.0
[ceph.git] / ceph / qa / workunits / rados / test.sh
CommitLineData
11fdf7f2
TL
1#!/usr/bin/env bash
2set -ex
7c673cae
FG
3
4parallel=1
5[ "$1" = "--serial" ] && parallel=0
6
7color=""
8[ -t 1 ] && color="--gtest_color=yes"
9
10function cleanup() {
11 pkill -P $$ || true
12}
13trap cleanup EXIT ERR HUP INT QUIT
14
15declare -A pids
16
17for f in \
11fdf7f2
TL
18 api_aio api_aio_pp \
19 api_io api_io_pp \
20 api_asio api_list \
21 api_lock api_lock_pp \
22 api_misc api_misc_pp \
23 api_tier_pp \
24 api_pool \
25 api_snapshots api_snapshots_pp \
26 api_stat api_stat_pp \
27 api_watch_notify api_watch_notify_pp \
28 api_cmd api_cmd_pp \
29 api_service api_service_pp \
7c673cae
FG
30 api_c_write_operations \
31 api_c_read_operations \
20effc67 32 api_cls_remote_reads \
7c673cae
FG
33 list_parallel \
34 open_pools_parallel \
9f95a23c 35 delete_pools_parallel
7c673cae
FG
36do
37 if [ $parallel -eq 1 ]; then
38 r=`printf '%25s' $f`
11fdf7f2
TL
39 ff=`echo $f | awk '{print $1}'`
40 bash -o pipefail -exc "ceph_test_rados_$f $color 2>&1 | tee ceph_test_rados_$ff.log | sed \"s/^/$r: /\"" &
7c673cae
FG
41 pid=$!
42 echo "test $f on pid $pid"
43 pids[$f]=$pid
44 else
45 ceph_test_rados_$f
46 fi
47done
48
49ret=0
50if [ $parallel -eq 1 ]; then
51for t in "${!pids[@]}"
52do
53 pid=${pids[$t]}
54 if ! wait $pid
55 then
56 echo "error in $t ($pid)"
57 ret=1
58 fi
59done
60fi
61
62exit $ret