From 036c61aceeb1db5aca7ee763cfcc3103bd33d31d Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Mon, 4 Nov 2024 12:37:16 +1100 Subject: [PATCH] Add platform_specific_behavior tag to test targets that use mark (#21609) This PR adds the `platform_specific_behavior` tag to the `python_test` targets of 4 additional test files in this repo. These test files use this repo's custom `pytest.mark.platform_specific_behavior` mark to indicate tests are high-value to test on non-Linux-x86_64 platforms. However, they were not being run in CI because the testing invocation uses both Pants-level tag and Pytest-level mark filtering: `./pants --tag=+platform_specific_behavior test :: -- -m platform_specific_behavior`. This PR fixes the current problems identified in #21608, but doesn't stop us from making the same mistakes in future (and thus doesn't close that ticket). --- src/python/pants/backend/build_files/fmt/black/BUILD | 9 ++++++++- src/python/pants/backend/build_files/fmt/ruff/BUILD | 9 ++++++++- src/python/pants/backend/build_files/fmt/yapf/BUILD | 9 ++++++++- src/python/pants/backend/sql/lint/sqlfluff/BUILD | 5 +++++ 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/python/pants/backend/build_files/fmt/black/BUILD b/src/python/pants/backend/build_files/fmt/black/BUILD index 27e5628650a..d9182f9e967 100644 --- a/src/python/pants/backend/build_files/fmt/black/BUILD +++ b/src/python/pants/backend/build_files/fmt/black/BUILD @@ -3,4 +3,11 @@ python_sources() -python_tests(name="tests") +python_tests( + name="tests", + overrides={ + "integration_test.py": { + "tags": ["platform_specific_behavior"], + } + }, +) diff --git a/src/python/pants/backend/build_files/fmt/ruff/BUILD b/src/python/pants/backend/build_files/fmt/ruff/BUILD index 07f7329832d..04afba87e92 100644 --- a/src/python/pants/backend/build_files/fmt/ruff/BUILD +++ b/src/python/pants/backend/build_files/fmt/ruff/BUILD @@ -3,4 +3,11 @@ python_sources() -python_tests(name="tests") +python_tests( + name="tests", + overrides={ + "integration_test.py": { + "tags": ["platform_specific_behavior"], + } + }, +) diff --git a/src/python/pants/backend/build_files/fmt/yapf/BUILD b/src/python/pants/backend/build_files/fmt/yapf/BUILD index 27e5628650a..d9182f9e967 100644 --- a/src/python/pants/backend/build_files/fmt/yapf/BUILD +++ b/src/python/pants/backend/build_files/fmt/yapf/BUILD @@ -3,4 +3,11 @@ python_sources() -python_tests(name="tests") +python_tests( + name="tests", + overrides={ + "integration_test.py": { + "tags": ["platform_specific_behavior"], + } + }, +) diff --git a/src/python/pants/backend/sql/lint/sqlfluff/BUILD b/src/python/pants/backend/sql/lint/sqlfluff/BUILD index ec82190fe5b..8d68558a9ac 100644 --- a/src/python/pants/backend/sql/lint/sqlfluff/BUILD +++ b/src/python/pants/backend/sql/lint/sqlfluff/BUILD @@ -8,4 +8,9 @@ python_sources( python_tests( name="tests", + overrides={ + "rules_integration_test.py": { + "tags": ["platform_specific_behavior"], + } + }, )