mirror of
https://github.com/golang/go
synced 2024-11-05 19:36:10 -07:00
4abfd4a162
Now that there is a tagged version of govim containing the `-gopls` test flag, we can just use latest to pick up a relatively stable govim, and not have to maintain the govim version. Doing this required changing the way we fetch govim into our test harness: there is now the assumption that /src/govim is a git repository, so we clone using git. Along the way, clean up some unnecessary artifacts and add a script for downloading artifacts from GCS. Change-Id: I6ef4dd468d6b9baf66d3adae3f1fb80c12ac9578 Reviewed-on: https://go-review.googlesource.com/c/tools/+/217730 Reviewed-by: Rebecca Stambler <rstambler@golang.org>
29 lines
1.2 KiB
Bash
Executable File
29 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright 2020 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
# This script runs govim integration tests but always succeeds, instead writing
|
|
# their result to a file so that any test failure can be deferred to a later
|
|
# build step. We do this so that we can capture govim test artifacts regardless
|
|
# of the test results.
|
|
|
|
# Substitute the locally built gopls binary for use in govim integration tests.
|
|
go test ./cmd/govim -gopls /workspace/gopls/gopls
|
|
|
|
# Stash the error, for use in a later build step.
|
|
echo "exit $?" > /workspace/govim_test_result.sh
|
|
|
|
# Clean up unnecessary artifacts. This is based on govim/_scripts/tidyUp.bash.
|
|
# Since we're fetching govim using the go command, we won't have this non-go
|
|
# source directory available to us.
|
|
if [[ -n "$GOVIM_TESTSCRIPT_WORKDIR_ROOT" ]]; then
|
|
echo "Cleaning up build artifacts..."
|
|
# Make artifacts writable so that rm -rf doesn't complain.
|
|
chmod -R u+w "$GOVIM_TESTSCRIPT_WORKDIR_ROOT"
|
|
|
|
# Remove directories we don't care about.
|
|
find "$GOVIM_TESTSCRIPT_WORKDIR_ROOT" -type d \( -name .vim -o -name gopath \) -prune -exec rm -rf '{}' \;
|
|
fi
|