mirror of
https://github.com/golang/go
synced 2024-11-23 18:10:04 -07:00
[dev.link] cmd/link: clean up some tests
Use a separate directory for TestBuildFortvOS test files. Remove a bad comment in TestTrampoline. Change-Id: I2dc07ae575ec3f73fb7cea26743094b11a41b464 Reviewed-on: https://go-review.googlesource.com/c/go/+/229619 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
7466cad9c4
commit
dee3e3aebd
@ -287,7 +287,7 @@ func TestBuildForTvOS(t *testing.T) {
|
||||
"-fembed-bitcode",
|
||||
"-framework", "CoreFoundation",
|
||||
}
|
||||
lib := filepath.Join("testdata", "lib.go")
|
||||
lib := filepath.Join("testdata", "testBuildFortvOS", "lib.go")
|
||||
tmpDir, err := ioutil.TempDir("", "go-link-TestBuildFortvOS")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -308,7 +308,7 @@ func TestBuildForTvOS(t *testing.T) {
|
||||
}
|
||||
|
||||
link := exec.Command(CC[0], CC[1:]...)
|
||||
link.Args = append(link.Args, ar, filepath.Join("testdata", "main.m"))
|
||||
link.Args = append(link.Args, ar, filepath.Join("testdata", "testBuildFortvOS", "main.m"))
|
||||
if out, err := link.CombinedOutput(); err != nil {
|
||||
t.Fatalf("%v: %v:\n%s", link.Args, err, out)
|
||||
}
|
||||
@ -661,7 +661,6 @@ func TestTrampoline(t *testing.T) {
|
||||
}
|
||||
exe := filepath.Join(tmpdir, "hello.exe")
|
||||
|
||||
// Build and run with old object file format.
|
||||
cmd := exec.Command(testenv.GoToolPath(t), "build", "-ldflags=-debugtramp=2", "-o", exe, src)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user