Skip to content

testing: start test log for caching before TestMain #24122

@bakatz

Description

@bakatz

What version of Go are you using (go version)?

go version go1.10 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ben\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\ben\dev\go
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\ben\AppData\Local\Temp\go-build167965298=/tmp/go-build -gno-record-gcc-switches

What did you do?

  1. Create a test_something.go file whose tests require a main_test.go file for setup/teardown
  2. Create several tests in test_something.go
  3. Run all of the tests
  4. Observe that the code in main_test is executed
  5. Change a non-go file that the test depends on

What did you expect to see?

main_test is executed again and a cache miss occurs.

What did you see instead?

main_test is not executed again and a cache hit occurs. See https://github.com/bakatz/golangissue21422 for more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions