You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2020/01/07 09:03:53 UTC

[cassandra-builds] branch master updated: Run Jenkins Cqlsh Tests using the in-tree cassandra-cqlsh-tests.sh

This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


The following commit(s) were added to refs/heads/master by this push:
     new da36c0c  Run Jenkins Cqlsh Tests using the in-tree cassandra-cqlsh-tests.sh
da36c0c is described below

commit da36c0cfb98cdf6b8d7e274780fb50454e919ac6
Author: mck <mc...@apache.org>
AuthorDate: Mon Jan 6 13:13:16 2020 +0100

    Run Jenkins Cqlsh Tests using the in-tree cassandra-cqlsh-tests.sh
    
     patch by Mick Semb Wever; reviewed by Dinesh Joshi for CASSANDRA-15471
---
 build-scripts/cassandra-cqlsh-tests.sh    | 105 ------------------------------
 jenkins-dsl/cassandra_job_dsl_seed.groovy |  30 +++++----
 2 files changed, 17 insertions(+), 118 deletions(-)

diff --git a/build-scripts/cassandra-cqlsh-tests.sh b/build-scripts/cassandra-cqlsh-tests.sh
deleted file mode 100755
index a1b2c12..0000000
--- a/build-scripts/cassandra-cqlsh-tests.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash -x
-
-################################
-#
-# Prep
-#
-################################
-
-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}
-
-# 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=python2 --no-site-packages venv
-source venv/bin/activate
-pip install -r cassandra-dtest/requirements.txt
-pip freeze
-
-if [ "$cython" = "yes" ]; then
-    pip install "Cython>=0.20,<0.25"
-    cd pylib/; python setup.py build_ext --inplace
-    cd ${WORKSPACE}
-fi
-
-################################
-#
-# Main
-#
-################################
-
-ccm remove test || true # in case an old ccm cluster is left behind
-ccm create test -n 1
-ccm updateconf "enable_user_defined_functions: true"
-
-version_from_build=$(ccm node1 versionfrombuild)
-export pre_or_post_cdc=$(python -c """from distutils.version import LooseVersion
-print \"postcdc\" if LooseVersion(\"${version_from_build}\") >= \"3.8\" else \"precdc\"
-""")
-case "${pre_or_post_cdc}" in
-    postcdc)
-        ccm updateconf "cdc_enabled: true"
-        ;;
-    precdc)
-        :
-        ;;
-    *)
-        echo "${pre_or_post_cdc}" is an invalid value.
-        exit 1
-        ;;
-esac
-
-ccm start --wait-for-binary-proto
-
-cd pylib/cqlshlib/
-cat << 'EOF' > setup.cfg
-[nosetests]
-verbosity=3
-detailed-errors=1
-with-xunit=1
-EOF
-
-set +e # disable immediate exit from this point
-nosetests
-
-ccm remove
-mv nosetests.xml ${WORKSPACE}/cqlshlib.xml
-
-# run dtest cqlsh suite
-cd ${WORKSPACE}/cassandra-dtest/
-nosetests --verbosity=3 --with-xunit --nocapture cqlsh_tests/
-
-mv nosetests.xml ${WORKSPACE}/
-
-################################
-#
-# Clean
-#
-################################
-
-# /virtualenv
-deactivate
-
-# Exit cleanly for usable "Unstable" status
-exit 0
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 5d88163..cf31ac1 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -265,7 +265,7 @@ matrixJob('Cassandra-template-cqlsh-tests') {
     }
     steps {
         buildDescription('', buildDescStr)
-        shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo} ; git clone ${dtestRepo}")
+        shell("git clean -xdff ; git clone ${dtestRepo}")
     }
     publishers {
         archiveJunit('cqlshlib.xml, nosetests.xml') {
@@ -274,7 +274,7 @@ matrixJob('Cassandra-template-cqlsh-tests') {
             }
         }
         postBuildTask {
-            task('.', 'echo "Finding job process orphans.."; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi')
+            task('.', 'echo "Finding job process orphans.."; if pgrep -af "${JOB_BASE_NAME}"; then pkill -9 -f "${JOB_BASE_NAME}"; fi')
         }
     }
 }
@@ -378,14 +378,18 @@ cassandraBranches.each {
     /**
      * Main branch cqlsh jobs
      */
-    matrixJob("${jobNamePrefix}-cqlsh-tests") {
-        disabled(false)
-        using('Cassandra-template-cqlsh-tests')
-        configure { node ->
-            node / scm / branches / 'hudson.plugins.git.BranchSpec' / name(branchName)
-        }
-        steps {
-            shell('./cassandra-builds/build-scripts/cassandra-cqlsh-tests.sh')
+    if (branchName == 'cassandra-2.2') {
+        println("Skipping ${jobNamePrefix}-cqlsh-tests, not supported on branch ${branchName}")
+    } else {
+        matrixJob("${jobNamePrefix}-cqlsh-tests") {
+            disabled(false)
+            using('Cassandra-template-cqlsh-tests')
+            configure { node ->
+                node / scm / branches / 'hudson.plugins.git.BranchSpec' / name(branchName)
+            }
+            steps {
+                shell('./pylib/cassandra-cqlsh-tests.sh $WORKSPACE')
+            }
         }
     }
 }
@@ -550,9 +554,9 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') {
     }
     steps {
         buildDescription('', buildDescStr)
-        shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo}")
+        shell("git clean -xdff")
         shell('git clone -b ${DTEST_BRANCH} ${DTEST_REPO}')
-        shell('./cassandra-builds/build-scripts/cassandra-cqlsh-tests.sh')
+        shell('./pylib/cassandra-cqlsh-tests.sh $WORKSPACE')
     }
     publishers {
         archiveJunit('cqlshlib.xml, nosetests.xml') {
@@ -561,7 +565,7 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') {
             }
         }
         postBuildTask {
-            task('.', 'echo "Finding job process orphans.."; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi')
+            task('.', 'echo "Finding job process orphans.."; if pgrep -af "${JOB_BASE_NAME}"; then pkill -9 -f "${JOB_BASE_NAME}"; fi')
         }
     }
 }


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