Merge pull request #917 from moreati/cleanups

Test and build improvements
pull/918/head
Alex Willmer 2 years ago committed by GitHub
commit af03b9a9b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -193,8 +193,6 @@ class Fold(object):
def __exit__(self, _1, _2, _3): pass
os.environ.setdefault('ANSIBLE_STRATEGY',
os.environ.get('STRATEGY', 'mitogen_linear'))
GIT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
# Used only when MODE=mitogen
DISTRO = os.environ.get('DISTRO', 'debian9')

@ -7,7 +7,7 @@ ci_lib.DISTROS = ['debian']
ci_lib.run_batches([
[
'pip install -qqq "debops[ansible]==2.1.2"',
'python -m pip --no-python-version-warning --disable-pip-version-check "debops[ansible]==2.1.2"',
],
[
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',

@ -60,7 +60,7 @@ setup(
license = 'New BSD',
url = 'https://github.com/mitogen-hq/mitogen/',
packages = find_packages(exclude=['tests', 'examples']),
python_requires='>=2.4, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4',
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
zip_safe = False,
classifiers = [
'Environment :: Console',
@ -70,10 +70,6 @@ setup(
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.4',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',

@ -11,9 +11,7 @@ import unittest2
import ansible.template
from ansible.errors import AnsibleError
from ansible.plugins.action import ActionBase
from ansible.module_utils.six import string_types
TEMPLATE_KWARGS = {}

@ -1,6 +1,5 @@
#!/usr/bin/env python
import os
import subprocess
import sys
os.environ['ANSIBLE_STRATEGY'] = 'mitogen_linear'
os.execlp(

@ -5,6 +5,12 @@ Measure latency of .fork() setup/teardown.
import mitogen
import mitogen.core
try:
xrange
except NameError:
xrange = range
@mitogen.main()
def main(router):
t0 = mitogen.core.now()
@ -12,4 +18,4 @@ def main(router):
t = mitogen.core.now()
ctx = router.fork()
ctx.shutdown(wait=True)
print '++', 1000 * ((mitogen.core.now() - t0) / (1.0+x))
print('++ %d' % 1000 * ((mitogen.core.now() - t0) / (1.0+x)))

@ -6,7 +6,6 @@ import sys
import time
import tempfile
import mock
import unittest2
import mitogen.core
@ -80,7 +79,7 @@ def close_proc(proc):
proc.stdin.close()
proc.stdout.close()
if proc.stderr:
prco.stderr.close()
proc.stderr.close()
def wait_read(fp, n):

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# I am a Python interpreter that sits idle until the connection times out.
import time

@ -2,15 +2,12 @@ import errno
import fcntl
import os
import signal
import subprocess
import sys
import tempfile
import time
import mock
import unittest2
import testlib
from testlib import Popen__terminate
import mitogen.core
import mitogen.parent

@ -25,7 +25,7 @@ def burn():
mul = 1.5
count = int(mul * multiprocessing.cpu_count())
print count
print(count)
procs = [multiprocessing.Process(target=burn)
for _ in range(count)]

@ -1,7 +1,3 @@
import logging
import time
import unittest2
import mitogen.core

@ -56,10 +56,10 @@ basepython =
deps =
-r{toxinidir}/tests/requirements.txt
mode_ansible: -r{toxinidir}/tests/ansible/requirements.txt
ansible2.3: ansible=2.3.3.0
ansible2.4: ansible=2.4.6.0
ansible2.8: ansible=2.8.3
ansible2.9: ansible=2.9.6
ansible2.3: ansible==2.3.3.0
ansible2.4: ansible==2.4.6.0
ansible2.8: ansible==2.8.3
ansible2.9: ansible==2.9.6
ansible2.10: ansible-base<2.10.14
ansible2.10: ansible==2.10.0
ansible3: ansible-base<2.10.14
@ -67,7 +67,7 @@ deps =
ansible4: ansible==4.8.0
ansible5: ansible==5.0.1
install_command =
python -m pip --no-python-version-warning install {opts} {packages}
python -m pip --no-python-version-warning --disable-pip-version-check install {opts} {packages}
commands_pre =
mode_ansible: {toxinidir}/.ci/ansible_install.py
mode_debops_common: {toxinidir}/.ci/debops_common_install.py
@ -85,6 +85,8 @@ passenv =
AWS_SECRET_ACCESS_KEY
HOME
setenv =
ANSIBLE_SKIP_TAGS = requires_local_sudo,resource_intensive
ANSIBLE_STRATEGY = mitogen_linear
NOCOVERAGE_ERASE = 1
NOCOVERAGE_REPORT = 1
# Only applicable to MODE=mitogen
@ -115,7 +117,7 @@ setenv =
mode_ansible: MODE=ansible
mode_debops_common: MODE=debops_common
mode_mitogen: MODE=mitogen
strategy_linear: STRATEGY=linear
strategy_linear: ANSIBLE_STRATEGY=linear
whitelist_externals =
docker
docker-credential-secretservice

Loading…
Cancel
Save