mirror of
https://github.com/golang/go
synced 2024-11-07 00:46:20 -07:00
850357681a
Govim integration tests generate a number of artifacts, including both the govim and gopls logs, that can be useful in debugging failures. This change updates our cloud build configuration to capture these artifacts, along with several other minor improvements. Notably artifacts are uploaded to GCS as a separate build step, so that we have the potential to use its granular permission model for sharing these artifacts. Right now, this requires temporarily swallowing the exit code of `go test` so that the build can proceed. Also: - Update govim to a newer version; we still can't use latest as there isn't a tagged version that contains the requisite flag change. - Alter the test harness to run tests from the github.com/govim/govim module root. - Switch use a major version label when referring to the test harness build step, to allow for breaking changes (such as the one made here). - Add a missing copyright header to run_local.sh. - Update run_local.sh to work with the modified harness. - Update documentation accordingly. Change-Id: Ie5ddaf54e775371a36163f98c1beb90c217be931 Reviewed-on: https://go-review.googlesource.com/c/tools/+/214577 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
35 lines
1.1 KiB
Markdown
35 lines
1.1 KiB
Markdown
# govim integration tests
|
|
|
|
Files in this directory configure Cloud Build to run [govim] integration tests
|
|
against a gopls binary built from source.
|
|
|
|
## Running on GCP
|
|
|
|
To run these integration tests in Cloud Build, use the following steps. Here
|
|
we assume that `$PROJECT` is a valid GCP project and `$BUCKET` is a cloud
|
|
storage bucket owned by that project.
|
|
|
|
- `cd` to the root directory of the tools project.
|
|
- (at least once per GCP project) Build the test harness:
|
|
```
|
|
$ gcloud builds submit \
|
|
--project="${PROJECT}" \
|
|
--config=gopls/integration/govim/cloudbuild.harness.yaml \
|
|
--substitutions=_RESULT_BUCKET="${BUCKET}"
|
|
```
|
|
- Run the integration tests:
|
|
```
|
|
$ gcloud builds submit \
|
|
--project="${PROJECT}" \
|
|
--config=gopls/integration/govim/cloudbuild.yaml \
|
|
--substitutions=_RESULT_BUCKET="${BUCKET}"
|
|
```
|
|
|
|
## Running locally
|
|
|
|
Run `gopls/integration/govim/run_local.sh`. This may take a while the first
|
|
time it is run, as it will require building the test harness. Currently this
|
|
script assumes that docker may be executed without `sudo`.
|
|
|
|
[govim]: https://github.com/govim/govim
|