[run_tests] Ignore dangling symlinks.

This replicates the CAS library's archive behavior when the
TreeSymlinkOpts.FollowsTarget is true. [1]

During runfiles collection some of the runfiles directories for python
targets contains a dangling symlink.
Specifically $execroot/$target.runfiles/_repo_mapping is a dangling
symlink referencing $execroot/$target.repo_mapping.

[1]: https://github.com/bazelbuild/remote-apis-sdks/blob/bcc51f0/go/pkg/client/tree.go#L69

Bug: 321267689
Change-Id: I0b07ae7cba3073dd0aac32bd0bb2ca4bcf4c1e10
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia-infra-bazel-rules/+/1016213
Reviewed-by: Oliver Newman <olivernewman@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Fuchsia-Auto-Submit: Darren Chan <chandarren@google.com>
1 file changed
tree: 46395d51dd091094b6afa8c4fb79517d6094db0b
  1. cipd/
  2. config/
  3. infra/
  4. manifests/
  5. scripts/
  6. shac/
  7. tests/
  8. third_party/
  9. .bazelrc
  10. .gitignore
  11. .gitmodules
  12. AUTHORS
  13. BUILD.bazel
  14. CONTRIBUTING.md
  15. LICENSE
  16. OWNERS
  17. PATENTS
  18. README.md
  19. WORKSPACE.bazel
  20. workspace.bzl
README.md

Fuchsia Infra Bazel Rules

This repository provides tools and Bazel rules for helping projects integrate with Fuchsia's CI infrastructure.