1
0
mirror of https://github.com/golang/go synced 2024-10-04 17:21:20 -06:00
Commit Graph

192 Commits

Author SHA1 Message Date
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
Alex Brainman
8d6958fc04 misc/cgo/test: make tests run on windows
- use proper Win64 gcc calling convention when
  calling initcgo on amd64
- increase g0 stack size to 64K on amd64 to make
  it the same as 386
- implement C.sleep
- do not use C.stat, since it is renamed to C._stat by mingw
- use fopen to implement TestErrno, since C.strtol
  always succeeds on windows
- skip TestSetEnv on windows, because os.Setenv
  sets windows process environment, while C.getenv
  inspects internal C runtime variable instead

R=golang-dev, vcc.163, rsc
CC=golang-dev
https://golang.org/cl/5500094
2012-01-20 12:59:44 +11:00
Russ Cox
146a703cd1 cmd/go: add -v flag to build and install
The -v flag prints the names of packages as they are built/installed.

Use -v in make.bash/run.bash to avoid a silent pause during
the build while Go code is being compiled.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5532055
2012-01-09 16:44:01 -08:00
Russ Cox
8f5f347e2c cmd/go: many improvements
* correct dependency calculations
* comment meaning of action fields
* new alias "std" like "all" but standard packages only
* add -o flag to 'go build'
* set up for parallel build (still serial)
* understand that import "C" depends on cgo, runtime/cgo

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5502055
2011-12-21 07:47:12 -05:00
Russ Cox
efa2246e42 build: rewrite to use bash time builtin
Should help windows/amd64

R=adg
CC=golang-dev
https://golang.org/cl/5500058
2011-12-21 01:24:57 -05:00
Brad Fitzpatrick
0735e06cfd build: fix the build with USE_GO_TOOL=false
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5502051
2011-12-20 15:30:36 -08:00
Russ Cox
41a6165c03 build: use go command during build
If something goes wrong, it should suffice to set
USE_GO_TOOL=false in env.bash to fall back to the
makefiles.  I will delete the makefiles in January.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5502047
2011-12-20 16:50:13 -05:00
Russ Cox
6e8875551a test/bench/go1: first draft of Go 1 benchmark suite
I have included a few important microbenchmarks,
but the overall intent is to have mostly end-to-end
benchmarks timing real world operations.

The jsondata.go file is a summary of agl's
activity in various open source repositories.
It gets used as test data for many of the benchmarks.

Everything links into one binary (even the test data)
so that it is easy to run the benchmarks on many
computers: there is just one file to copy around.

R=golang-dev, r, bradfitz, adg, r
CC=golang-dev
https://golang.org/cl/5484071
2011-12-15 12:32:59 -05:00
Russ Cox
bcbb2f93ee test/bench: move to test/bench/shootout
R=golang-dev, r, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5487067
2011-12-13 17:46:54 -05:00
Alex Brainman
692c31d60a misc/cgo/testso: do not leave out file behind
R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/5461044
2011-12-09 11:00:49 +11:00
Dmitriy Vyukov
11e73b89ca cgo: add support for callbacks from dynamic libraries
R=golang-dev, rsc
CC=golang-dev, mpimenov
https://golang.org/cl/5375042
2011-11-22 17:57:49 +03:00
Russ Cox
8219cc9af8 runtime: fix memory leak in parallel garbage collector
The work buffer management used by the garbage
collector during parallel collections leaks buffers.
This CL tests for and fixes the leak.

R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/5254059
2011-10-12 13:23:34 -04:00
Robert Griesemer
e58a77809d ebnf, ebnflint: move under exp
pkg/ebnf -> pkg/exp/ebnf
cmd/ebnflint -> pkg/exp/ebnflint

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5188042
2011-10-11 17:43:10 -07:00
Russ Cox
0b09a56a64 test: disable sigchld test on Windows
Alex Brainman reports that this is the only test
that keeps us from running test/run.

