Commit a0c13b9d authored by Russ Cox's avatar Russ Cox

test: add testlib

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5676077
parent b27bd42a
...@@ -67,7 +67,8 @@ do ...@@ -67,7 +67,8 @@ do
fi fi
export F=$(basename $i .go) export F=$(basename $i .go)
export D=$dir 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" if ! { time -p bash -c "bash '$RUNFILE' >'$TMP1FILE' 2>&1" ; } 2>"$TMP2FILE"
then then
echo echo
......
# 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
}
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