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

Delta Between Two Patch Sets: misc/cgo/errors/test.bash

Issue 160200044: [dev.power64] code review 160200044: build: merge default into dev.power64 (Closed)
Left Patch Set: Created 10 years, 4 months ago
Right Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « misc/cgo/errors/issue8442.go ('k') | misc/cgo/test/backdoor/runtime.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 # Copyright 2013 The Go Authors. All rights reserved. 1 # Copyright 2013 The Go Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style 2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file. 3 # license that can be found in the LICENSE file.
4 4
5 check() { 5 check() {
6 file=$1 6 file=$1
7 line=$(grep -n 'ERROR HERE' $file | sed 's/:.*//') 7 line=$(grep -n 'ERROR HERE' $file | sed 's/:.*//')
8 if [ "$line" = "" ]; then 8 if [ "$line" = "" ]; then
9 echo 1>&2 misc/cgo/errors/test.bash: BUG: cannot find ERROR HERE in $file 9 echo 1>&2 misc/cgo/errors/test.bash: BUG: cannot find ERROR HERE in $file
10 exit 1 10 exit 1
11 fi 11 fi
12 if go build $file >errs 2>&1; then 12 if go build $file >errs 2>&1; then
13 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected cgo to fail b ut it succeeded 13 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected cgo to fail b ut it succeeded
14 exit 1 14 exit 1
15 fi 15 fi
16 if ! test -s errs; then 16 if ! test -s errs; then
17 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output but saw none 17 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output but saw none
18 exit 1 18 exit 1
19 fi 19 fi
20 if ! fgrep $file:$line: errs >/dev/null 2>&1; then 20 if ! fgrep $file:$line: errs >/dev/null 2>&1; then
21 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error on line $line but saw: 21 echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error on line $line but saw:
22 cat 1>&2 errs 22 cat 1>&2 errs
23 exit 1 23 exit 1
24 fi 24 fi
25 } 25 }
26 26
27 check err1.go 27 check err1.go
28 check err2.go 28 check err2.go
29 check err3.go 29 check err3.go
30 check issue7757.go
31 check issue8442.go
30 32
31 rm -rf errs _obj 33 rm -rf errs _obj
32 exit 0 34 exit 0
LEFTRIGHT

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