]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | #!/usr/bin/env bash |
2 | set -ex | |
7c673cae FG |
3 | |
4 | parallel=1 | |
5 | [ "$1" = "--serial" ] && parallel=0 | |
6 | ||
7 | color="" | |
8 | [ -t 1 ] && color="--gtest_color=yes" | |
9 | ||
10 | function cleanup() { | |
11 | pkill -P $$ || true | |
12 | } | |
13 | trap cleanup EXIT ERR HUP INT QUIT | |
14 | ||
15 | declare -A pids | |
16 | ||
17 | for 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 |
36 | do |
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 | |
47 | done | |
48 | ||
49 | ret=0 | |
50 | if [ $parallel -eq 1 ]; then | |
51 | for t in "${!pids[@]}" | |
52 | do | |
53 | pid=${pids[$t]} | |
54 | if ! wait $pid | |
55 | then | |
56 | echo "error in $t ($pid)" | |
57 | ret=1 | |
58 | fi | |
59 | done | |
60 | fi | |
61 | ||
62 | exit $ret |