aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing.go')
-rw-r--r--src/testing/testing.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go
index a170cd0fd9..4beb9c6c1c 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -675,9 +675,30 @@ func (t *T) Parallel() {
t.parent.sub = append(t.parent.sub, t)
t.raceErrors += race.Errors()
+ if t.chatty {
+ // Print directly to root's io.Writer so there is no delay.
+ root := t.parent
+ for ; root.parent != nil; root = root.parent {
+ }
+ root.mu.Lock()
+ fmt.Fprintf(root.w, "=== PAUSE %s\n", t.name)
+ root.mu.Unlock()
+ }
+
t.signal <- true // Release calling test.
<-t.parent.barrier // Wait for the parent test to complete.
t.context.waitParallel()
+
+ if t.chatty {
+ // Print directly to root's io.Writer so there is no delay.
+ root := t.parent
+ for ; root.parent != nil; root = root.parent {
+ }
+ root.mu.Lock()
+ fmt.Fprintf(root.w, "=== CONT %s\n", t.name)
+ root.mu.Unlock()
+ }
+
t.start = time.Now()
t.raceErrors += -race.Errors()
}