Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/databases/cassandra3/files/patch-pylib_cassandra-cqlsh-tests.sh
16460 views
1
--- pylib/cassandra-cqlsh-tests.sh.orig 2022-01-03 17:11:14 UTC
2
+++ pylib/cassandra-cqlsh-tests.sh
3
@@ -1,4 +1,4 @@
4
-#!/bin/bash -x
5
+#!/usr/local/bin/bash -x
6
#
7
# Licensed to the Apache Software Foundation (ASF) under one
8
# or more contributor license agreements. See the NOTICE file
9
@@ -15,7 +15,6 @@
10
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
# See the License for the specific language governing permissions and
12
# limitations under the License.
13
-#
14
15
################################
16
#
17
@@ -24,9 +23,13 @@
18
################################
19
20
WORKSPACE=$1
21
-PYTHON_VERSION=$2
22
-JAVA_HOME=$3
23
+JAVA_HOME=$2
24
+REPO_DIR=$3
25
+PYTHON_CMD=$4
26
+REPO_DIR=$5
27
28
+PYTHON_VERSION=python3
29
+
30
if [ "${WORKSPACE}" = "" ]; then
31
echo "Specify Cassandra source directory"
32
exit
33
@@ -65,7 +68,7 @@ fi
34
35
# Loop to prevent failure due to maven-ant-tasks not downloading a jar..
36
for x in $(seq 1 3); do
37
- ant -buildfile ${CASSANDRA_DIR}/build.xml realclean jar
38
+ ${ANT_CMD} -buildfile ${CASSANDRA_DIR}/build.xml realclean jar -Dmaven.repo.local=${REPO_DIR} -Dlocalm2=${REPO_DIR}
39
RETURN="$?"
40
if [ "${RETURN}" -eq "0" ]; then
41
break
42
@@ -79,7 +82,7 @@ fi
43
44
# Set up venv with dtest dependencies
45
set -e # enable immediate exit if venv setup fails
46
-virtualenv --python=$PYTHON_VERSION venv
47
+virtualenv --python=$PYTHON_CMD venv
48
source venv/bin/activate
49
pip install -r ${CASSANDRA_DIR}/pylib/requirements.txt
50
pip freeze
51
@@ -120,7 +123,7 @@ case "${pre_or_post_cdc}" in
52
;;
53
esac
54
55
-ccm start --wait-for-binary-proto
56
+ccm start --wait-for-binary-proto --root
57
58
cd ${CASSANDRA_DIR}/pylib/cqlshlib/
59
60
61