[roll] Roll fuchsia [bazel_sdk][tests] Fix Python3 runtime dependencies.

This CL fixes how python-based tests are generated by ensuring
that they use the current Python toolchain runtime, instead of
blinding relying on `python3` being available in PATH, which failed
when these tests are run remotely, on builders which do not have
it installed.

This fixes 17 failing tests when running
`fx build bazel_sdk_tests_x64` with
`enable_bazel_remote_rbe = true` in args.gn.

This is done in the following way:

- py_test_utils.bzl: Ensure the definition of the `_py_toolchain`
  attribute within PY_TOOLCHAIN_DEPS includes a `providers` list
  that allows access to the current PyRuntimeInfo provider.

  Provide create_python3_shell_wrapper_provider(), which will
  generate a DefaultInfo value for the generated launcher
  shell script, and associated runtime requirements.

  The PyRuntimeInfo is accessed there, to ensure that the
  generated script invokes the resolved Python3 executable,
  and that the runfiles will include the runtime's own
  files as well. This ensures that the test can run remotely.

  Remove the obsolete populate_py_test_sh_script() function.

- json_validator.bzl: Add create_validation_script_provider()
  that uses create_python3_shell_wrapper_provider() under the
  hood, and which also returns a DefaultInfo value.

  Remote the obsolete create_validation_script() function.

- Update all callers of populate_py_test_sh_script() or
  create_validation_script() to use
  create_python3_shell_wrapper_provider() or
  create_validation_script_provider(), respectively.

+ make_file.bzl: Minor formatting fix.

- fuchsia/licenses/review/BUILD.bazel,
  tools/licenses/BUILD.bazel: Add `tags = [ "no-remote" ]`
  to ensure these py_test() targets are always run
  locally, as running them remotely fails because the
  runfiles do not export the python toolchain files
  correctly (see b/319458863 for details), an issue
  that will be addressed separately.

Original-Bug: b/317291511
Original-Bug: b/319458863
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/971994
Original-Revision: e4a0a979fee9e330241e37859074c7b6a7ad2cdb
GitOrigin-RevId: f4460d66810e5058fe9cfea6e50a411a16197354
Change-Id: Iedddf2cb96a34b6ee3c1603265bd7387b8bb3378
1 file changed
tree: d51b7a8441387a4287166be15e282868d1ddab26
  1. git-hooks/
  2. infra/
  3. third_party/
  4. cts
  5. firmware
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
  14. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.