# -----------------------------------------------------------------------------
# Tox config file for pywbem
#
# Supported platforms:
#   Linux
#   OS-X
#   Windows (native and in UNIX-like environments)

# Note: The 32-bit versions of cygwin do not work and have been removed from
# appveyor.yml and tox.ini:
# - Python 2.7 with cygwin 32-bit fails with "virtualenv is not compatible with
#   this system or executable".
# - On Python 3.6 and upwards, Tox returns success but does not do anything.

[tox]
minversion = 2.0
envlist =
    py27
    py36
    py37
    py38
    py39
    py310
    win64_py27_32
    win64_py27_64
    win64_py36_32
    win64_py36_64
    win64_py37_32
    win64_py37_64
    win64_py38_32
    win64_py38_64
    win64_py39_32
    win64_py39_64
    win64_py310_32
    win64_py310_64
    cygwin64_py27
    cygwin64_py36
    cygwin64_py37
    cygwin64_py38
    cygwin64_py39
    cygwin64_py310

# For Appveyor, missing interpreters should fail. For local use, you may
# want to allow to skip missing interpreters.
skip_missing_interpreters = false

skipsdist = true

[testenv]
skip_install = true
passenv =
    ProgramFiles
    APPVEYOR
    USER
    LNAME
    USERNAME
    HOME
    USERPROFILE
    OS
    PATH
    PYTHONPATH
    INCLUDE
    CPATH
    CFLAGS
    LANG
    LC_ALL
    LC_CTYPE
    LIB
    LIBRARY_PATH
    LDFLAGS
    SWIG_FEATURES
    SHELL
    PWD
    TESTCASES
    TESTHMC
    TESTLOGFILE
    PACKAGE_LEVEL
    PYTHON_CMD
    PIP_CMD
whitelist_externals =
    make
commands =
    make platform pip_list env
    make install
    make develop
    make check
    # TODO(nocasedict): Re-enable once nocasedict has been released
    # make installtest
    make test
    make leaktest
    make resourcetest

[testenv:py27]
platform = linux2|darwin
basepython = python2.7

[testenv:py36]
platform = linux2|darwin
basepython = python3.6

[testenv:py37]
platform = linux2|darwin
basepython = python3.7

[testenv:py38]
platform = linux2|darwin
basepython = python3.8

[testenv:py39]
platform = linux2|darwin
basepython = python3.9

[testenv:py310]
platform = linux2|darwin
basepython = python3.10

# Note: The basepython file paths for the win64* tox environments are set for
#       Appveyor CI.

[testenv:win64_py27_32]
platform = win32
basepython = C:\Python27\python.exe

[testenv:win64_py27_64]
platform = win32
basepython = C:\Python27-x64\python.exe

[testenv:win64_py36_32]
platform = win32
basepython = C:\Python36\python.exe

[testenv:win64_py36_64]
platform = win32
basepython = C:\Python36-x64\python.exe

[testenv:win64_py37_32]
platform = win32
basepython = C:\Python37\python.exe

[testenv:win64_py37_64]
platform = win32
basepython = C:\Python37-x64\python.exe

[testenv:win64_py38_32]
platform = win32
basepython = C:\Python38\python.exe

[testenv:win64_py38_64]
platform = win32
basepython = C:\Python38-x64\python.exe

[testenv:win64_py39_32]
platform = win32
basepython = C:\Python39\python.exe

[testenv:win64_py39_64]
platform = win32
basepython = C:\Python39-x64\python.exe

[testenv:win64_py310_32]
platform = win32
basepython = C:\Python310\python.exe

[testenv:win64_py310_64]
platform = win32
basepython = C:\Python310-x64\python.exe

# Note: The 32-bit versions of CygWin do not work and have been removed from
# appveyor.yml and tox.ini:
# - Python 2.7 with cygwin 32-bit fails with "virtualenv is not compatible with
#   this system or executable".
# - On Python 3.6 and upwards, Tox returns success but does not do anything.

[testenv:cygwin64_py27]
platform = cygwin
basepython = python2.7

[testenv:cygwin64_py36]
platform = cygwin
basepython = python3.6

[testenv:cygwin64_py37]
platform = cygwin
basepython = python3.7

[testenv:cygwin64_py38]
platform = cygwin
basepython = python3.8

[testenv:cygwin64_py39]
platform = cygwin
basepython = python3.9

[testenv:cygwin64_py310]
platform = cygwin
basepython = python3.10
