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

Side by Side Diff: doc/progs/run

Issue 4978047: code review 4978047: ld: Fixes issue 1899 ("cannot create 8.out.exe") (Closed)
Patch Set: diff -r 2a748f320ba5 https://go.googlecode.com/hg/ Created 13 years, 6 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:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/cmd/ld/lib.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 # Copyright 2009 The Go Authors. All rights reserved. 2 # Copyright 2009 The Go Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style 3 # Use of this source code is governed by a BSD-style
4 # license that can be found in the LICENSE file. 4 # license that can be found in the LICENSE file.
5 5
6 set -e 6 set -e
7 7
8 eval $(gomake --no-print-directory -f ../../src/Make.inc go-env) 8 eval $(gomake --no-print-directory -f ../../src/Make.inc go-env)
9 9
10 if [ -z "$O" ]; then 10 if [ -z "$O" ]; then
(...skipping 24 matching lines...) Expand all
35 sieve1.go \ 35 sieve1.go \
36 server1.go \ 36 server1.go \
37 strings.go \ 37 strings.go \
38 eff_bytesize.go\ 38 eff_bytesize.go\
39 eff_qr.go \ 39 eff_qr.go \
40 eff_sequence.go\ 40 eff_sequence.go\
41 ; do 41 ; do
42 $GC $i 42 $GC $i
43 done 43 done
44 44
45 TMPFILE="/tmp/gotest3-$$-$USER"
rsc 2011/09/12 17:00:24 # Write to temporary file to avoid mingw bash bug.
jp 2011/09/12 18:10:05 ok. I added this comment into test/run as well. It
46
45 function testit { 47 function testit {
46 $LD $1.$O 48 $LD $1.$O
47 » x=$(echo $(./$O.out $2 2>&1)) # extra echo canonicalizes 49 » ./$O.out $2 2>&1 >"$TMPFILE"
50 » x=$(echo $(cat "$TMPFILE")) # extra echo canonicalizes
48 if [ "$x" != "$3" ] 51 if [ "$x" != "$3" ]
49 then 52 then
50 echo $1 failed: '"'$x'"' is not '"'$3'"' 53 echo $1 failed: '"'$x'"' is not '"'$3'"'
51 fi 54 fi
52 } 55 }
53 56
54 function testitpipe { 57 function testitpipe {
55 $LD $1.$O 58 $LD $1.$O
56 » x=$(echo $(./$O.out | $2 2>&1)) # extra echo canonicalizes 59 » ./$O.out | $2 2>&1 >"$TMPFILE"
60 » x=$(echo $(cat "$TMPFILE")) # extra echo canonicalizes
57 if [ "$x" != "$3" ] 61 if [ "$x" != "$3" ]
58 then 62 then
59 echo $1 failed: '"'$x'"' is not '"'$3'"' 63 echo $1 failed: '"'$x'"' is not '"'$3'"'
60 fi 64 fi
61 } 65 }
62 66
63 67
64 testit helloworld "" "Hello, world; or Καλημέρα κόσμε; or こんにちは 世界" 68 testit helloworld "" "Hello, world; or Καλημέρα κόσμε; or こんにちは 世界"
65 testit helloworld3 "" "hello, world can't open file; err=no such file or directo ry" 69 testit helloworld3 "" "hello, world can't open file; err=no such file or directo ry"
66 testit echo "hello, world" "hello, world" 70 testit echo "hello, world" "hello, world"
(...skipping 14 matching lines...) Expand all
81 testitpipe sieve "sed 10q" "2 3 5 7 11 13 17 19 23 29" 85 testitpipe sieve "sed 10q" "2 3 5 7 11 13 17 19 23 29"
82 testitpipe sieve "sed 10q" "2 3 5 7 11 13 17 19 23 29" 86 testitpipe sieve "sed 10q" "2 3 5 7 11 13 17 19 23 29"
83 87
84 # server hangs; don't run it, just compile it 88 # server hangs; don't run it, just compile it
85 $GC server.go 89 $GC server.go
86 testit server1 "" "" 90 testit server1 "" ""
87 91
88 testit eff_bytesize "" "1.00YB 9.09TB" 92 testit eff_bytesize "" "1.00YB 9.09TB"
89 testit eff_sequence "" "[-1 2 6 16 44]" 93 testit eff_sequence "" "[-1 2 6 16 44]"
90 94
91 rm -f $O.out *.$O 95 rm -f $O.out $O.out.exe *.$O "$TMPFILE"
OLDNEW
« no previous file with comments | « no previous file | src/cmd/ld/lib.c » ('j') | no next file with comments »

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