mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/processtest: output a better error message when failing to compile a Go program
This commit is contained in:
parent
2875eb25f1
commit
0d1f990338
@ -78,8 +78,8 @@ func TestPrograms(t *testing.T) {
|
|||||||
defer m.Unlock()
|
defer m.Unlock()
|
||||||
|
|
||||||
bin := filepath.Join(tmpdir, n)
|
bin := filepath.Join(tmpdir, n)
|
||||||
if err := exec.Command("go", "build", "-o", bin, filepath.Join(dir, n)).Run(); err != nil {
|
if out, err := exec.Command("go", "build", "-o", bin, filepath.Join(dir, n)).CombinedOutput(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatalf("%v\n%s", err, string(out))
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
||||||
|
Loading…
Reference in New Issue
Block a user