2019-12-18 12:55:07 -07: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
|
|
|
|
|
2020-01-13 13:22:19 -07:00
|
|
|
To run these integration tests in Cloud Build, use the following steps. Here
|
2020-02-04 18:14:12 -07:00
|
|
|
we assume that `$PROJECT_ID` is a valid GCP project and `$BUCKET` is a cloud
|
2020-01-13 13:22:19 -07:00
|
|
|
storage bucket owned by that project.
|
2019-12-18 12:55:07 -07:00
|
|
|
|
|
|
|
- `cd` to the root directory of the tools project.
|
2020-01-13 13:22:19 -07:00
|
|
|
- (at least once per GCP project) Build the test harness:
|
2019-12-18 12:55:07 -07:00
|
|
|
```
|
2020-01-13 13:22:19 -07:00
|
|
|
$ gcloud builds submit \
|
2020-02-04 18:14:12 -07:00
|
|
|
--project="${PROJECT_ID}" \
|
2020-01-13 13:22:19 -07:00
|
|
|
--config=gopls/integration/govim/cloudbuild.harness.yaml \
|
|
|
|
--substitutions=_RESULT_BUCKET="${BUCKET}"
|
2019-12-18 12:55:07 -07:00
|
|
|
```
|
2020-01-13 13:22:19 -07:00
|
|
|
- Run the integration tests:
|
2019-12-18 12:55:07 -07:00
|
|
|
```
|
2020-01-13 13:22:19 -07:00
|
|
|
$ gcloud builds submit \
|
2020-02-04 18:14:12 -07:00
|
|
|
--project="${PROJECT_ID}" \
|
2020-01-13 13:22:19 -07:00
|
|
|
--config=gopls/integration/govim/cloudbuild.yaml \
|
|
|
|
--substitutions=_RESULT_BUCKET="${BUCKET}"
|
2019-12-18 12:55:07 -07:00
|
|
|
```
|
|
|
|
|
2020-02-04 18:14:12 -07:00
|
|
|
## 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.
|
|
|
|
|
2019-12-18 12:55:07 -07:00
|
|
|
## 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
|