diff options
author | Spandan Das <spandandas@google.com> | 2023-06-15 02:30:50 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-06-15 02:30:50 +0000 |
commit | 9bb1b549b6a84214c53be0924760be030e66b93a (patch) | |
tree | d9fac15bb5a835ae6ba757dc5eaf6ef597ea44cf /tests/core/go_binary/README.rst | |
parent | 9803cf8403d7105bddc1d5304d6e694b781a6605 (diff) | |
parent | 780ccd3956961690db3e36d8fa1ed7649cb0057b (diff) | |
download | bazelbuild-rules_go-9bb1b549b6a84214c53be0924760be030e66b93a.tar.gz |
Merge remote-tracking branch 'aosp/upstream-master' into merge_rules_go am: 49dcd02124 am: 711a453236 am: 6cf433ad1b am: de80525bba am: 96939a977e am: 780ccd3956HEADandroid-14.0.0_r51android-14.0.0_r50android-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android-14.0.0_r28mastermainandroid14-qpr3-releaseandroid14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_go/+/2625353
Change-Id: Id4ca3195d832eca77b29b2896b89027d847bb72d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tests/core/go_binary/README.rst')
-rw-r--r-- | tests/core/go_binary/README.rst | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/core/go_binary/README.rst b/tests/core/go_binary/README.rst new file mode 100644 index 00000000..a01bdf60 --- /dev/null +++ b/tests/core/go_binary/README.rst @@ -0,0 +1,70 @@ +Basic go_binary functionality +============================= + +.. _go_binary: /docs/go/core/rules.md#_go_binary +.. _#2168: https://github.com/bazelbuild/rules_go/issues/2168 +.. _#2463: https://github.com/bazelbuild/rules_go/issues/2463 + +Tests to ensure the basic features of go_binary are working as expected. + +hello +----- + +Hello is a basic "hello world" program that doesn't do anything interesting. +Useful as a primitive smoke test -- if this doesn't build, nothing will. + +out_test +-------- + +Tests that a `go_binary`_ rule can write its executable file with a custom name +in the package directory (not the mode directory). + +package_conflict_test +--------------------- + +Tests that linking multiple packages with the same path (`importmap`) is an +error. + +goos_pure_bin +------------- + +Tests that specifying the `goos` attribute on a `go_binary`_ target to be +different than the host os forces the pure mode to be on. This is achieved +by including a broken cgo file in the sources for the build. + +many_deps +--------- + +Test that a `go_binary`_ with many imports with long names can be linked. This +makes sure we don't exceed command-line length limits with -I and -L flags. +Verifies #1637. + +stamp_test +---------- +Test that the `go_binary`_ ``x_defs`` attribute works correctly, both in a +binary and in an embedded library. Tests regular stamps and stamps that +depend on values from the workspace status script. Verifies #2000. + +pie_test +-------- +Tests that specifying the ``linkmode`` attribute on a `go_binary`_ target to be +pie produces a position-independent executable and that no specifying it produces +a position-dependent binary. + +static_test +----------- +Test that `go_binary`_ rules with ``static = "on"`` with and without cgo +produce static binaries. Verifies `#2168`_. + +This test only runs on Linux. The darwin external linker cannot produce +static binaries since there is no static version of C runtime libraries. + +tags_bin +-------- +Checks that setting ``gotags`` affects source filtering. This binary won't build +without a specific tag being set. + +prefix +------ +This binary has a name that conflicts with a subdirectory. Its output file +name should not have this conflict. Verifies `#2463`_. |