【发布时间】:2020-06-16 15:45:11
【问题描述】:
我想专门运行某个 tox 部分,然后在特定平台上自动决定。
如果我只是运行tox -e ALL,下面的示例代码-sn-p 可以正常工作。然后平台条件很好地划分出正确的平台。
但是,我想仅处理并运行特定部分,例如 tox -e other(不是 tox -e other-win, other-linux),然后让 tox 自动选择相应的平台(或任何其他)条件。
我不知道这种在tox 中设置条件的方式是否可行,或者我是否遗漏了什么。
[tox]
skipsdist = true
[testenv:systest-{win, linux}]
platform =
linux: linux
win: win|msys
whitelist_externals =
win: cmd
linux: sh
commands =
win: cmd /r echo {env:OS}
linux: sh -c echo {env:OS}
[testenv:other-{win, linux}]
platform =
linux: linux
win: win|msys
whitelist_externals =
win: cmd
linux: sh
commands =
win: cmd /r echo {env:OS}
linux: sh -c echo {env:OS}
【问题讨论】:
标签: python continuous-integration automated-tests tox