Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 338 for getwd (0.05 sec)

  1. src/cmd/compile/internal/test/pgo_inl_test.go

    	}
    }
    
    // TestPGOIntendedInlining tests that specific functions are inlined when PGO
    // is applied to the exact source that was profiled.
    func TestPGOIntendedInlining(t *testing.T) {
    	wd, err := os.Getwd()
    	if err != nil {
    		t.Fatalf("error getting wd: %v", err)
    	}
    	srcDir := filepath.Join(wd, "testdata/pgo/inline")
    
    	// Copy the module to a scratch location so we can add a go.mod.
    	dir := t.TempDir()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/dwarf_test.go

    	}
    
    	if wd, err := os.Getwd(); err == nil {
    		gopathdir := filepath.Join(wd, "testdata", "issue25459")
    		abstractOriginSanity(t, gopathdir, DefaultOpt)
    	} else {
    		t.Fatalf("os.Getwd() failed %v", err)
    	}
    }
    
    func TestAbstractOriginSanityIssue26237(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    
    	mustHaveDWARF(t)
    	if wd, err := os.Getwd(); err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 01:38:11 UTC 2024
    - 48.6K bytes
    - Viewed (0)
  3. src/path/filepath/path_test.go

    // chdir changes the current working directory to the named directory,
    // and then restore the original working directory at the end of the test.
    func chdir(t *testing.T, dir string) {
    	olddir, err := os.Getwd()
    	if err != nil {
    		t.Fatalf("getwd %s: %v", dir, err)
    	}
    	if err := os.Chdir(dir); err != nil {
    		t.Fatalf("chdir %s: %v", dir, err)
    	}
    
    	t.Cleanup(func() {
    		if err := os.Chdir(olddir); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:38:19 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  4. src/go/build/build_test.go

    	}
    }
    
    func TestLocalDirectory(t *testing.T) {
    	if runtime.GOOS == "ios" {
    		t.Skipf("skipping on %s/%s, no valid GOROOT", runtime.GOOS, runtime.GOARCH)
    	}
    
    	cwd, err := os.Getwd()
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	p, err := ImportDir(cwd, 0)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if p.ImportPath != "go/build" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 15 16:24:01 UTC 2023
    - 23.9K bytes
    - Viewed (0)
  5. src/net/http/cgi/host_test.go

    	}
    }
    
    func TestDir(t *testing.T) {
    	testenv.MustHaveExec(t)
    	cwd, _ := os.Getwd()
    	h := &Handler{
    		Path: os.Args[0],
    		Root: "/test.cgi",
    		Dir:  cwd,
    	}
    	expectedMap := map[string]string{
    		"cwd": cwd,
    	}
    	runCgiTest(t, h, "GET /test.cgi HTTP/1.0\nHost: example.com\n\n", expectedMap)
    
    	cwd, _ = os.Getwd()
    	cwd, _ = filepath.Split(os.Args[0])
    	h = &Handler{
    		Path: os.Args[0],
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 18:29:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  6. src/os/removeall_test.go

    	case "aix", "darwin", "ios", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "illumos", "solaris":
    		break
    	default:
    		t.Skip("skipping for not implemented platforms")
    	}
    
    	prevDir, err := Getwd()
    	if err != nil {
    		t.Fatalf("Could not get wd: %s", err)
    	}
    
    	startPath, err := MkdirTemp("", "TestRemoveAllLongPath-")
    	if err != nil {
    		t.Fatalf("Could not create TempDir: %s", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:21:29 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  7. src/cmd/pack/pack_test.go

    	ar.addFile(helloFile.Reset())
    	ar.addFile(goodbyeFile.Reset())
    	ar.a.File().Close()
    	// Now extract one file. We chdir to the directory of the archive for simplicity.
    	pwd, err := os.Getwd()
    	if err != nil {
    		t.Fatal("os.Getwd: ", err)
    	}
    	err = os.Chdir(dir)
    	if err != nil {
    		t.Fatal("os.Chdir: ", err)
    	}
    	defer func() {
    		err := os.Chdir(pwd)
    		if err != nil {
    			t.Fatal("os.Chdir: ", err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 04 16:27:35 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  8. misc/ios/go_ios_exec.go

    	out, err := exec.Command("cp", "-a", src, dst).CombinedOutput()
    	if err != nil {
    		os.Stderr.Write(out)
    	}
    	return err
    }
    
    func copyLocalData(dstbase string) (pkgpath string, err error) {
    	cwd, err := os.Getwd()
    	if err != nil {
    		return "", err
    	}
    
    	finalPkgpath, underGoRoot, err := subdir()
    	if err != nil {
    		return "", err
    	}
    	cwd = strings.TrimSuffix(cwd, finalPkgpath)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 23.4K bytes
    - Viewed (0)
  9. src/crypto/tls/bogo_shim_test.go

    		var j struct {
    			Dir string
    		}
    		if err := json.Unmarshal(output, &j); err != nil {
    			t.Fatalf("failed to parse 'go mod download' output: %s", err)
    		}
    		bogoDir = j.Dir
    	}
    
    	cwd, err := os.Getwd()
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	resultsFile := filepath.Join(t.TempDir(), "results.json")
    
    	args := []string{
    		"test",
    		".",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:25:39 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  10. src/cmd/dist/util.go

    		// to the user.
    		select {}
    	}
    }
    
    // xgetwd returns the current directory.
    func xgetwd() string {
    	wd, err := os.Getwd()
    	if err != nil {
    		fatalf("%s", err)
    	}
    	return wd
    }
    
    // xrealwd returns the 'real' name for the given path.
    // real is defined as what xgetwd returns in that directory.
    func xrealwd(path string) string {
    	old := xgetwd()
    	if err := os.Chdir(path); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 17:50:29 UTC 2023
    - 11.2K bytes
    - Viewed (0)
Back to top