Skip to content

Commit 268d546

Browse files
committed
Additional smoketeset fixes
1 parent 6370cf1 commit 268d546

File tree

2 files changed

+28
-15
lines changed

2 files changed

+28
-15
lines changed

tools/smoketest.sh

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -e
1818

1919
wheeldir=$1
2020
testdir=
21-
21+
all_fails=
2222

2323
if [[ -n $wheeldir ]]; then
2424
if [[ ! -d $wheeldir ]]; then
@@ -28,23 +28,25 @@ if [[ -n $wheeldir ]]; then
2828
python -m pip install virtualenv
2929
fi
3030

31+
pyvers_tested=
3132

3233
# Run tests with both python2 and python3 (whatever versions the OS provides)
3334
for py in 2.7 3.8 3.7 3.6 3.5 ; do
34-
echo "# Smoketest with Python$py"
35+
echo "$0: # Smoketest with Python$py"
3536

3637
if ! python$py -V ; then
3738
echo "$0: python$py not available: skipping"
3839
continue
3940
fi
4041

42+
pyvers_tested="$pyvers_tested $py"
43+
4144
if [[ -n $wheeldir ]]; then
4245
venvdir=$(mktemp -d /tmp/_venvXXXXXX)
4346

4447
function cleanup () {
4548
set +e
4649
deactivate
47-
echo $venvdir
4850
rm -rf "$venvdir"
4951
[[ -d $testdir ]] && rm -rf "$testdir"
5052
set -e
@@ -67,7 +69,7 @@ for py in 2.7 3.8 3.7 3.6 3.5 ; do
6769
# version we can pick any wheel file.
6870
version=$(pkginfo -f version $(ls $wheeldir/confluent_kafka*.whl | head -1) | sed -e 's/^version: //')
6971
if [[ -z $version ]]; then
70-
echo "Unable to parse version from wheel files in $wheeldir"
72+
echo "$0: Unable to parse version from wheel files in $wheeldir"
7173
exit 1
7274
fi
7375

@@ -86,42 +88,53 @@ for py in 2.7 3.8 3.7 3.6 3.5 ; do
8688
# Change to a neutral path where there is no confluent_kafka sub-directory
8789
# that might interfere with module load.
8890
pushd $testdir
89-
echo "Running unit tests"
91+
echo "$0: Running unit tests"
9092
pytest
9193

9294
fails=""
9395

94-
echo "Verifying OpenSSL"
96+
echo "$0: Verifying OpenSSL"
9597
python -c "
9698
import confluent_kafka
9799
confluent_kafka.Producer({'ssl.cipher.suites':'DEFAULT'})
98100
" || fails="$fails OpenSSL"
99101

100102
for compr in gzip lz4 snappy zstd; do
101-
echo "Verifying $compr"
103+
echo "$0: Verifying $compr"
102104
python -c "
103105
import confluent_kafka
104106
confluent_kafka.Producer({'compression.codec':'$compr'})
105107
" || fails="$fails $compr"
106108
done
107109

108-
echo "Verifying Interceptor installation"
109-
echo "Note: Requires protobuf-c to be installed on the system."
110+
echo "$0: Verifying Interceptor installation"
111+
echo "$0: Note: Requires protobuf-c to be installed on the system."
110112
python -c '
111113
from confluent_kafka import Consumer
112114
113115
c = Consumer({"group.id": "test-linux", "plugin.library.paths": "monitoring-interceptor"})
114-
' || echo "Warning: interceptor test failed, which we ignore"
116+
' || echo "$0: Warning: interceptor test failed, which we ignore"
117+
118+
119+
if [[ -n $fails ]]; then
120+
echo "$0: SMOKE TEST FAILS FOR python$py: $fails"
121+
all_fails="$all_fails \[py$py: $fails\]"
122+
fi
115123

116124
popd # $testdir
117125
done
118126

119-
if [[ -z $fails ]]; then
120-
echo "ALL SMOKE TESTS PASSED"
127+
if [[ -z $pyvers_tested ]]; then
128+
echo "$0: NO PYTHON VERSIONS TESTED"
129+
exit 1
130+
fi
131+
132+
if [[ -z $all_fails ]]; then
133+
echo "$0: ALL SMOKE TESTS PASSED (python versions:$pyvers_tested)"
121134
exit 0
122135
fi
123136

124-
echo "SMOKE TEST FAILURES: $fails"
137+
echo "$0: SMOKE TEST FAILURES: $all_fails"
125138
exit 1
126139

127140

tools/test-manylinux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function setup_centos {
3939
function setup_ubuntu {
4040
# Ubuntu container setup
4141
apt-get update
42-
apt-get install -y python python3 curl
42+
apt-get install -y python python3 python3-distutils curl
4343
}
4444

4545

@@ -83,7 +83,7 @@ function run_all_with_docker {
8383

8484
[[ ! -z $DOCKER_IMAGES ]] || \
8585
# LTS and stable release of popular Linux distros.
86-
# We require >= Python 2.7 to be avaialble (which rules out Centos 6.6)
86+
# We require >= Python 2.7 to be available (which rules out Centos 6.6)
8787
DOCKER_IMAGES="ubuntu:14.04 ubuntu:16.04 ubuntu:18.04 debian:stable centos:7"
8888

8989

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