From 9f2d08328ecc8cea1e8b9b10b5aa1d79dff5045c Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 19 Apr 2022 10:17:23 -0700 Subject: [PATCH] Fix python3.9 testing Latest setuptools has deprecated the use of setup.py commands like `setup.py testr`. For some reason python3.9 hangs and fails to work at all when you run `setup.py testr`. Switch to running testr directly and not bother debugging this too aggressively as this functionality is going away eventually. Change-Id: I3ad9e0c00990fbb7d26b03674833666f32b3bcae --- tox.ini | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 27a7c09..54a6ee2 100644 --- a/tox.ini +++ b/tox.ini @@ -11,8 +11,11 @@ basepython = python3 install_command = pip install {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt +allowlist_externals = bash commands = - python setup.py testr --slowest --testr-args='{posargs}' + bash -c "[ -d .testrepository ] || testr init" + testr run -- {posargs} + testr slowest [tox:jenkins] sitepackages = True @@ -22,8 +25,10 @@ commands = flake8 [testenv:cover] setenv = VIRTUAL_ENV={envdir} +allowlist_externals = bash commands = - python setup.py testr --coverage + bash -c "[ -d .testrepository ] || testr init" + testr --coverage [testenv:venv] commands = {posargs}