| OLD | NEW |
| 1 # Copyright 2012 The Go Authors. All rights reserved. | 1 # Copyright 2012 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 # These function names are also known to | 5 # These function names are also known to |
| 6 # (and are the plan for transitioning to) run.go. | 6 # (and are the plan for transitioning to) run.go. |
| 7 | 7 |
| 8 # helper (not known to run.go) | 8 # helper (not known to run.go) |
| 9 # group file list by packages and return list of packages | 9 # group file list by packages and return list of packages |
| 10 # each package is a comma-separated list of go files. | 10 # each package is a comma-separated list of go files. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 done | 113 done |
| 114 $L -o $A.out -L . $lastfile.$A | 114 $L -o $A.out -L . $lastfile.$A |
| 115 ./$A.out 2>&1 | cmp - $D/$F.out | 115 ./$A.out 2>&1 | cmp - $D/$F.out |
| 116 } | 116 } |
| 117 | 117 |
| 118 build() { | 118 build() { |
| 119 $G $D/$F.go && $L $F.$A | 119 $G $D/$F.go && $L $F.$A |
| 120 } | 120 } |
| 121 | 121 |
| 122 runoutput() { | 122 runoutput() { |
| 123 » go run "$D/$F.go" "$@" > tmp.go | 123 » $G "$D/$F.go" |
| 124 » go run tmp.go | 124 » $L $F.$A |
| 125 » ./$A.out "$@" > tmp.go |
| 126 » rm $F.$A $A.out |
| 127 » $G tmp.go |
| 128 » $L tmp.$A |
| 129 » ./$A.out |
| 130 » rm tmp.$A $A.out |
| 125 } | 131 } |
| 126 | 132 |
| 127 run() { | 133 run() { |
| 128 gofiles="" | 134 gofiles="" |
| 129 ingo=true | 135 ingo=true |
| 130 while $ingo; do | 136 while $ingo; do |
| 131 case "$1" in | 137 case "$1" in |
| 132 *.go) | 138 *.go) |
| 133 gofiles="$gofiles $1" | 139 gofiles="$gofiles $1" |
| 134 shift | 140 shift |
| (...skipping 19 matching lines...) Expand all Loading... |
| 154 fi | 160 fi |
| 155 errchk $zero $G -e $* $D/$F.go | 161 errchk $zero $G -e $* $D/$F.go |
| 156 } | 162 } |
| 157 | 163 |
| 158 errorcheckoutput() { | 164 errorcheckoutput() { |
| 159 zero="" | 165 zero="" |
| 160 if [ "$1" = "-0" ]; then | 166 if [ "$1" = "-0" ]; then |
| 161 zero="-0" | 167 zero="-0" |
| 162 shift | 168 shift |
| 163 fi | 169 fi |
| 164 » go run "$D/$F.go" "$@" > tmp.go | 170 » $G "$D/$F.go" |
| 171 » $L $F.$A |
| 172 » ./$A.out "$@" > tmp.go |
| 173 » rm $F.$A $A.out |
| 165 errchk $zero $G -e tmp.go | 174 errchk $zero $G -e tmp.go |
| 166 } | 175 } |
| 167 | 176 |
| 168 skip() { | 177 skip() { |
| 169 true | 178 true |
| 170 } | 179 } |
| OLD | NEW |