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

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2019-06-18 13:36:48 +02:00
parent 208e1719ad
commit 16201c41dc
+4 -1
View File
@@ -367,7 +367,10 @@ func Test(pkgName, target string, config *BuildConfig) error {
if err != nil {
// Propagate the exit code
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}
}