aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql.go
diff options
context:
space:
mode:
authorChangkun Ou <hi@changkun.us>2020-02-16 14:42:29 +0100
committerIan Lance Taylor <iant@golang.org>2020-03-17 00:45:15 +0000
commit2f54081adfc967836842c96619d241378400ece6 (patch)
treef60d3f67c7ca1c815b2a4a8e8456fce4264c76f1 /src/database/sql/sql.go
parent2fbca94db7e14fc1d18162cd203d7afc19b520e8 (diff)
downloadgo-2f54081adfc967836842c96619d241378400ece6.tar.xz
testing: do not require os.Exit in TestMain
If TestMain reports a wrong exit code to os.Exit, the test will be exited with exist code inconsist with test results. This CL eliminates the requirement of calling os.Exit in TestMain. Now, m.Run records the execution status of its test, the outer main func will call os.Exit with that exit code if TestMain does not call os.Exit. If TestMain does not call m.Run, the outer main func remain calls os.Exit(0) as before. Fixes #34129 Change-Id: I9598023e03b0a6260f0217f34df41c231c7d6489 Reviewed-on: https://go-review.googlesource.com/c/go/+/219639 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/database/sql/sql.go')
0 files changed, 0 insertions, 0 deletions