]> git.proxmox.com Git - ceph.git/blob - ceph/qa/workunits/erasure-code/encode-decode-non-regression.sh
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / qa / workunits / erasure-code / encode-decode-non-regression.sh
1 #!/bin/bash -ex
2 #
3 # Copyright (C) 2014 Red Hat <contact@redhat.com>
4 #
5 # Author: Loic Dachary <loic@dachary.org>
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU Library Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Library Public License for more details.
16 #
17 source $(dirname $0)/../../../src/test/detect-build-env-vars.sh
18
19 : ${CORPUS:=https://github.com/ceph/ceph-erasure-code-corpus.git}
20 : ${DIRECTORY:=$CEPH_ROOT/ceph-erasure-code-corpus}
21
22 # when running from sources, the current directory must have precedence
23 export PATH=:$PATH
24
25 if ! test -d $DIRECTORY ; then
26 git clone $CORPUS $DIRECTORY
27 fi
28
29 my_version=v$(ceph --version | cut -f3 -d ' ')
30
31 all_versions=$((ls -d $DIRECTORY/v* ; echo $DIRECTORY/$my_version ) | sort)
32
33 for version in $all_versions ; do
34 if test -d $version ; then
35 $version/non-regression.sh
36 fi
37 if test $version = $DIRECTORY/$my_version ; then
38 break
39 fi
40 done