mirror of
https://github.com/golang/go
synced 2024-11-23 08:50:03 -07:00
misc/cgo/testcshared: delete testp0.exe not testp0 file
Otherwise we end up with testp?.exe files after the tests run. Updates #11058 Change-Id: Ieccfc42da6192622bdab1f9a411ccd50bb59fd5b Reviewed-on: https://go-review.googlesource.com/68770 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
f7ad3a04f9
commit
35483c8e25
@ -280,15 +280,16 @@ func TestExportedSymbols(t *testing.T) {
|
|||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
cmd := "testp0"
|
cmd := "testp0"
|
||||||
|
bin := cmdToRun(cmd)
|
||||||
|
|
||||||
createHeadersOnce(t)
|
createHeadersOnce(t)
|
||||||
|
|
||||||
runCC(t, "-I", installdir, "-o", cmd, "main0.c", libgoname)
|
runCC(t, "-I", installdir, "-o", cmd, "main0.c", libgoname)
|
||||||
adbPush(t, cmd)
|
adbPush(t, cmd)
|
||||||
|
|
||||||
defer os.Remove(cmd)
|
defer os.Remove(bin)
|
||||||
|
|
||||||
out := runExe(t, append(gopathEnv, "LD_LIBRARY_PATH=."), cmdToRun(cmd))
|
out := runExe(t, append(gopathEnv, "LD_LIBRARY_PATH=."), bin)
|
||||||
if strings.TrimSpace(out) != "PASS" {
|
if strings.TrimSpace(out) != "PASS" {
|
||||||
t.Error(out)
|
t.Error(out)
|
||||||
}
|
}
|
||||||
@ -304,15 +305,16 @@ func TestExportedSymbolsWithDynamicLoad(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd := "testp1"
|
cmd := "testp1"
|
||||||
|
bin := cmdToRun(cmd)
|
||||||
|
|
||||||
createHeadersOnce(t)
|
createHeadersOnce(t)
|
||||||
|
|
||||||
runCC(t, "-o", cmd, "main1.c", "-ldl")
|
runCC(t, "-o", cmd, "main1.c", "-ldl")
|
||||||
adbPush(t, cmd)
|
adbPush(t, cmd)
|
||||||
|
|
||||||
defer os.Remove(cmd)
|
defer os.Remove(bin)
|
||||||
|
|
||||||
out := runExe(t, nil, cmdToRun(cmd), "./"+libgoname)
|
out := runExe(t, nil, bin, "./"+libgoname)
|
||||||
if strings.TrimSpace(out) != "PASS" {
|
if strings.TrimSpace(out) != "PASS" {
|
||||||
t.Error(out)
|
t.Error(out)
|
||||||
}
|
}
|
||||||
@ -328,6 +330,7 @@ func TestUnexportedSymbols(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd := "testp2"
|
cmd := "testp2"
|
||||||
|
bin := cmdToRun(cmd)
|
||||||
libname := "libgo2." + libSuffix
|
libname := "libgo2." + libSuffix
|
||||||
|
|
||||||
run(t,
|
run(t,
|
||||||
@ -348,9 +351,9 @@ func TestUnexportedSymbols(t *testing.T) {
|
|||||||
adbPush(t, cmd)
|
adbPush(t, cmd)
|
||||||
|
|
||||||
defer os.Remove(libname)
|
defer os.Remove(libname)
|
||||||
defer os.Remove(cmd)
|
defer os.Remove(bin)
|
||||||
|
|
||||||
out := runExe(t, append(gopathEnv, "LD_LIBRARY_PATH=."), cmdToRun(cmd))
|
out := runExe(t, append(gopathEnv, "LD_LIBRARY_PATH=."), bin)
|
||||||
|
|
||||||
if strings.TrimSpace(out) != "PASS" {
|
if strings.TrimSpace(out) != "PASS" {
|
||||||
t.Error(out)
|
t.Error(out)
|
||||||
@ -370,15 +373,16 @@ func TestMainExportedOnAndroid(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd := "testp3"
|
cmd := "testp3"
|
||||||
|
bin := cmdToRun(cmd)
|
||||||
|
|
||||||
createHeadersOnce(t)
|
createHeadersOnce(t)
|
||||||
|
|
||||||
runCC(t, "-o", cmd, "main3.c", "-ldl")
|
runCC(t, "-o", cmd, "main3.c", "-ldl")
|
||||||
adbPush(t, cmd)
|
adbPush(t, cmd)
|
||||||
|
|
||||||
defer os.Remove(cmd)
|
defer os.Remove(bin)
|
||||||
|
|
||||||
out := runExe(t, nil, cmdToRun(cmd), "./"+libgoname)
|
out := runExe(t, nil, bin, "./"+libgoname)
|
||||||
if strings.TrimSpace(out) != "PASS" {
|
if strings.TrimSpace(out) != "PASS" {
|
||||||
t.Error(out)
|
t.Error(out)
|
||||||
}
|
}
|
||||||
@ -397,11 +401,12 @@ func testSignalHandlers(t *testing.T, pkgname, cfile, cmd string) {
|
|||||||
runCC(t, "-pthread", "-o", cmd, cfile, "-ldl")
|
runCC(t, "-pthread", "-o", cmd, cfile, "-ldl")
|
||||||
adbPush(t, cmd)
|
adbPush(t, cmd)
|
||||||
|
|
||||||
|
bin := cmdToRun(cmd)
|
||||||
|
|
||||||
defer os.Remove(libname)
|
defer os.Remove(libname)
|
||||||
defer os.Remove(cmd)
|
defer os.Remove(bin)
|
||||||
defer os.Remove(pkgname + ".h")
|
defer os.Remove(pkgname + ".h")
|
||||||
|
|
||||||
bin := cmdToRun(cmd)
|
|
||||||
out := runExe(t, nil, bin, "./"+libname)
|
out := runExe(t, nil, bin, "./"+libname)
|
||||||
if strings.TrimSpace(out) != "PASS" {
|
if strings.TrimSpace(out) != "PASS" {
|
||||||
t.Error(run(t, nil, bin, libname, "verbose"))
|
t.Error(run(t, nil, bin, libname, "verbose"))
|
||||||
|
Loading…
Reference in New Issue
Block a user