Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
3rd-party connectors tests: mysql-connector-python
- Loading branch information
Showing
3 changed files
with
99 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 31 additions & 4 deletions
35
buildbot/steps/3rd-party-client-tests/mysql-connector-python.deb.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,36 @@ | ||
| #!/bin/bash -x | ||
|
|
||
| ### Tests seen sporadically fail in MySQL: | ||
| # ERROR: bugs.BugOra21947091.test_ssl_disabled_pure | ||
| # FAIL: connection.MySQLConnectionTests.test_shutdown | ||
| # ERROR: bugs.Bug551533and586003.test_select (using MySQLConnection) | ||
| # ERROR: bugs.Bug865859.test_reassign_connection (using MySQLConnection) | ||
|
|
||
| ### Tests seen sporadically fail in MariaDB: | ||
| # FAIL: bugs.BugOra18415927.test_auth_response | ||
| # ERROR: connection.MySQLConnectionTests.test_cmd_stmt_execute | ||
|
|
||
| cd mysql-connector-python-*/ | ||
| sed -ie 's/-for python/for python/' debian/rules | ||
| sed -ie '/(5, 7, /,/^$/d' tests/mysqld.py | ||
|
|
||
| dh build |tee build.log 2>&1 | ||
| sudo sh -c "DEBIAN_FRONTEND=noninteractive apt-get install -y python3 dh-python debhelper dpkg-dev" | ||
| sed -ie "s/override_dh_auto_test/override_dh_auto_test_orig/g" debian/rules | ||
|
|
||
| cat >> debian/rules << EOF | ||
| override_dh_auto_test: | ||
| ifeq (,\$(findstring nocheck,\$(DEB_BUILD_OPTIONS))) | ||
| -for python in \$(PYTHON2) \$(PYTHON3); do \\ | ||
| LIB=\$\$(\$\$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") ;\\ | ||
| mkdir -p /tmp/con-python/ ; \\ | ||
| PYTHONPATH=\$(CURDIR)/\$\$LIB \$\$python unittests.py --with-mysql=/usr/ --mysql-topdir=/tmp/con-python/ --verbosity=2 --bind-address=:: --host=::1 --stats ; \\ | ||
| rm -rf /tmp/con-python/ ; \\ | ||
| done | ||
| endif | ||
| EOF | ||
|
|
||
| sed -ie 's/^\(\s*\)def _get_version(self):.*$/\1def _get_version(self):\n\1\1return (5,6,99)/' tests/mysqld.py | ||
| sed -ie "s/'--is-wheel'//" tests/__init__.py | ||
|
|
||
| make -f debian/rules build 2>&1 | tee build.log | ||
|
|
||
| grep '^\(FAIL\|ERROR\):' build.log | ||
| grep '^\(FAIL\|ERROR\):' build.log | grep -vE "bugs.BugOra21947091.test_ssl_disabled_pure|connection.MySQLConnectionTests.test_shutdown|bugs.Bug551533and586003.test_select|bugs.Bug865859.test_reassign_connection|bugs.BugOra18415927.test_auth_response|connection.MySQLConnectionTests.test_cmd_stmt_execute" | tee /tmp/test.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters