Commit graph

3 commits

Author SHA1 Message Date
Dan Willemsen
10e4357dbb Fix -test.run test selection with gotestmain
matchString was implemented separately on older go versions since they
didn't want a build dependency on the regex package from the testing
package.

Starting in Go 1.8, this is implemented using a internal package to
break the dependency, but until we require that everywhere, just copy
the regex implementation like the old `go test` did. I'm not sure we'll
be able to use the internal package in the future anyways.

Change-Id: Ief37542640026f9d73a75fd802f2691af50e2511
2017-01-18 14:37:13 -08:00
Tim Kilbourn
a664b0a7d6 Fix package names for executables.
Go 1.6 fixed a bug where compiling with the -pack flag allowed non-main
packages to link.
https://github.com/golang/go/issues/13468

This change uses package main for choosestage and gotestmain.
2016-03-23 20:57:43 -07:00
Dan Willemsen
87ba294ceb Add option to build and run tests during bootstrap
Users that want to enable this option can use the '-t' option to
bootstrap.bash when passing '-r'. Builders that want to enable this can
set the RUN_TESTS environment variable in their bootstrap.bash.

The gotestmain tools is needed to write the main functions for the test
binaries, since 'go test' doesn't work well in this environment.

Change-Id: Iec5c2b5c9c3f5e3ba0ac8677fb88f5e963f9bd3f
2015-06-25 11:45:54 -07:00