1
0
mirror of https://github.com/golang/go synced 2024-09-24 11:10:12 -06:00
Commit Graph

77 Commits

Author SHA1 Message Date
Shenghou Ma
dda6d6aa70 test: use testlib in a few more cases (part 2)
Introduced "runoutput" cmd for running generated program

R=golang-dev, iant, bradfitz, remyoudompheng
CC=golang-dev
https://golang.org/cl/5869049
2012-04-20 23:45:43 +08:00
Russ Cox
6e3a7930eb cmd/gc: if $GOROOT_FINAL is set, rewrite file names in object files
GOROOT_FINAL is a build parameter that means "eventually
the Go tree will be installed here".  Make the file name information
match that eventual location.

Fixes #3180.

R=ken, ken
CC=golang-dev
https://golang.org/cl/5742043
2012-03-05 16:13:33 -05:00
Shenghou Ma
6154f146af test/run: honor $TMPDIR
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5676094
2012-02-18 16:15:12 -05:00
Russ Cox
a0c13b9d49 test: add testlib
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5676077
2012-02-16 23:48:24 -05:00
Russ Cox
7b848c6964 cmd/dist: cross-compiling fixes
This CL makes it possible to run make.bash with
GOOS and GOARCH set to something other than
the native host GOOS and GOARCH.

As part of the CL, the tool directory moves from bin/tool/
to pkg/tool/goos_goarch where goos and goarch are
the values for the host system (running the build), not
the target.  pkg/ is not technically appropriate, but C objects
are there now tool (pkg/obj/) so this puts all the generated
binaries in one place (rm -rf $GOROOT/pkg cleans everything).
Including goos_goarch in the name allows different systems
to share a single $GOROOT on a shared file system.

Fixes #2920.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5645093
2012-02-13 22:31:51 -05:00
Luuk van Dijk
e0b2ce3401 cmd/gc: suspend safemode during typecheck of inlined bodies.
Should be obviously correct.  Includes minimal test case.
A future CL should clear up the logic around typecheckok and importpkg != nil someday.

R=rsc, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5652057
2012-02-10 22:50:55 +01:00
Russ Cox
8290536864 build: use cmd/dist
R=bradfitz, ality, r, r, iant, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5615058
2012-02-04 00:54:08 -05:00
Russ Cox
b3750ff52d build: rename $GOROOT/bin/go-tool to $GOROOT/bin/tool.
The go- is redundant now that the directory is required
to be inside $GOROOT.  Rob LGTMed the idea.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5618044
2012-02-02 23:32:41 -05:00
Russ Cox
2050a9e478 build: remove Make.pkg, Make.tool
Consequently, remove many package Makefiles,
and shorten the few that remain.

gomake becomes 'go tool make'.

Turn off test phases of run.bash that do not work,
flagged with $BROKEN.  Future CLs will restore these,
but this seemed like a big enough CL already.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5601057
2012-01-30 23:43:46 -05:00
Rob Pike
91cb3489ab go: move compilers into the go-tool directory
Also delete gotest, since it's messy to fix and slated for deletion anyway.
A couple of things outside src can't be tested any more. "go test" will be
fixed and these tests will be re-enabled. They're noisy for now.

Fixes #284.

R=rsc
CC=golang-dev
https://golang.org/cl/5598049
2012-01-30 14:46:31 -08:00
Russ Cox
389d55fadf build: pass $GCFLAGS to compiler
For example, if you are debugging an optimization
problem you can now run

        GCFLAGS=-N gotest

This is a convention for make, not for the general build,
so it may go away or be done differently in the eventual
'go' command.

The plan is that people will be able to test their code for
rune safety by doing GCFLAGS=-r.

R=golang-dev, bradfitz, lvd
CC=golang-dev
https://golang.org/cl/5294042
2011-10-18 14:55:10 -04:00
Russ Cox
67d48daae9 test: merge nilptr/* into one test
The 512 MB array causes load delays on some systems.
Now that we have recover, we can do all the tests in
one binary, so that the delay is incurred just once.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5142044
2011-09-26 13:59:01 -04:00
Luuk van Dijk
ac1b9545e3 ld: grow dwarf includestack on demand.
Fixes #2241
while not breaking issue 1878 again.

R=rsc
CC=golang-dev
https://golang.org/cl/4988048
2011-09-09 15:08:57 +02:00
Luuk van Dijk
940281bd3c test: put GOROOT/bin before all others in run
If you installed a 6g in /usr/bin it interferes
with test/run otherwise.

R=rsc
CC=golang-dev
https://golang.org/cl/4944046
2011-08-24 16:12:20 +02:00
Russ Cox
fe206e63ca build: handle spaces in $USER
Fixes #2107.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4830042
2011-07-28 13:04:52 -04:00
Robert Hencke
b88e669a8f nacl, tiny: remove vestiges
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4635053
2011-06-21 12:02:40 -04:00
Russ Cox
1499c78281 build: tidy intermediate files during build
This CL changes the behavior of 'make install' and 'make test'
in the src/cmd directory and the src/pkg directory to have
each recursive make clean up after itself immediately.

It does the same in test/run, removing $F.$A and $A.out
(the common byproducts) between runs.

On machines with slow disks and aggressive kernel caching,
cleaning up immediately can mean that the intermediate
objects never get written to disk.

This change eliminates almost all the disk waiting during
all.bash on my laptop (a Thinkpad X201s with an SSD running Linux).

147.50u 19.95s 277.34r	before
148.53u 21.64s 179.59r	after

R=golang-dev, r, iant2
CC=golang-dev
https://golang.org/cl/4413042
2011-04-13 16:24:57 -04:00
Rob Pike
2363784653 test/run: clear $E in case it's already set in environment.
R=rsc
CC=golang-dev
https://golang.org/cl/4312054
2011-03-25 11:33:07 -07:00
Russ Cox
5b1b2ba9c7 runtime: new allocation strategy for amd64
Do not reserve virtual address space.
Instead, assume it will be there when we need it,
and crash loudly if that assumption is violated.
Reserving the address space gets charged to
ulimit -v, which exceeds commonly set limits.

http://groups.google.com/group/golang-dev/msg/7c477af5f5a8dd2c

R=r, niemeyer
CC=golang-dev
https://golang.org/cl/4148045
2011-02-09 14:38:33 -05:00
Russ Cox
4608feb18b runtime: simpler heap map, memory allocation
The old heap maps used a multilevel table, but that
was overkill: there are only 1M entries on a 32-bit
machine and we can arrange to use a dense address
range on a 64-bit machine.

The heap map is in bss.  The assumption is that if
we don't touch the pages they won't be mapped in.

Also moved some duplicated memory allocation
code out of the OS-specific files.

R=r
CC=golang-dev
https://golang.org/cl/4118042
2011-01-28 15:03:26 -05:00
Russ Cox
8fff9166f6 arm: enable all tests
ARM functionality is now completely working.
(Or if it's not, we'll fix it.)

R=ken2
CC=golang-dev
https://golang.org/cl/2738041
2010-10-25 21:25:13 -07:00
Russ Cox
b7cb844ac8 build: make all.bash run on Ubuntu ARM
Sent from my phone.

R=adg
CC=golang-dev
https://golang.org/cl/2192049
2010-09-22 15:30:42 +10:00
Russ Cox
b11740fb6d build: fixes for native arm build
R=kaib
CC=golang-dev
https://golang.org/cl/2254044
2010-09-21 22:41:32 -04:00
Russ Cox
33c4ff0669 test: fix NaCl build
Wasn't running the temp binary under $E (emulator).

R=r
CC=golang-dev
https://golang.org/cl/2237043
2010-09-19 23:28:32 -04:00
Christian Himpel
5c603dbb75 build: remove unnecessary references to GOBIN and GOROOT
All scripts and makefiles assume that GOBIN is correctly set
in PATH.

R=rsc
CC=golang-dev
https://golang.org/cl/2043041
2010-08-30 15:40:56 -04:00
Russ Cox
da392d9136 build: no required environment variables
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
2010-08-18 10:08:49 -04:00
Russ Cox
26dde76cee gopack: handle long lines in export data
Also, if the header is bad, exit with a non-zero status.

Other calls to Brdline in the tree, by category:

Reading symbol name from object file:
./cmd/5l/obj.c:486: 		name = Brdline(f, '\0');
./cmd/6l/obj.c:535: 		name = Brdline(f, '\0');
./cmd/8l/obj.c:564: 		name = Brdline(f, '\0');
./libmach/sym.c:292: 		cp = Brdline(bp, '\0');

Reading archive header line (fixed, short):
./cmd/gc/lex.c:287: 	if((a = Brdline(b, '\n')) == nil)
./cmd/gc/lex.c:303: 	if((p = Brdline(b, '\n')) == nil)

Reading object file header line (fixed, short):
./cmd/ld/lib.c:421: 	line = Brdline(f, '\n');

Reading undefined symbol list (unused code):
./cmd/ld/lib.c:773: 	while((l = Brdline(b, '\n')) != nil){

Implementing Brdstr:
./libbio/brdstr.c:36: 		p = Brdline(bp, delim);

The symbol names ones will cause a problem loudly if they
fail: they'll error out with symbol name too long.  This means
that you can't define an enormous struct without giving the
type a name and then stick it in an interface, because the
type's symbol name will be too long for the object file.
Since this will be a loud failure instead of a silent one,
I'm willing to wait until it comes up in practice.

R=r
CC=golang-dev
https://golang.org/cl/1982041
2010-08-11 22:17:20 -07:00
Kai Backman
d0b913fe37 bikeshed: only output bug when we have a regression
R=rsc
CC=golang-dev
https://golang.org/cl/1897046
2010-08-03 13:09:16 -07:00
Russ Cox
d4af41f5bb test/run: diff old new
R=r, iant
CC=golang-dev
https://golang.org/cl/1907046
2010-08-03 13:01:28 -07:00
Russ Cox
0a9a3c128f test: fail is for bad exit status only
R=kaib
CC=golang-dev
https://golang.org/cl/1847043
2010-07-22 08:54:32 -07:00
Kai Backman
36057e721e more soft float support. passes several basic tests
but with less precision than hardware counterparts.

fixed a number of tests to output BUG when they failed.
changed the runner to distinghuish between output
and output containing ^BUG

R=rsc
CC=dho, golang-dev
https://golang.org/cl/1778041
2010-07-20 15:53:16 +03:00
Russ Cox
c6138efbcb runtime: closures, defer bug fix for Native Client
Enable package tests for Native Client build.

R=r
CC=golang-dev
https://golang.org/cl/957042
2010-04-22 17:52:22 -07:00
Kai Backman
df3a544085 synchronize ARM runner environment variable with run-arm
R=rsc
CC=golang-dev
https://golang.org/cl/912041
2010-04-15 12:47:49 +03:00
Russ Cox
6c196015e0 runtime: various arm fixes
* correct symbol table size
  * do not reorder functions in output
  * traceback
  * signal handling
  * use same code for go + defer
  * handle leaf functions in symbol table

R=kaib, dpx
CC=golang-dev
https://golang.org/cl/884041
2010-04-05 12:51:09 -07:00
Russ Cox
66cdc699b2 arm: fix build on android
R=kaib
CC=golang-dev
https://golang.org/cl/206059
2010-02-10 15:01:02 -08:00
Russ Cox
2a01d72878 gc: improved syntax errors
* example-based syntax errors (go.errors)

* enable bison's more specific errors
  and translate grammar token names into
  tokens like ++

* test cases

R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/194085
2010-01-26 23:13:22 -08:00
Sergey 'SnakE' Gromov
842d69b03d Make tests run on systems missing time utility
R=rsc
CC=golang-dev
https://golang.org/cl/164047
2009-11-30 15:07:57 -08:00
Devon H. O'Dell
553be8427e Build changes to support work on the BSDs.
This does still contain some FreeBSD-specific bits, but
it's a pain to do partial diffs.

R=rsc
https://golang.org/cl/152138
2009-11-14 15:29:09 -08:00
Russ Cox
662ee8704c test/run: use bash, not sh.
use bash builtin time instead of
assuming /usr/bin/time exists.

R=r
https://golang.org/cl/152124
2009-11-13 13:10:53 -08:00
Russ Cox
f3a97293b1 test/run: unset GREP_OPTIONS
Fixes #116.

R=r
https://golang.org/cl/152106
2009-11-12 14:55:26 -08:00
Russ Cox
da776791c4 drop output from nilptr tests;
too hard to make it the same everywhere.
still checking for non-zero exit status though.

disable core files while running tests

R=r
http://go/go-review/1026037
2009-11-09 23:11:36 -08:00
Kai Backman
52c549fc9b make 5g executables run on android/arm hardware. change OABI
usage to EABI.

        go/test: passes 85% (296/347) on random android phone.

R=rsc
http://go/go-review/1024003
2009-11-05 22:53:08 -08:00
Ian Lance Taylor
74a52ee75f Set LANG to control sorting. This affects the order in which
tests are processed, and thus the run.out output.  The default
LANG on Fedora 10, en_US.utf8, causes the tests to be sorted
differently--e.g., arrayindex1.go and arrayindex.go are sorted
in the opposite order.

R=r, rsc
http://go/go-review/1018022
2009-11-02 13:17:12 -08:00
Russ Cox
60ff8cc86f address bug193 and add note to spec about it.
R=ken
OCL=35920
CL=35920
2009-10-20 08:27:14 -07:00
Russ Cox
02fd255a14 bug162, over and over
R=ken
OCL=35919
CL=35919
2009-10-20 08:03:43 -07:00
Rob Pike
f6d67c9e95 write stack traces and panics to stderr
R=rsc
DELTA=31  (5 added, 3 deleted, 23 changed)
OCL=35700
CL=35700
2009-10-13 22:48:03 -07:00
Russ Cox
ebd27d62fd time tests; sort -nr times.out | sed 10q is illuminating.
cut the slowest tests  down from a few seconds
to under half a second.

R=r
DELTA=21  (6 added, 1 deleted, 14 changed)
OCL=35509
CL=35519
2009-10-09 11:18:32 -07:00
Russ Cox
567673fc42 nacl - run tests under emulator.
special all-nacl.bash and test/run-nacl that
run just the tests known to work under nacl.
the rest requires closures.

fix another bug or two in syscall.

R=r
DELTA=420  (410 added, 8 deleted, 2 changed)
OCL=34882
CL=34907
2009-09-22 16:56:28 -07:00
Russ Cox
f0536598b1 fix build
R=kaib
OCL=34823
CL=34823
2009-09-18 21:17:16 -07:00
Kai Backman
1c71ab1808 added emulator support for arm.
R=rsc
APPROVED=rsc
DELTA=7  (3 added, 0 deleted, 4 changed)
OCL=34661
CL=34820
2009-09-18 19:09:12 -07:00