Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
LGTM I swore we had roughly that. Who knows. Thanks. On Fri, Feb 17, 2012 at 3:38 PM, <rsc@golang.org> wrote: > Reviewers: golang-dev_googlegroups.com, > > Message: > Hello golang-dev@googlegroups.com, > > I'd like you to review this change to > https://code.google.com/p/go/ > > > Description: > test: add testlib > > Please review this at http://codereview.appspot.com/**5676077/<http://codereview.appspot.com/5676077/> > > Affected files: > M test/run > A test/testlib > > > Index: test/run > ==============================**==============================**======= > --- a/test/run > +++ b/test/run > @@ -67,7 +67,8 @@ > fi > export F=$(basename $i .go) > export D=$dir > - sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed > 's|./\$A.out|$E &|g' > >> "$RUNFILE" >> > + echo '. ./testlib' >"$RUNFILE" > + sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed > 's|./\$A.out|$E &|g' > >> "$RUNFILE" >>> >> if ! { time -p bash -c "bash '$RUNFILE' >'$TMP1FILE' 2>&1" > ; } 2>"$TMP2FILE" > then > echo > Index: test/testlib > ==============================**==============================**======= > new file mode 100644 > --- /dev/null > +++ b/test/testlib > @@ -0,0 +1,22 @@ > +# Copyright 2012 The Go Authors. All rights reserved. > +# Use of this source code is governed by a BSD-style > +# license that can be found in the LICENSE file. > + > +# These function names are also known to > +# (and are the plan for transitioning to) run.go. > + > +compile() { > + $G $D/$F.go > +} > + > +build() { > + $G $D/$F.go && $L $F.$A > +} > + > +run() { > + $G $D/$F.go && $L $F.$A && ./$A.out "$@" > +} > + > +errorcheck() { > + errchk $G -e $D/$F.go > +} > > >
*** Submitted as e1704b98dff6 *** test: add testlib R=golang-dev, bradfitz CC=golang-dev http://codereview.appspot.com/5676077