Skip to content

Commit f568ba8

Browse files
committed
test-manylinux: allow wheelhouse dir to be specified
1 parent e50f896 commit f568ba8

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

tools/test-manylinux.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ set -ex
1111

1212
echo "$0 running from $(pwd)"
1313

14+
if [[ ! -z $1 ]]; then
15+
WHEELHOUSE=$1
16+
else
17+
WHEELHOUSE="wheelhouse"
18+
fi
19+
20+
21+
1422
function setup_centos {
1523
# CentOS container setup
1624
yum install -q -y python epel-release
@@ -26,6 +34,12 @@ function setup_ubuntu {
2634

2735
function run_single_in_docker {
2836
# Run single test inside docker container
37+
local wheelhouse=/io/$1
38+
39+
if [[ ! -d $wheelhouse ]]; then
40+
echo "On docker instance: wheelhouse $wheelhouse does not exist"
41+
exit 1
42+
fi
2943

3044
# Detect OS
3145
if grep -qi centos /etc/system-release /etc/redhat-release ; then
@@ -41,7 +55,7 @@ function run_single_in_docker {
4155
hash -r # let go of previous 'pip'
4256

4357
# Install modules
44-
pip install confluent_kafka --no-index -f /io/wheelhouse
58+
pip install confluent_kafka --no-index -f $wheelhouse
4559
pip install pytest
4660

4761
# Verify that OpenSSL and zlib are properly linked
@@ -64,25 +78,26 @@ p = confluent_kafka.Producer({"ssl.cipher.suites":"DEFAULT",
6478
function run_all_with_docker {
6579
# Run tests in all listed docker containers.
6680
# This is executed on the host.
81+
local wheelhouse=$1
6782

6883
[[ ! -z $DOCKER_IMAGES ]] || \
6984
# LTS and stable release of popular Linux distros.
7085
# We require >= Python 2.7 to be avaialble (which rules out Centos 6.6)
7186
DOCKER_IMAGES="ubuntu:14.04 ubuntu:16.04 ubuntu:17.10 debian:stable centos:7"
7287

7388

74-
_wheels="wheelhouse/*manylinux*.whl"
89+
_wheels="$wheelhouse/*manylinux*.whl"
7590
if [[ -z $_wheels ]]; then
76-
echo "No wheels in wheelhouse/, must run build-manylinux.sh first"
91+
echo "No wheels in $wheelhouse, must run build-manylinux.sh first"
7792
exit 1
7893
else
7994
echo "Wheels:"
80-
ls wheelhouse/*.whl
95+
ls $wheelhouse/*.whl
8196
fi
8297

8398
for DOCKER_IMAGE in $DOCKER_IMAGES; do
8499
echo "# Testing on $DOCKER_IMAGE"
85-
docker run -v $(pwd):/io $DOCKER_IMAGE /io/tools/test-manylinux.sh || \
100+
docker run -v $(pwd):/io $DOCKER_IMAGE /io/tools/test-manylinux.sh "$wheelhouse" || \
86101
(echo "Failed on $DOCKER_IMAGE" ; false)
87102

88103
done
@@ -92,11 +107,12 @@ function run_all_with_docker {
92107

93108
if [[ -f /.dockerenv && -d /io ]]; then
94109
# Called from within a docker container
95-
run_single_in_docker
110+
run_single_in_docker $WHEELHOUSE
96111

97112
else
98113
# Run from host, trigger runs for all docker images.
99-
run_all_with_docker
114+
115+
run_all_with_docker $WHEELHOUSE
100116
fi
101117

102118

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy