From: Elias Naur Date: Wed, 1 Feb 2017 17:41:27 +0000 (+0100) Subject: misc/ios: allow exit code 0 to mean test success X-Git-Tag: go1.9beta1~1791 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=312ea5bf8ff76d8ea4ea0b92df29de5204446b46;p=gostls13.git misc/ios: allow exit code 0 to mean test success Tests that use TestMain might never call m.Run(), and simply return from TestMain. In that case, the iOS test harness never sees the PASS from the testing framework and assumes the test failed. Allow an exit with exit code 0 to also mean test success, thereby fixing the objdump test on iOS. Change-Id: I1fe9077b05931aa0905e41b88945cd153c5b35b6 Reviewed-on: https://go-review.googlesource.com/36065 Reviewed-by: David Crawshaw Run-TryBot: Elias Naur TryBot-Result: Gobot Gobot --- diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go index bbc17f06ff..493820315f 100644 --- a/misc/ios/go_darwin_arm_exec.go +++ b/misc/ios/go_darwin_arm_exec.go @@ -262,7 +262,9 @@ func run(bin string, args []string) (err error) { return s.out.LastIndex([]byte("\nPASS\n")) > startTestsLen || s.out.LastIndex([]byte("\nPASS\r")) > startTestsLen || s.out.LastIndex([]byte("\n(lldb) PASS\n")) > startTestsLen || - s.out.LastIndex([]byte("\n(lldb) PASS\r")) > startTestsLen + s.out.LastIndex([]byte("\n(lldb) PASS\r")) > startTestsLen || + s.out.LastIndex([]byte("exited with status = 0 (0x00000000) \n")) > startTestsLen || + s.out.LastIndex([]byte("exited with status = 0 (0x00000000) \r")) > startTestsLen } err = s.wait("test completion", passed, opts.timeout) if passed(s.out) {