]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: run-s3tests: use python2 for s3tests & set PATH correctly
authorAbhishek Lekshmanan <abhishek@suse.com>
Fri, 19 May 2017 15:25:20 +0000 (17:25 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Fri, 19 May 2017 15:39:50 +0000 (17:39 +0200)
in case we're in a vstart deployment, update PATH so that rgw-admin is
found, also set path correctly if we're in a vstart env.

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
qa/workunits/rgw/run-s3tests.sh

index a18a5f05178e1b400885bdd5016a5a40f7c09790..31c091ede358f0987a357f0e08b46211e0b992cc 100755 (executable)
@@ -11,6 +11,14 @@ port=$2
 
 ##
 
+if [ -e CMakeCache.txt ]; then
+    BIN_PATH=$PWD/bin
+elif [ -e $root_path/../build/CMakeCache.txt ]; then
+    cd $root_path/../build
+    BIN_PATH=$PWD/bin
+fi
+PATH=$PATH:$BIN_PATH
+
 dir=tmp.s3-tests.$$
 
 # clone and bootstrap
@@ -19,7 +27,7 @@ cd $dir
 git clone https://github.com/ceph/s3-tests
 cd s3-tests
 git checkout ceph-$branch
-./bootstrap
+VIRTUALENV_PYTHON=/usr/bin/python2 ./bootstrap
 cd ../..
 
 # users
@@ -31,7 +39,7 @@ radosgw-admin user create --uid=s3test1 --display-name='tester1' \
 akey2=access2
 skey2=secret2
 radosgw-admin user create --uid=s3test2 --display-name='tester2' \
-             --access-key=$akey2 --secret=$skey2 --email=teester2@ceph.com
+        --access-key=$akey2 --secret=$skey2 --email=tester2@ceph.com
 
 cat <<EOF > s3.conf
 [DEFAULT]