You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by aw...@apache.org on 2018/01/18 23:30:43 UTC

cassandra-builds git commit: For CASSANDRA-14134, make it possible to use a special python3/pytest dtest script.

Repository: cassandra-builds
Updated Branches:
  refs/heads/master 8086b9b23 -> 1ecc7bda5


For CASSANDRA-14134, make it possible to use a special python3/pytest dtest script.


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

Branch: refs/heads/master
Commit: 1ecc7bda5afc471350513d6a93a306705e7d5d64
Parents: 8086b9b
Author: Ariel Weisberg <aw...@apple.com>
Authored: Thu Jan 18 14:31:17 2018 -0500
Committer: Ariel Weisberg <aw...@apple.com>
Committed: Thu Jan 18 14:31:17 2018 -0500

----------------------------------------------------------------------
 build-scripts/cassandra-dtest-pytest.sh   | 77 ++++++++++++++++++++++++++
 jenkins-dsl/cassandra_job_dsl_seed.groovy |  3 +-
 2 files changed, 79 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/1ecc7bda/build-scripts/cassandra-dtest-pytest.sh
----------------------------------------------------------------------
diff --git a/build-scripts/cassandra-dtest-pytest.sh b/build-scripts/cassandra-dtest-pytest.sh
new file mode 100755
index 0000000..95f457f
--- /dev/null
+++ b/build-scripts/cassandra-dtest-pytest.sh
@@ -0,0 +1,77 @@
+#!/bin/bash -x
+
+################################
+#
+# Prep
+#
+################################
+
+# Pass in target to run, default to base dtest
+DTEST_TARGET="${1:-dtest}"
+
+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 CCM_CONFIG_DIR=${WORKSPACE}/.ccm
+export NUM_TOKENS="32"
+export CASSANDRA_DIR=${WORKSPACE}
+#Have Cassandra skip all fsyncs to improve test performance and reliability
+export CASSANDRA_SKIP_SYNC=true
+
+# Loop to prevent failure due to maven-ant-tasks not downloading a jar..
+for x in $(seq 1 3); do
+    ant clean jar
+    RETURN="$?"
+    if [ "${RETURN}" -eq "0" ]; then
+        break
+    fi
+done
+# Exit, if we didn't build successfully
+if [ "${RETURN}" -ne "0" ]; then
+    echo "Build failed with exit code: ${RETURN}"
+    exit ${RETURN}
+fi
+
+# Set up venv with dtest dependencies
+set -e # enable immediate exit if venv setup fails
+virtualenv --python=python3 --no-site-packages venv
+source venv/bin/activate
+pip3 install -r cassandra-dtest/requirements.txt
+pip3 freeze
+
+################################
+#
+# Main
+#
+################################
+
+cd cassandra-dtest/
+rm -r upgrade_tests/ # TEMP: remove upgrade_tests - we have no dual JDK installation
+set +e # disable immediate exit from this point
+if [ "${DTEST_TARGET}" = "dtest" ]; then
+    pytest --log-level="INFO" --use-vnodes --num-tokens=32 --junit-xml=nosetests.xml -s --cassandra-dir=/home/cassandra/cassandra --skip-resource-intensive-tests 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt
+elif [ "${DTEST_TARGET}" = "dtest-novnode" ]; then
+    pytest --log-level="INFO" --junit-xml=nosetests.xml -s --cassandra-dir=/home/cassandra/cassandra --skip-resource-intensive-tests 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt
+elif [ "${DTEST_TARGET}" = "dtest-offheap" ]; then
+    pytest --log-level="INFO" --use-vnodes --num-tokens=32 --use-off-heap-memtables --junit-xml=nosetests.xml -s --cassandra-dir=/home/cassandra/cassandra --skip-resource-intensive-tests 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt
+elif [ "${DTEST_TARGET}" = "dtest-large" ]; then
+    pytest --log-level="INFO" --use-vnodes --num-tokens=32 --junit-xml=nosetests.xml -s --cassandra-dir=/home/cassandra/cassandra --force-resource-intensive-tests 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt
+else
+    echo "Unknown dtest target: ${DTEST_TARGET}"
+    exit 1
+fi
+
+################################
+#
+# Clean
+#
+################################
+
+# /virtualenv
+deactivate
+
+# Exit cleanly for usable "Unstable" status
+exit 0

http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/1ecc7bda/jenkins-dsl/cassandra_job_dsl_seed.groovy
----------------------------------------------------------------------
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index fba6ccc..89e1f4d 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -446,6 +446,7 @@ job('Cassandra-devbranch-dtest') {
         stringParam('BRANCH', 'trunk', 'The branch of cassandra to checkout')
         stringParam('DTEST_REPO', "${dtestRepo}", 'The cassandra-dtest repo URL')
         stringParam('DTEST_BRANCH', 'master', 'The branch of cassandra-dtest to checkout')
+        stringParam('DTEST_SCRIPT', './cassandra-builds/build-scripts/cassandra-dtest.sh', 'A temporary means of specifying an alternate script to run the dtests.')
     }
     scm {
         git {
@@ -462,7 +463,7 @@ job('Cassandra-devbranch-dtest') {
         buildDescription('', buildDescStr)
         shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo}")
         shell('git clone -b ${DTEST_BRANCH} ${DTEST_REPO}')
-        shell('./cassandra-builds/build-scripts/cassandra-dtest.sh')
+        shell('${DTEST_SCRIPT}')
     }
     publishers {
         archiveArtifacts('test_stdout.txt')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org