@@ -11,6 +11,14 @@ set -ex
11
11
12
12
echo " $0 running from $( pwd) "
13
13
14
+ if [[ ! -z $1 ]]; then
15
+ WHEELHOUSE=$1
16
+ else
17
+ WHEELHOUSE=" wheelhouse"
18
+ fi
19
+
20
+
21
+
14
22
function setup_centos {
15
23
# CentOS container setup
16
24
yum install -q -y python epel-release
@@ -26,6 +34,12 @@ function setup_ubuntu {
26
34
27
35
function run_single_in_docker {
28
36
# 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
29
43
30
44
# Detect OS
31
45
if grep -qi centos /etc/system-release /etc/redhat-release ; then
@@ -41,7 +55,7 @@ function run_single_in_docker {
41
55
hash -r # let go of previous 'pip'
42
56
43
57
# Install modules
44
- pip install confluent_kafka --no-index -f /io/ wheelhouse
58
+ pip install confluent_kafka --no-index -f $ wheelhouse
45
59
pip install pytest
46
60
47
61
# Verify that OpenSSL and zlib are properly linked
@@ -64,25 +78,26 @@ p = confluent_kafka.Producer({"ssl.cipher.suites":"DEFAULT",
64
78
function run_all_with_docker {
65
79
# Run tests in all listed docker containers.
66
80
# This is executed on the host.
81
+ local wheelhouse=$1
67
82
68
83
[[ ! -z $DOCKER_IMAGES ]] || \
69
84
# LTS and stable release of popular Linux distros.
70
85
# We require >= Python 2.7 to be avaialble (which rules out Centos 6.6)
71
86
DOCKER_IMAGES=" ubuntu:14.04 ubuntu:16.04 ubuntu:17.10 debian:stable centos:7"
72
87
73
88
74
- _wheels=" wheelhouse/*manylinux*.whl"
89
+ _wheels=" $ wheelhouse /*manylinux*.whl"
75
90
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"
77
92
exit 1
78
93
else
79
94
echo " Wheels:"
80
- ls wheelhouse/* .whl
95
+ ls $ wheelhouse /* .whl
81
96
fi
82
97
83
98
for DOCKER_IMAGE in $DOCKER_IMAGES ; do
84
99
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 " || \
86
101
(echo " Failed on $DOCKER_IMAGE " ; false)
87
102
88
103
done
@@ -92,11 +107,12 @@ function run_all_with_docker {
92
107
93
108
if [[ -f /.dockerenv && -d /io ]]; then
94
109
# Called from within a docker container
95
- run_single_in_docker
110
+ run_single_in_docker $WHEELHOUSE
96
111
97
112
else
98
113
# Run from host, trigger runs for all docker images.
99
- run_all_with_docker
114
+
115
+ run_all_with_docker $WHEELHOUSE
100
116
fi
101
117
102
118
0 commit comments