]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/mon/mon-scrub.sh
bump version to 12.1.1-pve1 while rebasing patches
[ceph.git] / ceph / src / test / 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 $(dirname $0)/../detect-build-env-vars.sh
19 source $CEPH_ROOT/qa/workunits/ceph-helpers.sh
20
21 function run() {
22 local dir=$1
23 shift
24
25 export CEPH_MON="127.0.0.1:7120" # git grep '\<7120\>' : there must be only one
26 export CEPH_ARGS
27 CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
28 CEPH_ARGS+="--mon-host=$CEPH_MON "
29
30 local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
31 for func in $funcs ; do
32 setup $dir || return 1
33 $func $dir || return 1
34 teardown $dir || return 1
35 done
36 }
37
38 function TEST_mon_scrub() {
39 local dir=$1
40
41 run_mon $dir a || return 1
42
43 ceph mon scrub || return 1
44 }
45
46 main mon-scrub "$@"
47
48 # Local Variables:
49 # compile-command: "cd ../.. ; make -j4 && test/mon/mon-scrub.sh"
50 # End: