cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mshu...@apache.org
Subject cassandra-builds git commit: Reorder virtualenv steps
Date Mon, 06 Mar 2017 18:00:28 GMT
Repository: cassandra-builds
Updated Branches:
  refs/heads/master 08f76054c -> 9e62fe8a6


Reorder virtualenv steps


Project: http://git-wip-us.apache.org/repos/asf/cassandra-builds/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra-builds/commit/9e62fe8a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra-builds/tree/9e62fe8a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra-builds/diff/9e62fe8a

Branch: refs/heads/master
Commit: 9e62fe8a6af3578cee5b6337bd259ce5eaa5631d
Parents: 08f7605
Author: Michael Shuler <michael@pbandjelly.org>
Authored: Mon Mar 6 12:00:21 2017 -0600
Committer: Michael Shuler <michael@pbandjelly.org>
Committed: Mon Mar 6 12:00:21 2017 -0600

----------------------------------------------------------------------
 build-scripts/cassandra-cqlsh-tests.sh | 52 ++++++++++++++++-------------
 1 file changed, 28 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/9e62fe8a/build-scripts/cassandra-cqlsh-tests.sh
----------------------------------------------------------------------
diff --git a/build-scripts/cassandra-cqlsh-tests.sh b/build-scripts/cassandra-cqlsh-tests.sh
index 8cd867d..f7218eb 100755
--- a/build-scripts/cassandra-cqlsh-tests.sh
+++ b/build-scripts/cassandra-cqlsh-tests.sh
@@ -8,6 +8,8 @@
 
 export PYTHONIOENCODING="utf-8"
 export PYTHONUNBUFFERED=true
+export CASS_DRIVER_NO_EXTENSIONS=true
+export CASS_DRIVER_NO_CYTHON=true
 export CCM_MAX_HEAP_SIZE="2048M"
 export CCM_HEAP_NEWSIZE="200M"
 export NUM_TOKENS="32"
@@ -27,21 +29,25 @@ if [ "${RETURN}" -ne "0" ]; then
     exit ${RETURN}
 fi
 
-################################
-#
-# Main
-#
-################################
+# Set up venv with dtest dependencies
+set -e # enable immediate exit if venv setup fails
+virtualenv --python=python2 --no-site-packages venv
+source venv/bin/activate
+pip install -r cassandra-dtest/requirements.txt
+pip freeze
 
 if [ "$cython" = "yes" ]; then
-    virtualenv --python=python2 --no-site-packages venv
-    source venv/bin/activate
     pip install "Cython>=0.20,<0.25"
-    pip freeze
     cd pylib/; python setup.py build_ext --inplace
     cd ${WORKSPACE}
 fi
 
+################################
+#
+# Main
+#
+################################
+
 ccm create test -n 1
 ccm updateconf "enable_user_defined_functions: true"
 
@@ -72,28 +78,26 @@ detailed-errors=1
 with-xunit=1
 EOF
 
+set +e # disable immediate exit from this point
 nosetests
 
 ccm remove
 mv nosetests.xml ${WORKSPACE}/cqlshlib.xml
-if [ "$cython" = "yes" ]; then
-    deactivate  # venv
-fi
-cd ${WORKSPACE}
-
 
 # run dtest cqlsh suite
-cd cassandra-dtest/
-if [ "$cython" = "no" ]; then
-    export CASS_DRIVER_NO_EXTENSIONS=true
-    export CASS_DRIVER_NO_CYTHON=true
-fi
-virtualenv --python=python2 --no-site-packages venv
-source venv/bin/activate
-pip install -r requirements.txt
-pip freeze
-
+cd ${WORKSPACE}/cassandra-dtest/
 nosetests --verbosity=3 --with-xunit --nocapture cqlsh_tests/
 
 mv nosetests.xml ${WORKSPACE}/
-deactivate  # venv
+
+################################
+#
+# Clean
+#
+################################
+
+# /virtualenv
+deactivate
+
+# Exit cleanly for usable "Unstable" status
+exit 0


Mime
View raw message