Skip to content

Make various tests pass on MacOS ARM#21032

Merged
benjyw merged 1 commit intopantsbuild:mainfrom
benjyw:fix_platform_specific_tests
Jun 8, 2024
Merged

Make various tests pass on MacOS ARM#21032
benjyw merged 1 commit intopantsbuild:mainfrom
benjyw:fix_platform_specific_tests

Conversation

@benjyw
Copy link
Copy Markdown
Contributor

@benjyw benjyw commented Jun 8, 2024

We don't run tests on this platform in CI (and we only run a subset of
tests on any platform other than Linux x86_64).

Therefore some tests have rotted on that platform. This PR fixes them.

See #20993 for more.

@benjyw benjyw added the category:internal CI, fixes for not-yet-released features, etc. label Jun 8, 2024
"algorithm": "sha256",
"hash": "c286cf298426064079ed96a9e4a9d39e7f3e9bf15ba60701e95f5492f28415c7",
"url": "https://files.pythonhosted.org/packages/21/a6/35f83efec687615c711fe0a09b67e58f6d1254db27b1013119de46f450bd/gitdb-4.0.10-py3-none-any.whl"
"hash": "81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting the flake8 integration test to pass just required a newer lockfile.

args = [
"--backend-packages=['pants.backend.python', 'pants.backend.python.providers.experimental.pyenv']",
"--source-root-patterns=['src']",
"--pyenv-python-provider-installation-extra-env-vars=['HOME']",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing Python 2.7 via pyenv requires access to brew (to get a compatible openssl), and brew only runs if HOME is set.

"""
target_name = "in_folder"
versions = ["3.2.1", "3.0.0"]
versions = ["3.2.1", "3.2.2"]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.0.0 is not available on MacOS ARM, so we now conflict two more recent versions in the test.


def test_resolve_image_id(rule_runner: RuleRunner) -> None:
platform = Platform.create_for_localhost()
platform = Platform.create_for_localhost().for_linux()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-explanatory I hope.

@benjyw benjyw requested review from huonw and thejcannon June 8, 2024 01:48
@benjyw benjyw force-pushed the fix_platform_specific_tests branch from df12158 to e89ad85 Compare June 8, 2024 01:56
Copy link
Copy Markdown
Contributor

@huonw huonw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working through these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:internal CI, fixes for not-yet-released features, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants