Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tests for BinaryPaths. #10770

Merged
merged 2 commits into from
Sep 13, 2020
Merged

Commits on Sep 13, 2020

  1. Support tests for BinaryPaths.

    A BinaryPathRequest can now include a test to run against each found
    binary to validate it works and optionally fingerprint it. Eventually
    fingerprinting the binary contents should be performed automatically
    and the optional test fingerprint mixed in with it when present as
    tracked by pantsbuild#10769.
    
    We leverage testing found binaries in PexEnvironment to ensure we find
    only interpreter paths compatible with Pex bootstrapping. This plugs an
    existing hole not yet encountered in the wild where a Python 2.6 binary
    (for example) could be chosen and then PEX file bootstrapping fail as a
    result. We additionally fingerprint interpreters passing the version
    range test to ensure we detect interpreter upgrades and pyenv shim
    switches. Even with the automatic hashing of binaries tracked in pantsbuild#10769
    working, we'd still need to do this in the pyenv shim case since the
    same shim script can redirect to different interpreters depending on
    configuration external to the shim script.
    
    # Rust tests and lints will be skipped. Delete if not intended.
    [ci skip-rust]
    
    # Building wheels and fs_util will be skipped. Delete if not intended.
    [ci skip-build-wheels]
    jsirois committed Sep 13, 2020
    Configuration menu
    Copy the full SHA
    6647fc8 View commit details
    Browse the repository at this point in the history
  2. Fix find_binary test execution to be uncacheable and add docs.

    # Rust tests and lints will be skipped. Delete if not intended.
    [ci skip-rust]
    
    # Building wheels and fs_util will be skipped. Delete if not intended.
    [ci skip-build-wheels]
    jsirois committed Sep 13, 2020
    Configuration menu
    Copy the full SHA
    ada70a7 View commit details
    Browse the repository at this point in the history