From: Sage Weil Date: Sat, 22 Feb 2020 13:54:11 +0000 (-0600) Subject: qa/workunits/cephadm/test_adoption: run as root X-Git-Tag: v15.1.1~293^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d1893df0e1fbfdb83fefb69f5a5b0dddd033cddd;p=ceph-ci.git qa/workunits/cephadm/test_adoption: run as root Signed-off-by: Sage Weil --- diff --git a/qa/workunits/cephadm/test_adoption.sh b/qa/workunits/cephadm/test_adoption.sh index 4de6d3eb1b4..7960ede0005 100755 --- a/qa/workunits/cephadm/test_adoption.sh +++ b/qa/workunits/cephadm/test_adoption.sh @@ -4,14 +4,7 @@ SCRIPT_NAME=$(basename ${BASH_SOURCE[0]}) SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" CEPHADM_SRC_DIR=${SCRIPT_DIR}/../../../src/cephadm -CORPUS_GIT_SUBMOD="cephadm-adoption-corpus" -TMPDIR=$(mktemp -d) -git clone https://github.com/ceph/$CORPUS_GIT_SUBMOD $TMPDIR -CORPUS_DIR=${TMPDIR}/archive -trap "$SUDO rm -rf $TMPDIR" EXIT - [ -z "$SUDO" ] && SUDO=sudo - if [ -z "$CEPHADM" ]; then CEPHADM=${CEPHADM_SRC_DIR}/cephadm fi @@ -53,7 +46,17 @@ if [ -z "$PYTHON_KLUDGE" ]; then exit 0 fi +# combine into a single var +CEPHADM_BIN="$CEPHADM" +CEPHADM="$SUDO $CEPHADM_BIN" + ## adopt +CORPUS_GIT_SUBMOD="cephadm-adoption-corpus" +TMPDIR=$(mktemp -d) +git clone https://github.com/ceph/$CORPUS_GIT_SUBMOD $TMPDIR +CORPUS_DIR=${TMPDIR}/archive +trap "$SUDO rm -rf $TMPDIR" EXIT + for subdir in `ls ${CORPUS_DIR}`; do for tarfile in `ls ${CORPUS_DIR}/${subdir} | grep .tgz`; do tarball=${CORPUS_DIR}/${subdir}/${tarfile}