From: Kefu Chai Date: Sun, 17 Nov 2019 15:44:51 +0000 (+0800) Subject: qa/workunits/rados/test_librados_build.sh: use branch name printed by librados-config X-Git-Tag: v15.1.0~776^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad194519d4956c32128fbc99406a17dbd645182b;p=ceph.git qa/workunits/rados/test_librados_build.sh: use branch name printed by librados-config Fixes: https://tracker.ceph.com/issues/42782 Signed-off-by: Kefu Chai --- diff --git a/qa/workunits/rados/test_librados_build.sh b/qa/workunits/rados/test_librados_build.sh index 41500151cb5..fbd7b0784a6 100755 --- a/qa/workunits/rados/test_librados_build.sh +++ b/qa/workunits/rados/test_librados_build.sh @@ -22,7 +22,17 @@ hello_world_cpp " BINARIES="${BINARIES_TO_RUN}hello_radosstriper_cpp " -DL_PREFIX="http://git.ceph.com/?p=ceph.git;a=blob_plain;hb=master;f=examples/librados/" +# parse output like "octopus (dev)" +case $(librados-config --release | grep -Po ' \(\K[^\)]+') in + dev) + BRANCH=master;; + rc|stable) + BRANCH=$(librados-config --release | cut -d' ' -f1);; + *) + echo "unknown release '$(librados-config --release)'" >&2 + return 1;; +esac +DL_PREFIX="http://git.ceph.com/?p=ceph.git;a=blob_plain;hb=${BRANCH};f=examples/librados/" #DL_PREFIX="https://raw.githubusercontent.com/ceph/ceph/master/examples/librados/" DESTDIR=$(pwd)