Merge branch 'master' into tests-resource_intensive-tag

pull/788/head
Alex Willmer 4 years ago committed by GitHub
commit 1a0951c664
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,7 +17,7 @@ batches = [
] ]
batches.extend( batches.extend(
['docker pull %s' % (ci_lib.image_for_distro(distro),)] ['docker pull %s' % (ci_lib.image_for_distro(distro),), 'sleep 1']
for distro in ci_lib.DISTROS for distro in ci_lib.DISTROS
) )

@ -66,8 +66,6 @@ with ci_lib.Fold('job_setup'):
run("sudo apt-get update") run("sudo apt-get update")
run("sudo apt-get install -y sshpass") run("sudo apt-get install -y sshpass")
run("bash -c 'sudo ln -vfs /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py /usr/lib/python2.7 || true'")
run("bash -c 'sudo ln -vfs /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py $VIRTUAL_ENV/lib/python2.7 || true'")
with ci_lib.Fold('ansible'): with ci_lib.Fold('ansible'):
playbook = os.environ.get('PLAYBOOK', 'all.yml') playbook = os.environ.get('PLAYBOOK', 'all.yml')

@ -184,7 +184,11 @@ def get_docker_hostname():
def image_for_distro(distro): def image_for_distro(distro):
return 'mitogen/%s-test' % (distro.partition('-')[0],) """Return the container image name or path for a test distro name.
The returned value is suitable for use with `docker pull`.
"""
return 'public.ecr.aws/n5z0e8q9/%s-test' % (distro.partition('-')[0],)
def make_containers(name_prefix='', port_offset=0): def make_containers(name_prefix='', port_offset=0):

@ -86,12 +86,4 @@ if need_to_fix_psycopg2:
batches.append(venv_steps) batches.append(venv_steps)
if ci_lib.have_docker():
batches.extend(
['docker pull %s' % (ci_lib.image_for_distro(distro),)]
for distro in ci_lib.DISTROS
)
ci_lib.run_batches(batches) ci_lib.run_batches(batches)

@ -51,10 +51,14 @@
shell: whoami > /tmp/delegate_to.yml.txt shell: whoami > /tmp/delegate_to.yml.txt
delegate_to: localhost delegate_to: localhost
become: true become: true
tags:
- requires_local_sudo
- name: "delegate_to, sudo" - name: "delegate_to, sudo"
assert: assert:
that: "lookup('file', '/tmp/delegate_to.yml.txt') == 'root'" that: "lookup('file', '/tmp/delegate_to.yml.txt') == 'root'"
tags:
- requires_local_sudo
- name: "delegate_to, sudo" - name: "delegate_to, sudo"
file: file:
@ -62,6 +66,8 @@
state: absent state: absent
delegate_to: localhost delegate_to: localhost
become: true become: true
tags:
- requires_local_sudo
# #
@ -71,10 +77,14 @@
shell: whoami > /tmp/delegate_to.yml.txt shell: whoami > /tmp/delegate_to.yml.txt
connection: local connection: local
become: true become: true
tags:
- requires_local_sudo
- name: "connection:local, sudo" - name: "connection:local, sudo"
assert: assert:
that: "lookup('file', '/tmp/delegate_to.yml.txt') == 'root'" that: "lookup('file', '/tmp/delegate_to.yml.txt') == 'root'"
tags:
- requires_local_sudo
- name: "connection:local, sudo" - name: "connection:local, sudo"
file: file:
@ -82,3 +92,5 @@
state: absent state: absent
connection: local connection: local
become: true become: true
tags:
- requires_local_sudo

@ -15,7 +15,7 @@
content: | content: |
#!/bin/bash #!/bin/bash
export CUSTOM_INTERPRETER=1 export CUSTOM_INTERPRETER=1
exec python2.7 "$@" exec python "$@"
- custom_python_detect_environment: - custom_python_detect_environment:
vars: vars:

@ -1,44 +1,88 @@
# This file is a local convenience. It is not a substitute for the full CI
# suite, and does not cover the full range of Python versions for Mitogen.
# I use this on Ubuntu 20.04, with the following additions
#
# sudo add-apt-repository ppa:deadsnakes/ppa
# sudo apt update
# sudo apt install python3.5 python3.6 python3.7 python3.9 tox libsasl2-dev libldap2-dev libssl-dev ssh-pass
# Last version to support each python version
#
# tox vir'env pip ansible coverage
# ========== ======== ======== ======== ======== ========
# python2.4 1.4 1.8 1.1 ???
# python2.5 1.6.1 1.9.1 1.3.1 ???
# python2.6 2.9.1 15.2.0 9.0.3 2.6.20 4.5.4
[tox] [tox]
envlist = envlist =
init, init,
py26, py{27,36,39}-mode_ansible-ansible2.10,
py27, py{27,36,39}-mode_mitogen,
py35, py{27,36,39}-mode_mitogen-distro_centos7,
py36,
py37,
report, report,
requires =
tox-factor
[testenv] [testenv]
usedevelop = True basepython =
deps = py26: python2.6
-r{toxinidir}/dev_requirements.txt py27: python2.7
-r{toxinidir}/tests/ansible/requirements.txt py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
commands_pre =
mode_ansible: {toxinidir}/.ci/ansible_install.py
mode_debops_common: {toxinidir}/.ci/debops_common_install.py
mode_mitogen: {toxinidir}/.ci/mitogen_install.py
commands = commands =
{posargs:bash run_tests} mode_ansible: {toxinidir}/.ci/ansible_tests.py \
whitelist_externals = --skip-tags requires_local_sudo
bash mode_debops_common: {toxinidir}/.ci/debops_common_tests.py
mode_mitogen: {toxinidir}/.ci/mitogen_tests.py
passenv =
HOME
setenv = setenv =
NOCOVERAGE_ERASE = 1 NOCOVERAGE_ERASE = 1
NOCOVERAGE_REPORT = 1 NOCOVERAGE_REPORT = 1
ansible2.3: VER=2.3.3.0
ansible2.4: VER=2.4.6.0
ansible2.8: VER=2.8.3
ansible2.9: VER=2.9.6
ansible2.10: VER=2.10.0
distro_centos5: DISTRO=centos5
distro_centos6: DISTRO=centos6
distro_centos7: DISTRO=centos7
distro_debian: DISTRO=debian
distro_debianpy3: DISTRO=debian-py3
distros_centos5: DISTROS=centos5
distros_debian: DISTROS=debian
mode_ansible: MODE=ansible
mode_debops_common: MODE=debops_common
mode_mitogen: MODE=mitogen
strategy_linear: STRATEGY=linear
[testenv:init] [testenv:init]
basepython = python3
commands = commands =
coverage erase coverage erase
deps = deps =
coverage coverage==4.5.4
[testenv:report] [testenv:report]
basepython = python3
commands = commands =
coverage html coverage html
echo "coverage report is at file://{toxinidir}/htmlcov/index.html" echo "coverage report is at file://{toxinidir}/htmlcov/index.html"
deps = deps =
coverage coverage==4.5.4
whitelist_externals = whitelist_externals =
echo echo
[testenv:docs] [testenv:docs]
basepython = python basepython = python3
changedir = docs changedir = docs
commands = commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

Loading…
Cancel
Save