]> git.proxmox.com Git - ceph.git/blob - ceph/qa/standalone/mon/mon-scrub.sh
update sources to v12.1.2
[ceph.git] / ceph / qa / standalone / mon / mon-scrub.sh
1 #!/bin/bash
2 #
3 # Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
4 # Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
5 #
6 # Author: Loic Dachary <loic@dachary.org>
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU Library Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Library Public License for more details.
17 #
18 source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
19
20 function run() {
21 local dir=$1
22 shift
23
24 export CEPH_MON="127.0.0.1:7120" # git grep '\<7120\>' : there must be only one
25 export CEPH_ARGS
26 CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
27 CEPH_ARGS+="--mon-host=$CEPH_MON "
28
29 local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
30 for func in $funcs ; do
31 setup $dir || return 1
32 $func $dir || return 1
33 teardown $dir || return 1
34 done
35 }
36
37 function TEST_mon_scrub() {
38 local dir=$1
39
40 run_mon $dir a || return 1
41
42 ceph mon scrub || return 1
43 }
44
45 main mon-scrub "$@"
46
47 # Local Variables:
48 # compile-command: "cd ../.. ; make -j4 && test/mon/mon-scrub.sh"
49 # End: