Skip to content

Commit 312ea5b

Browse files
author
Elias Naur
committed
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 <[email protected]> Run-TryBot: Elias Naur <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent cb6e063 commit 312ea5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

misc/ios/go_darwin_arm_exec.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ func run(bin string, args []string) (err error) {
262262
return s.out.LastIndex([]byte("\nPASS\n")) > startTestsLen ||
263263
s.out.LastIndex([]byte("\nPASS\r")) > startTestsLen ||
264264
s.out.LastIndex([]byte("\n(lldb) PASS\n")) > startTestsLen ||
265-
s.out.LastIndex([]byte("\n(lldb) PASS\r")) > startTestsLen
265+
s.out.LastIndex([]byte("\n(lldb) PASS\r")) > startTestsLen ||
266+
s.out.LastIndex([]byte("exited with status = 0 (0x00000000) \n")) > startTestsLen ||
267+
s.out.LastIndex([]byte("exited with status = 0 (0x00000000) \r")) > startTestsLen
266268
}
267269
err = s.wait("test completion", passed, opts.timeout)
268270
if passed(s.out) {

0 commit comments

Comments
 (0)