https://pantsbuild.org/ logo
#general
Title
# general
a

ambitious-xylophone-5772

11/01/2022, 6:03 PM
Hi all! Just recently bumped up my project to use pants 2.14.0 from 2.13.0 and I’m trying to use the
xdist_enabled
option. I’ve set it to be true in
pants.toml
, but I’m not exactly sure if my tests are being run in parallel underneath. Checking
htop
isn’t really giving me an indication
s

sparse-lifeguard-95737

11/01/2022, 6:23 PM
you might be able to tell by running
ps ax | grep pex
and looking for usage of the
-n
flag
👀 1
the pants engine will limit the parallelism allocated to xdist based on the total number of processes scheduled at a time, so even if it’s enabled you might end up with all
-n 1
if the engine schedules a ton of concurrent processes 😕
Pants 2.15 will be adding support for testing multiple python files in a single
pytest
process - I haven’t tried combining it with xdist yet, but I’m hopeful the two together will behave like most people expect
a

ambitious-xylophone-5772

11/01/2022, 6:35 PM
Yeah I do have a ton of pytest files so it’s possible that I’m not getting as much parallelism as I may have hoped
Thanks @sparse-lifeguard-95737, I didn’t think of using
ps ax
, seems like it is
-n 1
h

happy-kitchen-89482

11/01/2022, 6:48 PM
If you run
./pants test --output=all ...
you’ll see all the pytest output, so that should tell you?
👀 1
7 Views