Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for unsetEnv (0.14 sec)

  1. src/cmd/go/go_test.go

    		os.Setenv("GODEBUG", os.Getenv("GODEBUG")+reducedLimit)
    	}
    
    	// Don't let these environment variables confuse the test.
    	os.Setenv("GOENV", "off")
    	os.Unsetenv("GOFLAGS")
    	os.Unsetenv("GOBIN")
    	os.Unsetenv("GOPATH")
    	os.Unsetenv("GIT_ALLOW_PROTOCOL")
    	os.Setenv("HOME", "/test-go-home-does-not-exist")
    	// On some systems the default C compiler is ccache.
    	// Setting HOME to a non-existent directory will break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 81.1K bytes
    - Viewed (0)
  2. src/cmd/dist/build.go

    	// always go to GOROOT/bin anyway.
    	os.Setenv("GOBIN", gorootBin)
    
    	// Make the environment more predictable.
    	os.Setenv("LANG", "C")
    	os.Setenv("LANGUAGE", "en_US.UTF8")
    	os.Unsetenv("GO111MODULE")
    	os.Setenv("GOENV", "off")
    	os.Unsetenv("GOFLAGS")
    	os.Setenv("GOWORK", "off")
    
    	workdir = xworkdir()
    	if err := os.WriteFile(pathf("%s/go.mod", workdir), []byte("module bootstrap"), 0666); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  3. src/cmd/dist/test.go

    	}
    
    	setupCmd = func(cmd *exec.Cmd) {
    		setDir(cmd, filepath.Join(goroot, "src"))
    		if len(opts.env) != 0 {
    			for _, kv := range opts.env {
    				if i := strings.Index(kv, "="); i < 0 {
    					unsetEnv(cmd, kv[:len(kv)-1])
    				} else {
    					setEnv(cmd, kv[:i], kv[i+1:])
    				}
    			}
    		}
    		if runOnHost {
    			setEnv(cmd, "GOARCH", gohostarch)
    			setEnv(cmd, "GOOS", gohostos)
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 16:01:35 UTC 2024
    - 50K bytes
    - Viewed (0)
  4. cmd/test-utils_test.go

    	// disable ENVs which interfere with tests.
    	for _, env := range []string{
    		crypto.EnvKMSAutoEncryption,
    		config.EnvAccessKey,
    		config.EnvSecretKey,
    		config.EnvRootUser,
    		config.EnvRootPassword,
    	} {
    		os.Unsetenv(env)
    	}
    
    	// Set as non-distributed.
    	globalIsDistErasure = false
    
    	// Disable printing console messages during tests.
    	color.Output = io.Discard
    	// Disable Error logging in testing.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 76.9K bytes
    - Viewed (0)
  5. src/testing/testing.go

    		c.Fatalf("cannot set environment variable: %v", err)
    	}
    
    	if ok {
    		c.Cleanup(func() {
    			os.Setenv(key, prevValue)
    		})
    	} else {
    		c.Cleanup(func() {
    			os.Unsetenv(key)
    		})
    	}
    }
    
    // panicHandling controls the panic handling used by runCleanup.
    type panicHandling int
    
    const (
    	normalPanic panicHandling = iota
    	recoverAndReturnPanic
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
Back to top