xref: /aosp_15_r20/external/bazelbuild-rules_go/tests/core/runfiles/README.rst (revision 9bb1b549b6a84214c53be0924760be030e66b93a)
1Runfiles functionality
2=====================
3
4runfiles_tests
5--------------
6
7Checks that functions in ``//go/tools/bazel:go_default_library`` that
8provide access to runfiles behave correctly. In particular, this checks:
9
10* ``Runfile`` works for regular files.
11* ``FindBinary`` works for binaries.
12* ``ListRunfiles`` lists all expected files.
13* These functions work for runfiles in the local workspace and for files in
14  external repositories (``@runfiles_remote_test`` is a ``local_repository``
15  that points to a subdirectory here).
16* These functions work in tests invoked with ``bazel test`` and
17  binaries invoked with ``bazel run``.
18* These functions work on Windows and other platforms. Bazel doesn't
19  create a symlink tree for runfiles on Windows since symbolic links
20  can't be created without administrative privilege by default.
21
22TODO: Verify binary behavior in CI. The ``local_bin`` and ``remote_bin``
23targets verify behavior for binaries, but they are not tests.
24