test: replace ExitStatus() with go1.11 compatible syntax

Signed-off-by: Ron Evans <ron@hybridgroup.com>
Этот коммит содержится в:
Ron Evans 2019-06-18 13:36:48 +02:00
родитель 208e1719ad
коммит 16201c41dc

Просмотреть файл

@ -367,7 +367,10 @@ func Test(pkgName, target string, config *BuildConfig) error {
if err != nil { if err != nil {
// Propagate the exit code // Propagate the exit code
if err, ok := err.(*exec.ExitError); ok { if err, ok := err.(*exec.ExitError); ok {
os.Exit(err.ExitCode()) if status, ok := err.Sys().(syscall.WaitStatus); ok {
os.Exit(status.ExitStatus())
}
os.Exit(1)
} }
return &commandError{"failed to run compiled binary", tmppath, err} return &commandError{"failed to run compiled binary", tmppath, err}
} }