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

Issue 4307049: code review 4307049: gotest: another try at flags. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 1 month ago by r
Modified:
14 years, 1 month ago
Reviewers:
CC:
rsc, niemeyer, rog, r2, golang-dev
Visibility:
Public.

Description

gotest: another try at flags. doc.go contains the details. The short story: - command line is passed to the binary - a new flag, -file, is needed to name files - known flags have the "test." prefix added for convenience. - gotest-specific flags are trimmed from the command line. The effect should be that most existing uses are unaffected, the ability to name files is still present, and it's nicer to use. The downside is a lot more code in gotest. Also allow a test to be called just Test.

Patch Set 1 #

Patch Set 2 : diff -r 546b1fc95dcc https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 546b1fc95dcc https://go.googlecode.com/hg/ #

Total comments: 9

Patch Set 4 : diff -r 546b1fc95dcc https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 546b1fc95dcc https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 6 : diff -r d66e81de58a5 https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 7 : diff -r d66e81de58a5 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -106 lines) Patch
M src/cmd/gotest/Makefile View 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gotest/doc.go View 1 2 3 4 5 6 3 chunks +49 lines, -37 lines 0 comments Download
A src/cmd/gotest/flag.go View 1 2 3 4 5 1 chunk +153 lines, -0 lines 0 comments Download
M src/cmd/gotest/gotest.go View 1 2 3 4 5 8 chunks +25 lines, -69 lines 0 comments Download

Messages

Total messages: 13
r
Hello rsc, n13m3y3r@gmail.com, rogpeppe@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 1 month ago (2011-03-30 20:45:30 UTC) #1
rsc
http://codereview.appspot.com/4307049/diff/4004/src/cmd/gotest/flag.go File src/cmd/gotest/flag.go (right): http://codereview.appspot.com/4307049/diff/4004/src/cmd/gotest/flag.go#newcode25 src/cmd/gotest/flag.go:25: // These flags can be passed with our without ...
14 years, 1 month ago (2011-03-30 21:06:00 UTC) #2
r2
but what about the approach? -rob
14 years, 1 month ago (2011-03-30 22:11:49 UTC) #3
r
Hello rsc, niemeyer, rog, r2 (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 1 month ago (2011-03-30 22:23:08 UTC) #4
rsc
On Wed, Mar 30, 2011 at 18:11, Rob 'Commander' Pike <r@google.com> wrote: > but what ...
14 years, 1 month ago (2011-03-31 00:35:37 UTC) #5
rsc
LGTM http://codereview.appspot.com/4307049/diff/11001/src/cmd/gotest/doc.go File src/cmd/gotest/doc.go (right): http://codereview.appspot.com/4307049/diff/11001/src/cmd/gotest/doc.go#newcode39 src/cmd/gotest/doc.go:39: gotest [-file a.go file b.go ...] [-c] [-x] ...
14 years, 1 month ago (2011-03-31 00:39:46 UTC) #6
niemeyer
LGTM, thanks a lot. http://codereview.appspot.com/4307049/diff/11001/src/cmd/gotest/flag.go File src/cmd/gotest/flag.go (right): http://codereview.appspot.com/4307049/diff/11001/src/cmd/gotest/flag.go#newcode25 src/cmd/gotest/flag.go:25: -bench="": passes -test.run bench test ...
14 years, 1 month ago (2011-03-31 00:46:11 UTC) #7
r
Hello rsc, niemeyer, rog, r2 (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 1 month ago (2011-03-31 03:49:53 UTC) #8
r2
all code changes addressed. i did significant editing to doc.go in this round and would ...
14 years, 1 month ago (2011-03-31 03:50:23 UTC) #9
rsc
LGTM http://codereview.appspot.com/4307049/diff/14001/src/cmd/gotest/doc.go File src/cmd/gotest/doc.go (right): http://codereview.appspot.com/4307049/diff/14001/src/cmd/gotest/doc.go#newcode10 src/cmd/gotest/doc.go:10: simple script that recompiles the package whose source ...
14 years, 1 month ago (2011-03-31 04:08:48 UTC) #10
r
*** Submitted as http://code.google.com/p/go/source/detail?r=fc7cf69a3912 *** gotest: another try at flags. doc.go contains the details. The ...
14 years, 1 month ago (2011-03-31 04:14:55 UTC) #11
rog
look good, but i think -- should terminate the argument processing. perhaps it does and ...
14 years, 1 month ago (2011-03-31 12:27:41 UTC) #12
rsc
14 years, 1 month ago (2011-03-31 12:55:55 UTC) #13
On Thu, Mar 31, 2011 at 08:27, roger peppe <rogpeppe@gmail.com> wrote:
> look good, but i think -- should terminate the
> argument processing. perhaps it does and i've
> missed it.

It doesn't, and can't, because it doesn't always
know which strings are eaten by options that
precede them.

I believe it is correct as is.

Russ
Sign in to reply to this message.

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