From commits-return-10293-archive-asf-public=cust-asf.ponee.io@pulsar.incubator.apache.org Mon Jul 2 09:19:53 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 27638180674 for ; Mon, 2 Jul 2018 09:19:52 +0200 (CEST) Received: (qmail 9443 invoked by uid 500); 2 Jul 2018 07:19:52 -0000 Mailing-List: contact commits-help@pulsar.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.incubator.apache.org Delivered-To: mailing list commits@pulsar.incubator.apache.org Received: (qmail 9427 invoked by uid 99); 2 Jul 2018 07:19:52 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2018 07:19:52 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] sijie closed pull request #2042: Tests Python Wheel packaging in CI build Message-ID: <153051599168.9624.9015290097813759650.gitbox@gitbox.apache.org> Date: Mon, 02 Jul 2018 07:19:51 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit sijie closed pull request #2042: Tests Python Wheel packaging in CI build URL: https://github.com/apache/incubator-pulsar/pull/2042 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/pulsar-client-cpp/python/pulsar_test.py b/pulsar-client-cpp/python/pulsar_test.py index b07abbc998..6c8e6c7948 100755 --- a/pulsar-client-cpp/python/pulsar_test.py +++ b/pulsar-client-cpp/python/pulsar_test.py @@ -21,6 +21,7 @@ from unittest import TestCase, main import time +import os from pulsar import Client, MessageId, \ CompressionType, ConsumerType, PartitionsRoutingMode, \ AuthenticationTLS @@ -125,7 +126,9 @@ def test_producer_consumer(self): client.close() def test_tls_auth(self): - certs_dir = "../../pulsar-broker/src/test/resources/authentication/tls/" + certs_dir = '/pulsar/pulsar-broker/src/test/resources/authentication/tls/' + if not os.path.exists(certs_dir): + certs_dir = "../../pulsar-broker/src/test/resources/authentication/tls/" client = Client(self.serviceUrlTls, tls_trust_certs_file_path=certs_dir + 'cacert.pem', tls_allow_insecure_connection=False, diff --git a/pulsar-client-cpp/run-unit-tests.sh b/pulsar-client-cpp/run-unit-tests.sh index b0bdcd1e6a..4eac8031fc 100755 --- a/pulsar-client-cpp/run-unit-tests.sh +++ b/pulsar-client-cpp/run-unit-tests.sh @@ -57,7 +57,7 @@ PULSAR_CLIENT_CONF=$PWD/test-conf/client-ssl.conf pulsar-dist/bin/pulsar-admin c sleep 5 -cd tests +pushd tests if [ -f /gtest-parallel/gtest-parallel ]; then echo "---- Run unit tests in parallel" @@ -68,11 +68,29 @@ else RES=$? fi +popd + if [ $RES -eq 0 ]; then + pushd python + echo "---- Build Python Wheel file" + python setup.py bdist_wheel + + echo "---- Installing Python Wheel file" + pip install dist/pulsar_client-*-linux_x86_64.whl + echo "---- Running Python unit tests" - cd ../python + + # Running tests from a different directory to avoid importing directly + # from the current dir, but rather using the installed wheel file + cp pulsar_test.py /tmp + pushd /tmp + python pulsar_test.py RES=$? + + popd + popd + fi kill -9 $standalone_pid $auth_pid ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services