R=alex.brainman, lucio.dere, bradfitz, hectorchu
CC=golang-dev
https://golang.org/cl/4777043
2011-09-26 13:11:22 -04:00
Russ Cox
c02423902d build: allow builds without cgo
R=bradfitz, dsymonds, fshahriar
CC=golang-dev
https://golang.org/cl/4859043
2011-08-10 21:36:48 -04:00
Robert Griesemer
4c986d86b1 exp/eval, exp/ogle: remove packages eval and ogle
An externally maintained version of exp/eval can
be found at: https://bitbucket.org/binet/go-eval/ .

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/4695047
2011-07-13 09:40:53 -07:00
Alex Brainman
7cc5d5db9d run.bash: small fix
Fixes #2025.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4636075
2011-06-30 09:44:16 +10:00
Russ Cox
55b0662465 godefs: remove test from build
The test is only defined on darwin/amd64, and it fails
with recent versions of Xcode, which do not support
-gstabs+ debugging output.  At some point godefs will
have to be replaced, perhaps merged with cgo.
Godefs is not needed during builds anyway (its output files
are checked into the repository in src/pkg/runtime),
so its failure on the newer Xcode is a distraction from an
otherwise usable build.  Disable the test.

Fixes #1985.

R=golang-dev, gri, robert.hencke, r
CC=golang-dev
https://golang.org/cl/4638053
2011-06-21 21:45:13 -04:00
Robert Hencke
a5b5e2b79e godefs: rudimentary tests
currently only defined for darwin

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4528123
2011-06-20 11:54:07 +10:00
Rob Pike
2ccd20a646 tutorial: replace the forever loops with finite counts in sieve programs.
Fixes #1742.
I hope.

Also this picks up an update to go_tutorial.html that should already have happened.

R=brainman, rsc, peterGo
CC=golang-dev
https://golang.org/cl/4452050
2011-04-27 09:59:27 -07:00
Russ Cox
98cf39e270 run.bash: remove redundant rebuilds
R=r
CC=golang-dev
https://golang.org/cl/4449041
2011-04-20 18:19:22 -04:00
Robert Griesemer
5666ec8735 fix build: disable gofmt test script, enable gotest testing instead
R=rsc
CC=golang-dev
https://golang.org/cl/4403045
2011-04-13 14:24:38 -07:00
Alex Brainman
776fd72579 test/bench: enable build and test on Windows
R=golang-dev, rsc1
CC=golang-dev
https://golang.org/cl/4366043
2011-04-08 10:43:25 +10:00
Alex Brainman
2683c76d95 misc/cgo/life: enable build and test on Windows
R=golang-dev, rsc1
CC=golang-dev, vcc
https://golang.org/cl/4374044
2011-04-08 10:35:35 +10:00
Russ Cox
6b3357129a build: add all-qemu.bash, handful of arm fixes
R=r
CC=golang-dev
https://golang.org/cl/4313051
2011-03-27 23:39:42 -04:00
Rob Pike
d406f8f650 testing: set up structure for faster testing using the new -test.short flag.
New make target "testshort" runs "gotest -test.short" and is invoked
by run.bash, which is invoked by all.bash.

Use -test.short to make one package (crypto ecdsa) run much faster.
More changes to come.

Once this is in, I will update the long-running tests to use the new flag.

R=rsc
CC=golang-dev
https://golang.org/cl/4317043
2011-03-25 14:50:44 -07:00
Russ Cox
ec713d68b8 build: run gotest in misc/cgo/test
R=golang-dev, iant, r
CC=golang-dev
https://golang.org/cl/4239079
2011-03-11 15:09:32 -05:00
Alex Brainman
2ae4f356cc doc/codelab/wiki: include into windows build
R=adg, rsc
CC=Joe Poirier, golang-dev
https://golang.org/cl/4257052
2011-03-07 15:48:39 +11:00
Russ Cox
b9f94768f9 build: run test/ directory first
R=adg, r
CC=golang-dev
https://golang.org/cl/4183047
2011-02-14 09:27:02 -05:00
Rob Pike
6c03b0d468 run.bash: must make codelab before we can test it.
this will break the build, but it's already silently broken.

R=rsc
CC=golang-dev
https://golang.org/cl/4168041
2011-02-09 12:46:49 -08:00
Alex Brainman
642c774081 src/run.bash: get rid of long windows expression
R=rsc
CC=golang-dev
https://golang.org/cl/4138041
2011-02-09 12:37:08 +11:00
Alex Brainman
3bfd35b72e run.bash: disable doc/codelab/wiki test on windows
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4119047
2011-01-31 15:58:44 +11:00
Andrew Gerrand
add4e167e3 doc/codelab/wiki: update to work with template changes, add to run.bash
Fixes #1444.

R=rsc, r
CC=golang-dev
https://golang.org/cl/3979045
2011-01-26 14:56:52 +10:00
Russ Cox
0cd3475386 misc/cgo/life: fix, add to build
#pragma dynexport is no longer needed for
this use of cgo, since the gcc and gc code are
now linked together into the same binary.
It may still be necessary later.

On the Mac, you cannot use the GOT to resolve
symbols that exist in the current binary, so 6l and 8l
translate the GOT-loading mov instructions into lea
instructions.

On ELF systems, we could use the GOT for those
symbols, but for consistency 6l and 8l apply the
same translation.

The translation is sketchy in the extreme
(depending on the relocation being in a mov
instruction) but it verifies that the instruction
is a mov before rewriting it to lea.

Also makes typedefs global across files.

Fixes #1335.
Fixes #1345.

R=iant, r
CC=golang-dev
https://golang.org/cl/3650042
2010-12-17 09:51:55 -08:00
Andrew Gerrand
06492d47cb build: add gobuilder and goplay to run.bash
gobuilder: fix build to work with new log package

R=rsc
CC=golang-dev
https://golang.org/cl/2592041
2010-10-21 10:46:10 +11: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
Joe Poirier
479cbd6d34 (windows) disable tests that cause the build to fail
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/2171044
2010-09-13 13:36:51 +10: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
aafe474ec9 build: $GOBIN defaults to $GOROOT/bin
R=r
CC=golang-dev
https://golang.org/cl/1982049
2010-08-24 20:00:33 -04:00
Russ Cox
632417e5e7 run.bash: fix freebsd build (i hope)
R=adg
CC=golang-dev
https://golang.org/cl/2012041
2010-08-18 10:22:57 -04:00
Andrew Gerrand
8b20200fe1 run.bash: remove MAKEFLAGS=-j4 to prevent crashing on freebsd
R=rsc
CC=golang-dev
https://golang.org/cl/881044
2010-04-05 10:53:38 +10:00
Russ Cox
69fd2a4ab7 build script tweaks
factor out environment variable checks.
infer $GOROOT etc during build if not set.
it's still necessary to set them for yourself
to use the standard Makefiles.

when running all.bash, don't recompile all the
go packages in run.bash, since make.bash already did.

R=r
CC=golang-dev
https://golang.org/cl/609042
2010-03-31 19:48:33 -07:00
Devon H. O'Dell
857d4cf1a9 Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/src
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.

R=rsc
CC=golang-dev
https://golang.org/cl/171044
2009-12-11 15:14:09 -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
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
Russ Cox
219fb02042 fix build after Mercurial move.
various missing or incorrect files.

R=r
CC=go-dev
http://go/go-review/1014004
2009-10-22 10:59:27 -07:00
David Symonds
69fc06dfa1 Move usr/dsymonds/iterable to src/pkg/exp/iterable.
Remove remainder of usr/dsymonds.

R=rsc,r
APPROVED=r
DELTA=685  (275 added, 409 deleted, 1 changed)
OCL=35810
CL=35933
2009-10-20 14:10:22 -07:00
Russ Cox
2b7fde3406 move austin/eval and austin/ogle to exp/eval and exp/ogle
R=r
OCL=35736
CL=35746
2009-10-14 18:10:43 -07:00
Russ Cox
168777d4af fix build
TBR=r
OCL=35308
CL=35308
2009-10-03 15:02:11 -07:00
Russ Cox
2d72b39fd3 add cgo test that doesn't depend on
non-standard libraries and add to build.

R=r
DELTA=211  (210 added, 0 deleted, 1 changed)
OCL=35293
CL=35307
2009-10-03 11:33:51 -07:00
Austin Clements
3c8a1de720 Add eval and ogle to the build process so they can be kept up
to date.

R=rsc
APPROVED=rsc
DELTA=8  (6 added, 0 deleted, 2 changed)
OCL=35009
CL=35011
2009-09-25 11:36:27 -07:00
Russ Cox
b5c57fea96 delete forward type declarations
R=r
DELTA=163  (1 added, 149 deleted, 13 changed)
OCL=33106
CL=33111
2009-08-12 14:40:47 -07:00
Rob Pike
266a2c47e0 run benchmarks in a relatively fast test mode, as part of run.bash/all.bash
R=rsc
DELTA=293  (224 added, 0 deleted, 69 changed)
OCL=32917
CL=32944
2009-08-09 14:31:05 -07:00
Russ Cox
54b403723b delay := processing
R=ken
OCL=32772
CL=32772
2009-08-05 00:42:44 -07:00
Robert Griesemer
7b7b83ba1b ebnflint command
- basic verification of EBNF grammars
- tested with (and has testcase for) go_spec.html

R=rsc
DELTA=150  (148 added, 0 deleted, 2 changed)
OCL=31481
CL=31517
2009-07-13 10:26:58 -07:00
Robert Griesemer
d8e4446d12 - install gofmt in src/cmd/gofmt
- remove some left-over files

R=rsc
DELTA=1465  (281 added, 1181 deleted, 3 changed)
OCL=30350
CL=30353
2009-06-16 12:03:32 -07:00
Rob Pike
d90e7cbac6 mv src/lib to src/pkg
tests: all.bash passes, gobuild still works, godoc still works.

R=rsc
OCL=30096
CL=30102
2009-06-09 09:53:44 -07:00
Rob Pike
86043a87c9 mv container/vector down one level for new rules.
simplify run.bash now that lib has make test that recurs.

R=rsc
DELTA=1179  (578 added, 596 deleted, 5 changed)
OCL=28313
CL=28313
2009-05-05 17:24:01 -07:00
Russ Cox
1605176e25 godoc: use data-driven templates for html, text generation
R=gri
DELTA=1341  (668 added, 282 deleted, 391 changed)
OCL=27485
CL=27526
2009-04-15 18:53:43 -07:00
Rob Pike
4482801477 move template into its own directory so it can have more files
R=rsc
DELTA=1421  (736 added, 685 deleted, 0 changed)
OCL=27249
CL=27249
2009-04-08 23:43:02 -07:00
Ian Lance Taylor
a52d6fb73a Add a few tests which weren't being run.
R=r
DELTA=4  (4 added, 0 deleted, 0 changed)
OCL=26797
CL=26814
2009-03-26 22:20:27 -07:00
Robert Griesemer
dc5ddd7d84 - directory rename lang -> go
R=rsc
DELTA=2070  (1035 added, 1035 deleted, 0 changed)
OCL=25939
CL=25939
2009-03-09 12:41:53 -07:00
Robert Griesemer
b4802dd568 Created new directory lib/lang:
- move scanner to into lib/lang
- added test
- adjusted various make and build files

R=r
DELTA=1731  (973 added, 753 deleted, 5 changed)
OCL=25668
CL=25713
2009-03-04 17:13:12 -08:00
Rob Pike
e8e894bff3 enable pretty in run.bash
R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=25651
CL=25655
2009-03-03 16:09:40 -08:00
Russ Cox
be2edb5761 Automated g4 rollback of changelist 25024,
plus significant hand editing.

Back to T{x} for composite literals.

R=r
OCL=25612
CL=25632
2009-03-03 08:39:12 -08:00
Russ Cox
78906c3836 io.Pipe
assorted underscore cleanup

R=r
DELTA=488  (410 added, 3 deleted, 75 changed)
OCL=25070
CL=25070
2009-02-16 16:32:30 -08:00
Russ Cox
d8921c5294 cleanups:
get rid of _ on private names in net.
	fix os_test file name list.
	newline not needed on Errorf.

R=r
DELTA=305  (34 added, 2 deleted, 269 changed)
OCL=25047
CL=25047
2009-02-15 14:18:39 -08:00
Russ Cox
78a6d68c86 build nits
R=r
DELTA=8  (0 added, 6 deleted, 2 changed)
OCL=25045
CL=25045
2009-02-15 13:41:48 -08:00
Russ Cox
07d344e442 remove export name-list statement.
make package local the default.
warn about name case not matching export keyword.

R=ken
OCL=22881
CL=22886
2009-01-15 16:16:52 -08:00
Ken Thompson
b0f627a6e1 closed arrays including [...]
R=r
OCL=22182
CL=22182
2009-01-06 17:31:24 -08:00
Robert Griesemer
af065a0c77 - make code in gosrc compile again, check in all pending changes
(this code doesn't match the existing language at this point,
  but it's a large code base which compiles - will eventually go
  away)
- enable compilation of it again in run.bash

R=r
DELTA=1147  (534 added, 311 deleted, 302 changed)
OCL=22176
CL=22176
2009-01-06 16:26:45 -08:00
Rob Pike
8d21004b41 make the tutorial programs run again.
(the text still needs fixing)
add the tutorial programs to the test run.

R=rsc
DELTA=41  (6 added, 0 deleted, 35 changed)
OCL=22174
CL=22174
2009-01-06 15:49:27 -08:00
Russ Cox
5564504507 new new & make
R=r
OCL=22166
CL=22166
2009-01-06 15:19:02 -08:00
Russ Cox
08ca30bbfa change *map to map; *chan to chan; new(T) to new(*T)
fix bugs left over from *[] to [] conversion.

