]> git.proxmox.com Git - ceph.git/blob - ceph/qa/workunits/fs/snaps/snaptest-git-ceph.sh
e203fd8823fe2b43ea205a59712cdea853b3d37a
[ceph.git] / ceph / qa / workunits / fs / snaps / snaptest-git-ceph.sh
1 #!/bin/sh -x
2
3 set -e
4
5 # try it again if the clone is slow and the second time
6 retried=false
7 trap -- 'retry' EXIT
8 retry() {
9 rm -rf ceph
10 # double the timeout value
11 timeout 3600 git clone git://git.ceph.com/ceph.git
12 }
13 rm -rf ceph
14 timeout 1800 git clone git://git.ceph.com/ceph.git
15 trap - EXIT
16 cd ceph
17
18 versions=`seq 1 21`
19
20 for v in $versions
21 do
22 ver="v0.$v"
23 echo $ver
24 git reset --hard $ver
25 mkdir .snap/$ver
26 done
27
28 for v in $versions
29 do
30 ver="v0.$v"
31 echo checking $ver
32 cd .snap/$ver
33 git diff --exit-code
34 cd ../..
35 done
36
37 for v in $versions
38 do
39 ver="v0.$v"
40 rmdir .snap/$ver
41 done
42
43 echo OK