summaryrefslogtreecommitdiffstats
path: root/qa/workunits/fs/snaps/snaptest-git-ceph.sh
blob: 50b854a5583d8839b1e007a0ef066f6ce137da60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh -x

set -e

ceph fs set cephfs allow_new_snaps true --yes-i-really-mean-it

git clone git://git.ceph.com/ceph.git
cd ceph

versions=`seq 1 21`

for v in $versions
do
    ver="v0.$v"
    echo $ver
    git reset --hard $ver
    mkdir .snap/$ver
done

for v in $versions
do
    ver="v0.$v"
    echo checking $ver
    cd .snap/$ver
    git diff --exit-code
    cd ../..
done

for v in $versions
do
    ver="v0.$v"
    rmdir .snap/$ver
done

echo OK