forked from googleapis/python-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_zonal_tests.sh
More file actions
28 lines (22 loc) · 1.05 KB
/
Copy pathrun_zonal_tests.sh
File metadata and controls
28 lines (22 loc) · 1.05 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
set -euxo pipefail
echo '--- Installing git and cloning repository on VM ---'
sudo apt-get update && sudo apt-get install -y git python3-pip python3-venv
# Clone the repository and checkout the specific commit from the build trigger.
git clone https://github.com/googleapis/python-storage.git
cd python-storage
git fetch origin "refs/pull/${_PR_NUMBER}/head"
git checkout ${COMMIT_SHA}
echo '--- Installing Python and dependencies on VM ---'
python3 -m venv env
source env/bin/activate
echo 'Install testing libraries explicitly, as they are not in setup.py'
pip install --upgrade pip
pip install pytest pytest-timeout pytest-subtests pytest-asyncio
pip install google-cloud-testutils google-cloud-kms
pip install -e .
echo '--- Setting up environment variables on VM ---'
export ZONAL_BUCKET=${_ZONAL_BUCKET}
export RUN_ZONAL_SYSTEM_TESTS=True
CURRENT_ULIMIT=$(ulimit -n)
echo '--- Running Zonal tests on VM with ulimit set to ---' $CURRENT_ULIMIT
pytest -vv -s --log-format='%(asctime)s %(levelname)s %(message)s' --log-date-format='%H:%M:%S' tests/system/test_zonal.py