powerful-eye-58407
06/30/2023, 9:41 AMpants test ::
to run unittests only, (so, for example, all tests not marked with tag='integration_test'), using certain set of env variables, and produce coverage. Right now env and coverage is configured in pants.toml using:
[test]
use_coverage = true
extra_env_vars = ...
⢠I want pants --tag=integration_test list ::
to run all integration tests only, with NO coverate, and with DIFFERENT environment variables config.
Now, I know that I can probably achieve different environment variables configurations using different environments, and I can turn off coverage using --test-use-coverage=false
for integration tests. That's fine, since they will be run by some bash script anyway, so I can live with complicated command to run them š
But is there a way for pants test ::
to skip integration tests by default, or use some default tag without developers having to specify pants test --tag="-integration_test" ::
to skip them?
Thanks!powerful-eye-58407
06/30/2023, 9:47 AMpowerful-eye-58407
06/30/2023, 9:47 AMgorgeous-winter-99296
06/30/2023, 9:59 AMrun-gpu = "--python-default-resolve=gpu run"
run-cpu = "--python-default-resolve=cpu run"
powerful-eye-58407
06/30/2023, 11:47 AMpowerful-eye-58407
06/30/2023, 11:47 AMpowerful-eye-58407
06/30/2023, 11:47 AMgorgeous-winter-99296
06/30/2023, 1:34 PMpants test integration-tests
, where integration-tests expand to some flags/args. From the next version of Pants I've also added support for creating alias-like flags; so you could say pants test --integration
and pants test --unit
using aliases, for example.