Path: blob/main/databases/cassandra3/files/patch-pylib_cassandra-cqlsh-tests.sh
16460 views
--- pylib/cassandra-cqlsh-tests.sh.orig 2022-01-03 17:11:14 UTC1+++ pylib/cassandra-cqlsh-tests.sh2@@ -1,4 +1,4 @@3-#!/bin/bash -x4+#!/usr/local/bin/bash -x5#6# Licensed to the Apache Software Foundation (ASF) under one7# or more contributor license agreements. See the NOTICE file8@@ -15,7 +15,6 @@9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.10# See the License for the specific language governing permissions and11# limitations under the License.12-#1314################################15#16@@ -24,9 +23,13 @@17################################1819WORKSPACE=$120-PYTHON_VERSION=$221-JAVA_HOME=$322+JAVA_HOME=$223+REPO_DIR=$324+PYTHON_CMD=$425+REPO_DIR=$52627+PYTHON_VERSION=python328+29if [ "${WORKSPACE}" = "" ]; then30echo "Specify Cassandra source directory"31exit32@@ -65,7 +68,7 @@ fi3334# Loop to prevent failure due to maven-ant-tasks not downloading a jar..35for x in $(seq 1 3); do36- ant -buildfile ${CASSANDRA_DIR}/build.xml realclean jar37+ ${ANT_CMD} -buildfile ${CASSANDRA_DIR}/build.xml realclean jar -Dmaven.repo.local=${REPO_DIR} -Dlocalm2=${REPO_DIR}38RETURN="$?"39if [ "${RETURN}" -eq "0" ]; then40break41@@ -79,7 +82,7 @@ fi4243# Set up venv with dtest dependencies44set -e # enable immediate exit if venv setup fails45-virtualenv --python=$PYTHON_VERSION venv46+virtualenv --python=$PYTHON_CMD venv47source venv/bin/activate48pip install -r ${CASSANDRA_DIR}/pylib/requirements.txt49pip freeze50@@ -120,7 +123,7 @@ case "${pre_or_post_cdc}" in51;;52esac5354-ccm start --wait-for-binary-proto55+ccm start --wait-for-binary-proto --root5657cd ${CASSANDRA_DIR}/pylib/cqlshlib/58596061