diff --git a/_scripts/dockerRun.sh b/_scripts/dockerRun.sh index cd6f4bca1..e720691e0 100755 --- a/_scripts/dockerRun.sh +++ b/_scripts/dockerRun.sh @@ -36,6 +36,9 @@ go install golang.org/x/tools/gopls # remove all generated files to ensure we are never stale rm -f $(git ls-files -- ':!:cmd/govim/internal/golang_org_x_tools' '**/gen_*.*' 'gen_*.*') .travis.yml +# run the install scripts +export GOVIM_RUN_INSTALL_TESTSCRIPTS=true + go generate $(go list ./... | grep -v 'govim/internal/golang_org_x_tools') go test $(go list ./... | grep -v 'govim/internal/golang_org_x_tools') diff --git a/cmd/govim/main_test.go b/cmd/govim/main_test.go index 9f828125b..679faa25c 100644 --- a/cmd/govim/main_test.go +++ b/cmd/govim/main_test.go @@ -26,6 +26,10 @@ import ( "github.com/rogpeppe/go-internal/testscript" ) +const ( + EnvInstallScripts = "GOVIM_RUN_INSTALL_TESTSCRIPTS" +) + var ( fDebugLog = flag.Bool("debugLog", false, "Whether to log debugging info from vim, govim and the test shim") fGoplsPath = flag.String("gopls", "", "Path to the gopls binary for use in scenario tests. If unset, gopls is built from a tagged version.") @@ -199,8 +203,8 @@ func TestScripts(t *testing.T) { } func TestInstallScripts(t *testing.T) { - if testing.Short() { - t.Skip("Install scripts are long-running") + if os.Getenv(EnvInstallScripts) != "true" { + t.Skipf("Skipping install scripts; %v != true", EnvInstallScripts) } govimPath := strings.TrimSpace(runCmd(t, "go", "list", "-m", "-f={{.Dir}}"))