more fixes

This commit is contained in:
Brad Warren 2023-04-06 11:05:12 -07:00
parent 092174cb8f
commit 7d6103d503
4 changed files with 23 additions and 55 deletions

View file

@ -14,7 +14,7 @@ jobs:
windows-py37:
IMAGE_NAME: windows-2019
PYTHON_VERSION: 3.7
TOXENV: py37-win
TOXENV: py-win
windows-py39-cover:
IMAGE_NAME: windows-2019
PYTHON_VERSION: 3.9

View file

@ -1,32 +0,0 @@
#!/usr/bin/env python
# pip installs the requested packages in editable mode and runs unit tests on
# them. Each package is installed and tested in the order they are provided
# before the script moves on to the next package. Packages are installed using
# pinned versions of all of our dependencies. See pip_install.py for more
# information on the versions pinned to.
import os
import re
import subprocess
import sys
def call_with_print(command):
print(command)
subprocess.check_call(command, shell=True)
def main(args):
script_dir = os.path.dirname(os.path.abspath(__file__))
command = [sys.executable, os.path.join(script_dir, 'pip_install_editable.py')]
for requirement in args:
current_command = command[:]
current_command.append(requirement)
call_with_print(' '.join(current_command))
pkg = re.sub(r'\[\w+\]', '', requirement)
call_with_print(' '.join([
sys.executable, '-m', 'pytest', pkg]))
if __name__ == '__main__':
main(sys.argv[1:])

View file

@ -1,17 +0,0 @@
#!/usr/bin/env python
# pip installs packages in editable mode using pip_install.py
import sys
import pip_install
def main(args):
new_args = []
for arg in args:
new_args.append('-e')
new_args.append(arg)
pip_install.main(new_args)
if __name__ == '__main__':
main(sys.argv[1:])

27
tox.ini
View file

@ -46,7 +46,7 @@ commands =
echo "Unrecognized environment name {envname}"
false
[testenv:py]
[testenv:py{,-win,-posix}]
commands =
python -m pytest {posargs} acme certbot certbot-apache certbot-dns-cloudflare certbot-dns-digitalocean certbot-dns-dnsimple certbot-dns-dnsmadeeasy certbot-dns-gehirn certbot-dns-google certbot-dns-linode certbot-dns-luadns certbot-dns-nsone certbot-dns-ovh certbot-dns-rfc2136 certbot-dns-route53 certbot-dns-sakuracloud certbot-nginx
@ -79,6 +79,25 @@ deps =
-e certbot-ci
commands = mypy {[base]source_paths}
[testenv:isolated-acme]
description = Tests acme without any Certbot components installed
deps = -e acme[test]
commands = python -m pytest acme
[testenv:isolated-certbot]
description = Tests Certbot without any additional plugins installed
deps =
{[testenv:isolated-acme]deps}
-e certbot[test]
commands = python -m pytest certbot
[testenv:isolated-plugin]
description = Tests the given plugin without installing other plugins
deps =
{[testenv:isolated-certbot]deps}
-e {posargs}
commands = python -m pytest {posargs}
[testenv:apacheconftest]
deps =
-e acme
@ -139,7 +158,7 @@ passenv =
DOCKER_*
[testenv:docker_dev]
description = tests the Dockerfile-dev file to ensure development with it works as expected
description = Tests the Dockerfile-dev file to ensure development with it works as expected
deps =
commands =
docker-compose run --rm --service-ports development bash -c 'tox -e lint'
@ -230,7 +249,5 @@ passenv =
AWS_*
setenv = AWS_DEFAULT_REGION=us-east-1
changedir = letstest
# The package to install is in the current working directory because of the
# value of changedir.
deps = -e .
deps = -e {toxinidir}/letstest
commands = {toxinidir}/tools/retry.sh letstest targets/targets.yaml {env:AWS_EC2_PEM_FILE} SET_BY_ENV scripts/test_apache2.sh --repo {toxinidir}