1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:14:46 -07:00
go/gopls/integration/govim
Robert Findley 542909fd99 internal/lsp/cmd: partially revert "add a flag to disable telemetry"
This reverts commit 17a19b5fe7. The revert
is partial because that change also added the -short flag when running
govim tests, which we preserve as without this the tests often time-out
(and I don't want to increase our test timeout right now).

Reason for revert: telemetry races have been fixed in https://golang.org/cl/226317

Change-Id: I5fcf034c1fe6e2db48994e2f06b73a593c779e54
Reviewed-on: https://go-review.googlesource.com/c/tools/+/231637
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-05-01 20:57:27 +00:00
..
artifacts.go internal/lsp: fix errors found by staticcheck 2020-03-19 19:20:54 +00:00
cloudbuild.harness.yaml gopls/integration/govim: switch to latest, and improve artifacts 2020-02-05 14:18:39 +00:00
cloudbuild.yaml gopls/integration/govim: fix govim tests without a go.mod file 2020-03-30 17:32:57 +00:00
Dockerfile gopls/integration/govim: revert back to using the latest govim 2020-03-31 02:57:13 +00:00
README.md gopls/integration/govim: improvements/fixes for run_local.sh 2020-03-25 20:25:52 +00:00
run_local.sh gopls/integration/govim: improvements/fixes for run_local.sh 2020-03-25 20:25:52 +00:00
run_tests_for_cloudbuild.sh internal/lsp/cmd: partially revert "add a flag to disable telemetry" 2020-05-01 20:57:27 +00:00

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_ID 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_ID}" \
	--config=gopls/integration/govim/cloudbuild.harness.yaml
  • Run the integration tests:
$ gcloud builds submit \
	--project="${PROJECT_ID}" \
	--config=gopls/integration/govim/cloudbuild.yaml \
	--substitutions=_RESULT_BUCKET="${BUCKET}"

Fetching Artifacts

Assuming the artifacts bucket is world readable, you can fetch integration from GCS. They are located at:

  • logs: https://storage.googleapis.com/${BUCKET}/log-${EVALUATION_ID}.txt
  • artifact tarball: https://storage.googleapis.com/${BUCKET}/govim/${EVALUATION_ID}/artifacts.tar.gz

The artifacts.go command can be used to fetch both artifacts using an evaluation id.

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. This script accepts two flags to modify its behavior:

--sudo: run docker with sudo --short: run go test -short