mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +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()
|
||||
|
||||
bin := filepath.Join(tmpdir, n)
|
||||
if err := exec.Command("go", "build", "-o", bin, filepath.Join(dir, n)).Run(); err != nil {
|
||||
t.Fatal(err)
|
||||
if out, err := exec.Command("go", "build", "-o", bin, filepath.Join(dir, n)).CombinedOutput(); err != nil {
|
||||
t.Fatalf("%v\n%s", err, string(out))
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
||||
|
Loading…
Reference in New Issue
Block a user