Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for GOCOVERDIR (0.15 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/cmd/go/testdata/script/cover_list.txt

    # m/example package. Build IDs from binaries are of the form X/Y/Z/W
    # where Y/Z is the package build ID; running the program below will
    # pick out the parts of the ID that we want.
    env GOCOVERDIR=$WORK
    exec $WORK/m.exe $WORK/rawtoolbuildid.txt
    cp stdout $WORK/toolbuildid.txt
    
    # Build IDs should match here.
    cmp $WORK/toolbuildid.txt $WORK/listbuildid.txt
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 22:47:28 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  10. src/cmd/covdata/doc.go

    from 2nd-generation coverage testing output files, those produced
    from running applications or integration tests. E.g.
    
    	$ mkdir ./profiledir
    	$ go build -cover -o myapp.exe .
    	$ GOCOVERDIR=./profiledir ./myapp.exe <arguments>
    	$ ls ./profiledir
    	covcounters.cce1b350af34b6d0fb59cc1725f0ee27.821598.1663006712821344241
    	covmeta.cce1b350af34b6d0fb59cc1725f0ee27
    	$
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 03 12:57:25 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top