mirror of
https://github.com/go-delve/delve.git
synced 2025-11-03 13:57:33 +08:00
Recompile test prog for main_test
This commit is contained in:
@ -33,9 +33,14 @@ func startDebugger(t *testing.T, pid int) *os.Process {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func startTestProg(t *testing.T, proc string) *os.Process {
|
func startTestProg(t *testing.T, proc string) *os.Process {
|
||||||
|
err := exec.Command("go", "build", "-gcflags=-N -l", "-o", proc, proc+".go").Run()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal("Could not compile", proc, err)
|
||||||
|
}
|
||||||
|
defer os.Remove(proc)
|
||||||
cmd := exec.Command(proc)
|
cmd := exec.Command(proc)
|
||||||
|
|
||||||
err := cmd.Start()
|
err = cmd.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user