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

Make toolchain acceptance tests work with latest Bazel build CI pipeline #1062

Merged
merged 3 commits into from
Feb 11, 2023

Commits on Feb 11, 2023

  1. Make toolchain acceptance tests work with latest Bazel build CI pipel…

    …ine.
    
    The latest Bazel build continous integration testing pipeline sets
    several flags and environment variables that end up interfering with
    each other:
     * `--sandbox_tmpfs_path=/tmp`
     * `--test_env=USE_BAZEL_VERSION`
     * `USE_BAZEL_VERSION=/tmp/<something>`
     * And Bazelisk is used to run Bazel
    
    What happens is `USE_BAZEL_VERSION` points to Bazel in /tmp, but then
    the `--sandbox_tmpfs_path` flag prevents it from being readable. Later,
    when a test wants to run Bazel, Bazelisk is invoked. It is able to see
    that it should use a custom Bazel binary because of `--test_env`, but
    then can't read the file because of `--sandbox_tmpfs_path`, so then
    fails.
    
    To fix, make the test runner that will run `bazel` unset
    `USE_BAZEL_VERSION` so Bazelisk doesn't try to use it.
    
    This also exposed an issue with Bazelisk demanding a cache directory be
    specified, so set that environment variable to the test's temp dir to
    keep Bazelisk happy.
    
    Fixes #856
    rickeylev committed Feb 11, 2023
    Configuration menu
    Copy the full SHA
    1fc4959 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    733d53e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    af617b2 View commit details
    Browse the repository at this point in the history