- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for GOCOVERDIR (1.81 sec)
-
src/cmd/go/testdata/script/cover_build_simple.txt
[race] go build -o examplewithrace.exe -race -cover example/main & wait # First execute without GOCOVERDIR set... env GOCOVERDIR= exec ./example.exe normal stderr '^warning: GOCOVERDIR not set, no coverage data emitted' # ... then with GOCOVERDIR set. env GOCOVERDIR=data/normal exec ./example.exe normal ! stderr '^warning: GOCOVERDIR not set, no coverage data emitted' go tool covdata percent -i=data/normal
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 28 11:50:58 UTC 2022 - 3.1K bytes - Viewed (0) -
src/cmd/go/testdata/script/cover_build_cmdline_pkgs.txt
# Build a stdlib command with coverage. go build -o $WORK/nm.exe -cover cmd/nm # Save off old GOCOVERDIR setting env SAVEGOCOVERDIR=$GOCOVERDIR # Collect a coverage profile from running 'cmd/nm' on the object. mkdir $WORK/covdata env GOCOVERDIR=$WORK/covdata exec $WORK/nm.exe tiny.o # Restore previous GOCOVERDIR setting env GOCOVERDIR=$SAVEGOCOVERDIR # Check to make sure we instrumented just the main package, not
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 11:36:17 UTC 2023 - 1.5K bytes - Viewed (0) -
src/testing/internal/testdeps/deps.go
} func coverTearDown(coverprofile string, gocoverdir string) (string, error) { var err error if gocoverdir == "" { gocoverdir, err = os.MkdirTemp("", "gocoverdir") if err != nil { return "error setting GOCOVERDIR: bad os.MkdirTemp return", err } defer os.RemoveAll(gocoverdir) } CoverMarkProfileEmittedFunc(true) cmode := CoverMode
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 14:01:23 UTC 2024 - 6.2K bytes - Viewed (0) -
src/cmd/go/testdata/script/cover_main_import_path.txt
# Build this program with -cover and run to collect a profile. go build -cover -o $WORK/prog.exe . # Save off old GOCOVERDIR setting env SAVEGOCOVERDIR=$GOCOVERDIR mkdir $WORK/covdata env GOCOVERDIR=$WORK/covdata exec $WORK/prog.exe # Restore previous GOCOVERDIR setting env GOCOVERDIR=$SAVEGOCOVERDIR # Report percent lines covered. go tool covdata percent -i=$WORK/covdata stdout '\s*mainwithtest\s+coverage:'
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 11:36:17 UTC 2023 - 1.1K bytes - Viewed (0) -
src/cmd/go/testdata/script/cover_build_pkg_select.txt
# Build for coverage. go build -mod=mod -o $WORK/modex.exe -cover mod.example/main # Save off old GOCOVERDIR setting env SAVEGOCOVERDIR=$GOCOVERDIR # Execute. mkdir $WORK/covdata env GOCOVERDIR=$WORK/covdata exec $WORK/modex.exe # Restore previous GOCOVERDIR setting env GOCOVERDIR=$SAVEGOCOVERDIR # Examine the result. go tool covdata percent -i=$WORK/covdata stdout 'coverage: 100.0% of statements'
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 28 11:50:58 UTC 2022 - 2.7K bytes - Viewed (0) -
src/testing/newcover.go
mode string tearDown func(coverprofile string, gocoverdir string) (string, error) snapshotcov func() float64 } // registerCover2 is invoked during "go test -cover" runs. // It is used to record a 'tear down' function // (to be called when the test is complete) and the coverage mode. func registerCover2(mode string, tearDown func(coverprofile string, gocoverdir string) (string, error), snapcov func() float64) { if mode == "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:58:07 UTC 2024 - 1.6K bytes - Viewed (0) -
src/internal/coverage/cfile/emitdata_test.go
// gocoverdir. func upmergeCoverData(t *testing.T, gocoverdir string, mode string) { if testing.CoverMode() != mode { return } testGoCoverDir := os.Getenv("GOCOVERDIR") if testGoCoverDir == "" { return } args := []string{"tool", "covdata", "merge", "-pkg=runtime/coverage", "-o", testGoCoverDir, "-i", gocoverdir}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.3K bytes - Viewed (0) -
src/internal/coverage/cfile/emit.go
} if len(ml) == 0 { fmt.Fprintf(os.Stderr, "program not built with -cover\n") return } goCoverDir = os.Getenv("GOCOVERDIR") if goCoverDir == "" { fmt.Fprintf(os.Stderr, "warning: GOCOVERDIR not set, no coverage data emitted\n") return } if err := emitMetaDataToDirectory(goCoverDir, ml); err != nil { fmt.Fprintf(os.Stderr, "error: coverage meta-data emit failed: %v\n", err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:57:47 UTC 2024 - 18.9K bytes - Viewed (0) -
src/cmd/go/internal/test/internal/genflags/testflag.go
var name string var found bool if name, found = strings.CutPrefix(f.Name, "test."); !found { return } switch name { case "testlogfile", "paniconexit0", "fuzzcachedir", "fuzzworker", "gocoverdir": // These flags are only for use by cmd/go. default: names = append(names, name) } }) return names
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 09 13:37:58 UTC 2023 - 759 bytes - Viewed (0) -
src/internal/coverage/cfile/ts_test.go
"internal/goexperiment" "internal/testenv" "os" "os/exec" "path/filepath" "strings" "testing" _ "unsafe" ) func testGoCoverDir(t *testing.T) string { if f := flag.Lookup("test.gocoverdir"); f != nil { if dir := f.Value.String(); dir != "" { return dir } } return t.TempDir() } // TestTestSupport does a basic verification of the functionality in
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:58:07 UTC 2024 - 5.2K bytes - Viewed (0)