TBR=r
OCL=21576
CL=21581
2008-12-19 03:05:37 -08:00
Russ Cox
d47d888ba6 convert *[] to [].
R=r
OCL=21563
CL=21571
2008-12-18 22:37:22 -08:00
Russ Cox
83348f956e host and port name lookup
R=r,presotto
DELTA=1239  (935 added, 281 deleted, 23 changed)
OCL=21041
CL=21539
2008-12-18 15:42:39 -08:00
Russ Cox
793a6effcf add JSON library
R=r
DELTA=1127  (1127 added, 0 deleted, 0 changed)
OCL=20975
CL=20983
2008-12-11 12:25:58 -08:00
Ian Lance Taylor
1a19cb8ec0 Make run.bash run all the current tests.
R=r,rsc
DELTA=8  (8 added, 0 deleted, 0 changed)
OCL=20468
CL=20473
2008-12-04 13:14:09 -08:00
Russ Cox
bf3dd3f0ef add mutex.Mutex
R=r
DELTA=349  (348 added, 0 deleted, 1 changed)
OCL=20380
CL=20472
2008-12-04 12:51:36 -08:00
Russ Cox
5169bb44e6 utf8 routines in go; a start.
also:
	* parse flags in testing.Main.
	* add make test in src/lib.

R=r
DELTA=323  (323 added, 0 deleted, 0 changed)
OCL=19831
CL=19850
2008-11-21 16:13:31 -08:00
Russ Cox
5014da7cb0 add math to tests; clean a bit
R=r
DELTA=33  (12 added, 9 deleted, 12 changed)
OCL=19688
CL=19696
2008-11-20 10:54:11 -08:00
Rob Pike
12254b6c0b change naming convention for tests from
test*.go
to
	*test.go

R=rsc
DELTA=1747  (864 added, 855 deleted, 28 changed)
OCL=19666
CL=19666
2008-11-19 19:11:01 -08:00
Russ Cox
92a4fe1dd5 more tests for strconv; convert to gotest.
R=r
DELTA=219  (186 added, 32 deleted, 1 changed)
OCL=19508
CL=19523
2008-11-18 17:12:14 -08:00
Russ Cox
079c00a475 correctly rounded floating-point conversions
in new package strconv.

move atoi etc to strconv too.

update fmt, etc to use strconv.

R=r
DELTA=2232  (1691 added, 424 deleted, 117 changed)
OCL=19286
CL=19380
2008-11-17 12:34:03 -08:00
Robert Griesemer
3c2f0ae132 * pretty printing snapshot: towards printing comments nicely
- implemented elastic tabstops algorithm, now correct and documented
- first cut at printing comments (use -comments flag, disabled for now)
- struct field types are now aligned (using elastic tab stops)
- needs more fine-tuning

* fixed a bug in test script
* added quick smoke test to makefile and invoke it in run.bash
  instead of the full test

R=r
OCL=19220
CL=19220
2008-11-13 17:50:46 -08:00
Russ Cox
527669e6b1 set -e doesn't apply to ( ) blocks
R=r
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=18044
CL=18068
2008-10-29 15:23:29 -07:00
Rob Pike
84b66d25de delete unused reflection playpen
R=rsc
DELTA=442  (0 added, 442 deleted, 0 changed)
OCL=17854
CL=17866
2008-10-26 08:27:27 -07:00
Ken Thompson
b379d54dea another step toward interface subtypes
put explicit ./ on some runtime tests

R=r
OCL=17839
CL=17839
2008-10-24 20:14:28 -07:00
Rob Pike
536b1f2e98 add reflect to build, clean up test
R=rsc
DELTA=341  (188 added, 151 deleted, 2 changed)
OCL=17678
CL=17750
2008-10-23 17:13:34 -07:00
Russ Cox
46d3497a04 run.bash: do not make test in gosrc
R=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=17476
CL=17499
2008-10-20 15:08:53 -07:00
Rob Pike
84523402fc Make regexp build and install officially
R=rsc
DELTA=335  (172 added, 156 deleted, 7 changed)
OCL=17167
CL=17180
2008-10-14 22:16:45 -07:00
Russ Cox
bbb00c62e1 split all.bash into make.bash and run.bash
R=r
OCL=16720
CL=16728
2008-10-08 09:46:54 -07:00