Make windows job names explicit
parent
e18fec9b17
commit
7c1bc1fce4
14
.travis.yml
14
.travis.yml
|
@ -4,7 +4,7 @@ sudo: required
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: "Windows, Python Latest"
|
- name: "Windows, Python Latest: multiprocessing"
|
||||||
os: windows
|
os: windows
|
||||||
language: sh
|
language: sh
|
||||||
python: 3.x # only works on linux
|
python: 3.x # only works on linux
|
||||||
|
@ -13,7 +13,7 @@ matrix:
|
||||||
- export PATH="/c/Python:/c/Python/Scripts:$PATH"
|
- export PATH="/c/Python:/c/Python/Scripts:$PATH"
|
||||||
- python -m pip install --upgrade pip wheel
|
- python -m pip install --upgrade pip wheel
|
||||||
|
|
||||||
- name: "Windows, Python 3.7"
|
- name: "Windows, Python 3.7: multiprocessing"
|
||||||
os: windows
|
os: windows
|
||||||
python: 3.7 # only works on linux
|
python: 3.7 # only works on linux
|
||||||
language: sh
|
language: sh
|
||||||
|
@ -24,17 +24,17 @@ matrix:
|
||||||
|
|
||||||
- name: "Python 3.7: multiprocessing"
|
- name: "Python 3.7: multiprocessing"
|
||||||
python: 3.7 # this works for Linux but is ignored on macOS or Windows
|
python: 3.7 # this works for Linux but is ignored on macOS or Windows
|
||||||
env: SPAWN_BACKEND=mp
|
env: SPAWN_BACKEND="mp"
|
||||||
- name: "Python 3.7: trio-run-in-process"
|
- name: "Python 3.7: trio-run-in-process"
|
||||||
python: 3.7 # this works for Linux but is ignored on macOS or Windows
|
python: 3.7 # this works for Linux but is ignored on macOS or Windows
|
||||||
env: SPAWN_BACKEND=trio_run_in_process
|
env: SPAWN_BACKEND="trio_run_in_process"
|
||||||
|
|
||||||
- name: "Pytron 3.8: multiprocessing"
|
- name: "Pytron 3.8: multiprocessing"
|
||||||
python: 3.8 # this works for Linux but is ignored on macOS or Windows
|
python: 3.8 # this works for Linux but is ignored on macOS or Windows
|
||||||
env: SPAWN_BACKEND=mp
|
env: SPAWN_BACKEND="mp"
|
||||||
- name: "Python 3.8: trio-run-in-process"
|
- name: "Python 3.8: trio-run-in-process"
|
||||||
python: 3.8 # this works for Linux but is ignored on macOS or Windows
|
python: 3.8 # this works for Linux but is ignored on macOS or Windows
|
||||||
env: SPAWN_BACKEND=trio_run_in_process
|
env: SPAWN_BACKEND="trio_run_in_process"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- cd $TRAVIS_BUILD_DIR
|
- cd $TRAVIS_BUILD_DIR
|
||||||
|
@ -43,4 +43,4 @@ install:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mypy tractor/ --ignore-missing-imports
|
- mypy tractor/ --ignore-missing-imports
|
||||||
- pytest tests/ --no-print-logs --spawn-backend=$SPAWN_BACKEND
|
- pytest tests/ --no-print-logs --spawn-backend=${SPAWN_BACKEND}
|
||||||
|
|
|
@ -16,7 +16,7 @@ _arb_addr = '127.0.0.1', random.randint(1000, 9999)
|
||||||
def pytest_addoption(parser):
|
def pytest_addoption(parser):
|
||||||
parser.addoption(
|
parser.addoption(
|
||||||
"--ll", action="store", dest='loglevel',
|
"--ll", action="store", dest='loglevel',
|
||||||
default=None, help="logging level to set when testing"
|
default=None, help="logging level to set when testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.addoption(
|
parser.addoption(
|
||||||
|
@ -29,7 +29,7 @@ def pytest_addoption(parser):
|
||||||
def pytest_configure(config):
|
def pytest_configure(config):
|
||||||
backend = config.option.spawn_backend
|
backend = config.option.spawn_backend
|
||||||
|
|
||||||
if plaform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
backend = 'mp'
|
backend = 'mp'
|
||||||
|
|
||||||
if backend == 'mp':
|
if backend == 'mp':
|
||||||
|
@ -59,13 +59,15 @@ def pytest_generate_tests(metafunc):
|
||||||
if spawn_backend == 'mp':
|
if spawn_backend == 'mp':
|
||||||
from multiprocessing import get_all_start_methods
|
from multiprocessing import get_all_start_methods
|
||||||
methods = get_all_start_methods()
|
methods = get_all_start_methods()
|
||||||
if 'fork' in methods: # fork not available on windows, so check before removing
|
if 'fork' in methods:
|
||||||
# XXX: the fork method is in general incompatible with
|
# fork not available on windows, so check before
|
||||||
# trio's global scheduler state
|
# removing XXX: the fork method is in general
|
||||||
|
# incompatible with trio's global scheduler state
|
||||||
methods.remove('fork')
|
methods.remove('fork')
|
||||||
elif spawn_backend == 'trio_run_in_process':
|
elif spawn_backend == 'trio_run_in_process':
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
pytest.fail("Only `--spawn-backend=mp` is supported on Windows")
|
pytest.fail(
|
||||||
|
"Only `--spawn-backend=mp` is supported on Windows")
|
||||||
|
|
||||||
methods = ['trio_run_in_process']
|
methods = ['trio_run_in_process']
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue