Commit 21e75b32 authored by Russ Cox's avatar Russ Cox

testing: write profiles on failure

Fixes #7901.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/90930044
parent f40f0b26
......@@ -439,6 +439,7 @@ alongside the existing function
<li>
The <a href="/pkg/testing/"><code>testing</code></a> package now
diagnoses tests that call <code>panic(nil)</code>, which are almost always erroneous.
Also, tests now write profiles (if invoked with profiling flags) even on failure.
</li>
<li>
......
......@@ -437,6 +437,7 @@ func Main(matchString func(pat, str string) (bool, error), tests []InternalTest,
stopAlarm()
if !testOk || !exampleOk {
fmt.Println("FAIL")
after()
os.Exit(1)
}
fmt.Println("PASS")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment