Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/databases/cassandra3/files/patch-pylib_cassandra-cqlsh-tests.sh
16124 views
1
--- pylib/cassandra-cqlsh-tests.sh.orig 2020-10-20 17:07:48 UTC
2
+++ pylib/cassandra-cqlsh-tests.sh
3
@@ -1,4 +1,4 @@
4
-#!/bin/bash -x
5
+#!/usr/local/bin/bash -x
6
7
################################
8
#
9
@@ -9,6 +9,8 @@
10
WORKSPACE=$1
11
PYTHON_VERSION=$2
12
JAVA_HOME=$3
13
+REPO_DIR=$4
14
+PYTHON_CMD=$5
15
16
if [ "${WORKSPACE}" = "" ]; then
17
echo "Specify Cassandra source directory"
18
@@ -48,7 +50,7 @@ fi
19
20
# Loop to prevent failure due to maven-ant-tasks not downloading a jar..
21
for x in $(seq 1 3); do
22
- ant -buildfile ${CASSANDRA_DIR}/build.xml realclean jar
23
+ ant -buildfile ${CASSANDRA_DIR}/build.xml -Dmaven.repo.local=${REPO_DIR} -Dlocalm2=${REPO_DIR} -Dpycmd=${PYTHON_CMD} realclean jar
24
RETURN="$?"
25
if [ "${RETURN}" -eq "0" ]; then
26
break
27
@@ -62,7 +64,7 @@ fi
28
29
# Set up venv with dtest dependencies
30
set -e # enable immediate exit if venv setup fails
31
-virtualenv --python=$PYTHON_VERSION venv
32
+virtualenv --python=${PYTHON_CMD} venv
33
source venv/bin/activate
34
pip install -r ${CASSANDRA_DIR}/pylib/requirements.txt
35
pip freeze
36
@@ -103,7 +105,7 @@ case "${pre_or_post_cdc}" in
37
;;
38
esac
39
40
-ccm start --wait-for-binary-proto
41
+ccm start --wait-for-binary-proto --root
42
43
cd ${CASSANDRA_DIR}/pylib/cqlshlib/
44
45
46