From cf294777ea92f0911813a7132068584d4f73a65a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 15 Dec 2016 15:10:28 -0500 Subject: [PATCH] qa/workunits: use relative path instead of wget from git Signed-off-by: Sage Weil --- qa/workunits/fs/test_python.sh | 6 +----- qa/workunits/rados/test_python.sh | 6 +----- qa/workunits/rbd/notify_master.sh | 6 ++---- qa/workunits/rbd/notify_slave.sh | 6 ++---- qa/workunits/rbd/rbd_mirror.sh | 7 +------ qa/workunits/rbd/rbd_mirror_stress.sh | 7 +------ qa/workunits/rbd/test_librbd_python.sh | 9 +++------ qa/workunits/rbd/test_lock_fence.sh | 6 ++---- 8 files changed, 13 insertions(+), 40 deletions(-) diff --git a/qa/workunits/fs/test_python.sh b/qa/workunits/fs/test_python.sh index ea0af66e81e56..7613dcf45dcb5 100755 --- a/qa/workunits/fs/test_python.sh +++ b/qa/workunits/fs/test_python.sh @@ -1,10 +1,6 @@ #!/bin/sh -ex -CEPH_REF=${CEPH_REF:-master} -wget -O test_cephfs.py "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=$CEPH_REF;f=src/test/pybind/test_cephfs.py" || \ - wget -O test_cephfs.py "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=ref/heads/$CEPH_REF;f=src/test/pybind/test_cephfs.py" - # Running as root because the filesystem root directory will be # owned by uid 0, and that's where we're writing. -sudo nosetests -v test_cephfs +sudo nosetests -v $(dirname $0)/../../../src/test/pybind/test_cephfs exit 0 diff --git a/qa/workunits/rados/test_python.sh b/qa/workunits/rados/test_python.sh index da36bb850349d..60832df026cbb 100755 --- a/qa/workunits/rados/test_python.sh +++ b/qa/workunits/rados/test_python.sh @@ -1,8 +1,4 @@ #!/bin/sh -ex -CEPH_REF=${CEPH_REF:-master} -#wget -q https://raw.github.com/ceph/ceph/$CEPH_REF/src/test/pybind/test_rados.py -wget -O test_rados.py "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=$CEPH_REF;f=src/test/pybind/test_rados.py" || \ - wget -O test_rados.py "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=ref/heads/$CEPH_REF;f=src/test/pybind/test_rados.py" -${PYTHON:-python} -m nose -v test_rados +${PYTHON:-python} -m nose -v $(dirname $0)/../../../src/test/pybind/test_rados exit 0 diff --git a/qa/workunits/rbd/notify_master.sh b/qa/workunits/rbd/notify_master.sh index 3d1b2243c56c0..6ebea31ec8055 100755 --- a/qa/workunits/rbd/notify_master.sh +++ b/qa/workunits/rbd/notify_master.sh @@ -1,7 +1,5 @@ #!/bin/sh -ex -CEPH_REF=${CEPH_REF:-master} -wget -O test_notify.py "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=$CEPH_REF;f=src/test/librbd/test_notify.py" - -python test_notify.py master +relpath=$(dirname $0)/../../../src/test/librbd +python $relpath/test_notify.py master exit 0 diff --git a/qa/workunits/rbd/notify_slave.sh b/qa/workunits/rbd/notify_slave.sh index e94894ac5b87a..ea66161aefa24 100755 --- a/qa/workunits/rbd/notify_slave.sh +++ b/qa/workunits/rbd/notify_slave.sh @@ -1,7 +1,5 @@ #!/bin/sh -ex -CEPH_REF=${CEPH_REF:-master} -wget -O test_notify.py "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=$CEPH_REF;f=src/test/librbd/test_notify.py" - -python test_notify.py slave +relpath=$(dirname $0)/../../../src/test/librbd +python $relpath/test_notify.py slave exit 0 diff --git a/qa/workunits/rbd/rbd_mirror.sh b/qa/workunits/rbd/rbd_mirror.sh index 2a26a5e6a1ee3..3ccd678d54350 100755 --- a/qa/workunits/rbd/rbd_mirror.sh +++ b/qa/workunits/rbd/rbd_mirror.sh @@ -7,12 +7,7 @@ # socket, temporary files, and launches rbd-mirror daemon. # -if [ -n "${CEPH_REF}" ]; then - wget -O rbd_mirror_helpers.sh "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=$CEPH_REF;f=qa/workunits/rbd/rbd_mirror_helpers.sh" - . ./rbd_mirror_helpers.sh -else - . $(dirname $0)/rbd_mirror_helpers.sh -fi +. $(dirname $0)/rbd_mirror_helpers.sh testlog "TEST: add image and test replay" start_mirror ${CLUSTER1} diff --git a/qa/workunits/rbd/rbd_mirror_stress.sh b/qa/workunits/rbd/rbd_mirror_stress.sh index 19d24b66c8d7f..b07bf0ed118bf 100755 --- a/qa/workunits/rbd/rbd_mirror_stress.sh +++ b/qa/workunits/rbd/rbd_mirror_stress.sh @@ -11,12 +11,7 @@ IMAGE_COUNT=50 export LOCKDEP=0 -if [ -n "${CEPH_REF}" ]; then - wget -O rbd_mirror_helpers.sh "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=$CEPH_REF;f=qa/workunits/rbd/rbd_mirror_helpers.sh" - . ./rbd_mirror_helpers.sh -else - . $(dirname $0)/rbd_mirror_helpers.sh -fi +. $(dirname $0)/rbd_mirror_helpers.sh create_snap() { diff --git a/qa/workunits/rbd/test_librbd_python.sh b/qa/workunits/rbd/test_librbd_python.sh index 8f02f862ab828..0e607eec43869 100755 --- a/qa/workunits/rbd/test_librbd_python.sh +++ b/qa/workunits/rbd/test_librbd_python.sh @@ -1,14 +1,11 @@ #!/bin/sh -ex -CEPH_REF=${CEPH_REF:-master} -#wget -q https://raw.github.com/ceph/ceph/$CEPH_REF/src/test/pybind/test_rbd.py -wget -O test_rbd.py "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=$CEPH_REF;f=src/test/pybind/test_rbd.py" || \ - wget -O test_rbd.py "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=ref/heads/$CEPH_REF;f=src/test/pybind/test_rbd.py" +relpath=$(dirname $0)/../../../src/test/pybind if [ -n "${VALGRIND}" ]; then valgrind --tool=${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \ - nosetests -v test_rbd + nosetests -v $relpath/test_rbd else - nosetests -v test_rbd + nosetests -v $relpath/test_rbd fi exit 0 diff --git a/qa/workunits/rbd/test_lock_fence.sh b/qa/workunits/rbd/test_lock_fence.sh index 7f664780573a3..a688ea62d614b 100755 --- a/qa/workunits/rbd/test_lock_fence.sh +++ b/qa/workunits/rbd/test_lock_fence.sh @@ -3,10 +3,8 @@ IMAGE=rbdrw-image LOCKID=rbdrw -RBDRW=rbdrw.py -CEPH_REF=${CEPH_REF:-master} - -wget -O $RBDRW "https://git.ceph.com/?p=ceph.git;a=blob_plain;hb=$CEPH_REF;f=src/test/librbd/rbdrw.py" +RELPATH=$(dirname $0)/../../../src/test/pybind +RBDRW=$RELPATH/rbdrw.py rbd create $IMAGE --size 10 --image-format 2 --image-shared || exit 1 -- 2.39.5