cmd/gomobile: skip test if keytool is bad
Looks like the binary is present on OS X even when Java is not installed, and it returns an error when called. Change-Id: Icbd42637f718a4fc05e65ea3973a584d1f24850e Reviewed-on: https://go-review.googlesource.com/12743 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
b3bd3d29aa
commit
23401e249d
@ -61,6 +61,8 @@ func TestSignPKCS7(t *testing.T) {
|
||||
|
||||
if keytool, err := exec.LookPath("keytool"); err != nil {
|
||||
t.Log("command keytool not found, skipping")
|
||||
} else if err := exec.Command(keytool, "-v").Run(); err != nil {
|
||||
t.Log("command keytool not functioning: %s, skipping", err)
|
||||
} else {
|
||||
cmd := exec.Command(keytool, "-v", "-printcert", "-file", sigPath)
|
||||
out, err := cmd.CombinedOutput()
|
||||
|
Loading…
x
Reference in New Issue
Block a user