plain-sundown-25537
01/10/2020, 7:02 AMhundreds-father-404
01/10/2020, 7:09 AM./pants --no-v1 --v2 test
. It will run each target as a separate process, limited by the global option --process-execution-local-parallelism
.
The caching is also much saner than the normal V1 test runner. For example, if target A changed, but target B is the same, you’ll immediately get back the result for B. Any intermediate work also gets cached.
--
It’s still technically experimental. However, we’ve been using the V2 test runner in our internal CI for the past three months (along with remote execution for much higher parallelism)
We recommend upgrading to the newest release of Pants for a better experience with the V2 test runner. We’re frequently making improvements, including a couple improvements that will go out in this weekend’s dev release.plain-sundown-25537
01/10/2020, 8:33 AMplain-sundown-25537
01/10/2020, 8:34 AMplain-sundown-25537
01/10/2020, 8:40 AMhundreds-father-404
01/10/2020, 4:15 PM./pants --v2 test
, then you would end up running your Python tests with both V1 and V2 because we provide an implementation for both.
What I do is have a script called ./v2
that just does this:
export PANTS_V1=false
export PANTS_V2=true
./pants "$@"
When I want V1, I say ./pants test
and when I want V2 I say ./v2 test
—
pytest_run.py
is the V1 task. This is the V2 file: <https://github.com/pantsbuild/pants/blob/master/src/python/pants/backend/python/rules/python_test_runner.py>
--
We don’t yet have V2 support for nodejs, but it’s in the medium term roadmap!hundreds-father-404
01/10/2020, 4:16 PM[GLOBAL]
backend_packages2: +['pants.backend.python']
happy-kitchen-89482
01/10/2020, 9:15 PMwitty-crayon-22786
01/10/2020, 11:56 PMwitty-crayon-22786
01/10/2020, 11:56 PM