summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-08-14 12:07:14 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-08-14 17:19:40 -0400
commit3231e281efb2f36dd0dbd628efcd684175064386 (patch)
treee4a961d163c6d594e29fc09d1bd7240123d13548 /tox.ini
parent743d22f3607d24243f55521a5de286f4651faca7 (diff)
downloadsqlalchemy-3231e281efb2f36dd0dbd628efcd684175064386.tar.gz
Provision on different drivers dynamically
We want TOX_POSTGRESQL and similar to be the fixed variable that is configured from CI environment. These variables should refer to database servers but individual drivers like asyncpg mysqlconnector etc. should come from local tox.ini. add a new system to generate per-driver URLs from a simple list of hostname-based URLs delivered from CI environment. Change-Id: I4267b4a70742765388c7e7c4432c1da9d9adece2
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini25
1 files changed, 17 insertions, 8 deletions
diff --git a/tox.ini b/tox.ini
index f230e5be1..92fe03172 100644
--- a/tox.ini
+++ b/tox.ini
@@ -52,31 +52,40 @@ setenv=
BASECOMMAND=python -m pytest --log-info=sqlalchemy.testing
WORKERS={env:TOX_WORKERS:-n4 --max-worker-restart=5}
- oracle: WORKERS={env:TOX_WORKERS:-n2 --max-worker-restart=5}
+
nocext: DISABLE_SQLALCHEMY_CEXT=1
cext: REQUIRE_SQLALCHEMY_CEXT=1
cov: COVERAGE={[testenv]cov_args}
+ backendonly: BACKENDONLY=--backend-only
+ memusage: MEMUSAGE='-k test_memusage'
+
+ oracle: WORKERS={env:TOX_WORKERS:-n2 --max-worker-restart=5}
+ oracle: ORACLE={env:TOX_ORACLE:--db oracle}
+
sqlite: SQLITE={env:TOX_SQLITE:--db sqlite}
sqlite_file: SQLITE={env:TOX_SQLITE_FILE:--db sqlite_file}
- postgresql: POSTGRESQL={env:TOX_POSTGRESQL_MASTER:--db postgresql}
- mysql: MYSQL={env:TOX_MYSQL:--db mysql --db pymysql}
- oracle: ORACLE={env:TOX_ORACLE:--db oracle}
+
+ postgresql: POSTGRESQL={env:TOX_POSTGRESQL:--db postgresql}
+ postgresql: EXTRA_PG_DRIVERS={env:EXTRA_PG_DRIVERS:--dbdriver psycopg2 --dbdriver asyncpg}
+
+ mysql: MYSQL={env:TOX_MYSQL:--db mysql}
+ mysql: EXTRA_MYSQL_DRIVERS={env:EXTRA_MYSQL_DRIVERS:--dbdriver mysqldb --dbdriver pymysql}
+
mssql: MSSQL={env:TOX_MSSQL:--db mssql}
+
oracle,mssql,sqlite_file: IDENTS=--write-idents db_idents.txt
oracle,mssql,sqlite_file: MEMUSAGE=--nomemory
- backendonly: BACKENDONLY=--backend-only
- memusage: MEMUSAGE='-k test_memusage'
# tox as of 2.0 blocks all environment variables from the
# outside, unless they are here (or in TOX_TESTENV_PASSENV,
# wildcards OK). Need at least these
-passenv=ORACLE_HOME NLS_LANG TOX_POSTGRESQL_MASTER TOX_MYSQL TOX_ORACLE TOX_MSSQL TOX_SQLITE TOX_SQLITE_FILE TOX_WORKERS
+passenv=ORACLE_HOME NLS_LANG TOX_POSTGRESQL TOX_MYSQL TOX_ORACLE TOX_MSSQL TOX_SQLITE TOX_SQLITE_FILE TOX_WORKERS EXTRA_PG_DRIVERS EXTRA_MYSQL_DRIVERS
# for nocext, we rm *.so in lib in case we are doing usedevelop=True
commands=
cext: /bin/true
nocext: sh -c "rm -f lib/sqlalchemy/*.so"
- {env:BASECOMMAND} {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:MEMUSAGE:} {env:COVERAGE:} {posargs}
+ {env:BASECOMMAND} {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:EXTRA_PG_DRIVERS:} {env:MYSQL:} {env:EXTRA_MYSQL_DRIVERS:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:MEMUSAGE:} {env:COVERAGE:} {posargs}
oracle,mssql,sqlite_file: python reap_dbs.py db_idents.txt
# thanks to https://julien.danjou.info/the-best-flake8-extensions/