Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for HasGoBuild (0.29 sec)

  1. src/internal/testenv/testenv_test.go

    			// The -noopt builder sets GO_GCFLAGS, which causes tests of 'go build' to
    			// be skipped.
    			t.Logf("HasGoBuild is false on %s", b)
    			return
    		}
    
    		t.Fatalf("HasGoBuild unexpectedly false on %s", b)
    	}
    
    	t.Logf("HasGoBuild is true; checking consistency with other functions")
    
    	hasExec := false
    	hasExecGo := false
    	t.Run("MustHaveExec", func(t *testing.T) {
    		testenv.MustHaveExec(t)
    		hasExec = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 25 23:12:44 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. src/internal/testenv/testenv.go

    // Builder returns the empty string.
    func Builder() string {
    	return os.Getenv("GO_BUILDER_NAME")
    }
    
    // HasGoBuild reports whether the current system can build programs with “go build”
    // and then run them with os.StartProcess or exec.Command.
    func HasGoBuild() bool {
    	if os.Getenv("GO_GCFLAGS") != "" {
    		// It's too much work to require every caller of the go command
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:41:38 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. src/cmd/internal/archive/archive_test.go

    	"internal/testenv"
    	"internal/xcoff"
    	"io"
    	"os"
    	"path/filepath"
    	"runtime"
    	"sync"
    	"testing"
    	"unicode/utf8"
    )
    
    var buildDir string
    
    func TestMain(m *testing.M) {
    	if !testenv.HasGoBuild() {
    		return
    	}
    
    	exit := m.Run()
    
    	if buildDir != "" {
    		os.RemoveAll(buildDir)
    	}
    	os.Exit(exit)
    }
    
    func copyDir(dst, src string) error {
    	err := os.MkdirAll(dst, 0777)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 02 19:27:33 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testcshared/cshared_test.go

    		if _, err := os.Stat("/etc/alpine-release"); err == nil {
    			globalSkip = func(t *testing.T) { t.Skip("skipping failing test on alpine - go.dev/issue/19938") }
    			return m.Run()
    		}
    	}
    	if !testenv.HasGoBuild() {
    		// Checking for "go build" is a proxy for whether or not we can run "go env".
    		globalSkip = func(t *testing.T) { t.Skip("no go build") }
    		return m.Run()
    	}
    
    	GOOS = goEnv("GOOS")
    	GOARCH = goEnv("GOARCH")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:19:50 UTC 2023
    - 21K bytes
    - Viewed (0)
  5. src/cmd/go/go_test.go

    	if err != nil {
    		log.Fatal(err)
    	}
    	testTmpDir = dir
    	if !*testWork {
    		defer removeAll(testTmpDir)
    	}
    
    	testGOCACHE, _ = cache.DefaultDir()
    	if testenv.HasGoBuild() {
    		testBin = filepath.Join(testTmpDir, "testbin")
    		if err := os.Mkdir(testBin, 0777); err != nil {
    			log.Fatal(err)
    		}
    		testGo = filepath.Join(testBin, "go"+exeSuffix)
    		gotool, err := testenv.GoTool()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 81.1K bytes
    - Viewed (0)
Back to top