Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18)

Issue 10264045: code review 10264045: cmd/go: write coverage to file, add percentage statistic (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by r
Modified:
11 years, 9 months ago
Reviewers:
rsc
CC:
rsc, adg, golang-dev
Visibility:
Public.

Description

cmd/go: write coverage to file, add percentage statistic Move the data dumper to the testing package, where it has access to file I/O. Print a percentage value at the end of the run.

Patch Set 1 #

Patch Set 2 : diff -r 330478300ab0 https://code.google.com/p/go #

Patch Set 3 : diff -r 330478300ab0 https://code.google.com/p/go #

Patch Set 4 : diff -r 330478300ab0 https://code.google.com/p/go #

Patch Set 5 : diff -r 330478300ab0 https://code.google.com/p/go #

Patch Set 6 : diff -r a40ef06e2106 https://code.google.com/p/go #

Total comments: 4

Patch Set 7 : diff -r 71375a634b9a https://code.google.com/p/go #

Patch Set 8 : diff -r 71375a634b9a https://code.google.com/p/go #

Patch Set 9 : diff -r 600c5389c9d3 https://code.google.com/p/go #

Total comments: 1

Patch Set 10 : diff -r 600c5389c9d3 https://code.google.com/p/go #

Total comments: 3

Patch Set 11 : diff -r f1e1d5d02b1c https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -44 lines) Patch
M src/cmd/go/test.go View 1 2 3 4 5 6 7 8 9 10 6 chunks +22 lines, -42 lines 0 comments Download
M src/cmd/go/testflag.go View 1 2 3 5 chunks +7 lines, -2 lines 0 comments Download
A src/pkg/testing/cover.go View 1 2 3 4 5 6 7 8 9 10 1 chunk +91 lines, -0 lines 0 comments Download
M src/pkg/testing/testing.go View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 6
r
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 9 months ago (2013-06-13 21:08:19 UTC) #1
adg
https://codereview.appspot.com/10264045/diff/15001/src/pkg/testing/cover.go File src/pkg/testing/cover.go (right): https://codereview.appspot.com/10264045/diff/15001/src/pkg/testing/cover.go#newcode48 src/pkg/testing/cover.go:48: defer f.Close() should check the error return value of ...
11 years, 9 months ago (2013-06-18 03:46:07 UTC) #2
r
Hello rsc@golang.org, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 9 months ago (2013-06-18 16:05:20 UTC) #3
r
Hello rsc@golang.org, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 9 months ago (2013-06-18 20:57:35 UTC) #4
rsc
LGTM https://codereview.appspot.com/10264045/diff/28001/src/cmd/go/test.go File src/cmd/go/test.go (right): https://codereview.appspot.com/10264045/diff/28001/src/cmd/go/test.go#newcode1012 src/cmd/go/test.go:1012: testing.CoverRegister(coverCounters, coverBlocks) s/CoverRegister/RegisterCover/ to match various other registrations ...
11 years, 9 months ago (2013-06-18 21:05:08 UTC) #5
r
11 years, 9 months ago (2013-06-18 21:18:29 UTC) #6
*** Submitted as https://code.google.com/p/go/source/detail?r=8e10088eb699 ***

cmd/go: write coverage to file, add percentage statistic
Move the data dumper to the testing package, where it has access
to file I/O.
Print a percentage value at the end of the run.

R=rsc, adg
CC=golang-dev
https://codereview.appspot.com/10264045

https://codereview.appspot.com/10264045/diff/15001/src/pkg/testing/cover.go
File src/pkg/testing/cover.go (right):

https://codereview.appspot.com/10264045/diff/15001/src/pkg/testing/cover.go#n...
src/pkg/testing/cover.go:48: defer f.Close()
On 2013/06/18 03:46:07, adg wrote:
> should check the error return value of f.Close when writing

meh. and do what? stupid idea, but the orthodoxy.

https://codereview.appspot.com/10264045/diff/15001/src/pkg/testing/cover.go#n...
src/pkg/testing/cover.go:76: panic(err)
On 2013/06/18 03:46:07, adg wrote:
> panic? why not print "testing: err" and os.Exit(2) as with the Create above?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b