forked from apache/cassandra-python-driver
-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathrun_integration_test.sh
More file actions
executable file
·48 lines (40 loc) · 1.42 KB
/
run_integration_test.sh
File metadata and controls
executable file
·48 lines (40 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/bash -e
sudo apt-get install gcc python3-dev libev4 libev-dev
aio_max_nr_recommended_value=1048576
aio_max_nr=$(cat /proc/sys/fs/aio-max-nr)
echo "The current aio-max-nr value is $aio_max_nr"
if (( aio_max_nr != aio_max_nr_recommended_value )); then
sudo sh -c "echo 'fs.aio-max-nr = $aio_max_nr_recommended_value' >> /etc/sysctl.conf"
sudo sysctl -p /etc/sysctl.conf
echo "The aio-max-nr was changed from $aio_max_nr to $(cat /proc/sys/fs/aio-max-nr)"
if (( $(cat /proc/sys/fs/aio-max-nr) != aio_max_nr_recommended_value )); then
echo "The aio-max-nr value was not changed to $aio_max_nr_recommended_value"
exit 1
fi
fi
python3 -m venv .test-venv
source .test-venv/bin/activate
pip install -U pip wheel setuptools
# install driver wheel
pip install --ignore-installed -r test-requirements.txt pytest
pip install -e .
# download awscli
pip install awscli
# install scylla-ccm
pip install https://github.com/scylladb/scylla-ccm/archive/master.zip
# download version
if [[ -n "${SCYLLA_VERSION}" ]]; then
ccm create scylla-driver-temp -n 1 --scylla --version ${SCYLLA_VERSION}
ccm remove
export MAPPED_SCYLLA_VERSION=3.11.4
unset CASSANDRA_VERSION
fi
if [[ -n "${CASSANDRA_VERSION}" ]]; then
ccm create cassandra-driver-temp -n 1 --version ${CASSANDRA_VERSION}
ccm remove
export MAPPED_CASSANDRA_VERSION=$CASSANDRA_VERSION
unset SCYLLA_VERSION
fi
env
# run test
PROTOCOL_VERSION=4 pytest -rf $*