From ad194519d4956c32128fbc99406a17dbd645182b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 17 Nov 2019 23:44:51 +0800 Subject: [PATCH] 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 --- qa/workunits/rados/test_librados_build.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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)