diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2015-03-02 17:07:11 -0800 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2015-03-03 23:22:11 +0000 |
commit | d5f690609fd7ffd0d21b27f5a474052839beb0d3 (patch) | |
tree | 022b78a48ebdcaabd0a4a5f6cc7e23adac576686 /src/run.bat | |
parent | 4f6630de3ab6eea9c863dada024cc98ce20bfe4a (diff) | |
download | go-d5f690609fd7ffd0d21b27f5a474052839beb0d3.tar.gz go-d5f690609fd7ffd0d21b27f5a474052839beb0d3.zip |
build: convert run.bash, run.bat, and run.rc into a Go program
This will enable test sharding over multiple VMs, to speed trybot answers.
Update #10029
Change-Id: Ie277c6459bc38005e4d6af14d22effeaa0a4667e
Reviewed-on: https://go-review.googlesource.com/6531
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/run.bat')
-rw-r--r-- | src/run.bat | 101 |
1 files changed, 1 insertions, 100 deletions
diff --git a/src/run.bat b/src/run.bat index 57a8828ef9..495711102e 100644 --- a/src/run.bat +++ b/src/run.bat @@ -37,109 +37,10 @@ call env.bat del env.bat echo. -echo ##### Testing packages. -go test std cmd -short -timeout=240s +go tool dist test --no-rebuild if errorlevel 1 goto fail echo. -set OLDGOMAXPROCS=%GOMAXPROCS% - -:: We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code, -:: creation of first goroutines and first garbage collections in the parallel setting. -echo ##### GOMAXPROCS=2 runtime -cpu=1,2,4 -set GOMAXPROCS=2 -go test runtime -short -timeout=600s -cpu=1,2,4 -if errorlevel 1 goto fail -echo. - -set GOMAXPROCS=%OLDGOMAXPROCS% -set OLDGOMAXPROCS= - -echo ##### sync -cpu=10 -go test sync -short -timeout=240s -cpu=10 -if errorlevel 1 goto fail -echo. - -:: Race detector only supported on Linux and OS X, -:: and only on amd64, and only when cgo is enabled. -if not "%GOHOSTOS%-%GOOS%-%GOARCH%-%CGO_ENABLED%" == "windows-windows-amd64-1" goto norace -echo ##### Testing race detector. -go test -race -i runtime/race flag -if errorlevel 1 goto fail -go test -race -run=Output runtime/race -if errorlevel 1 goto fail -go test -race -short flag -if errorlevel 1 goto fail -echo. -:norace - -echo ##### ..\test\bench\go1 -go test ..\test\bench\go1 -if errorlevel 1 goto fail -echo. - -:: cgo tests -if x%CGO_ENABLED% == x0 goto nocgo -echo ##### ..\misc\cgo\life -go run "%GOROOT%\test\run.go" - ..\misc\cgo\life -if errorlevel 1 goto fail -echo. - -echo ##### ..\misc\cgo\stdio -go run "%GOROOT%\test\run.go" - ..\misc\cgo\stdio -if errorlevel 1 goto fail -echo. - -:: cgo tests inspect the traceback for runtime functions -set OLDGOTRACEBACK=%GOTRACEBACK% -set GOTRACEBACK=2 - -echo ##### ..\misc\cgo\test -go test ..\misc\cgo\test -if errorlevel 1 goto fail -echo. - -set GOTRACEBACK=%OLDGOTRACEBACK% -set OLDGOTRACEBACK= - -echo ##### ..\misc\cgo\testso -cd ..\misc\cgo\testso -set FAIL=0 -call test.bat -cd ..\..\..\src -if %FAIL%==1 goto fail -echo. -:nocgo - -echo ##### ..\doc\progs -go run "%GOROOT%\test\run.go" - ..\doc\progs -if errorlevel 1 goto fail -echo. - -:: TODO: The other tests in run.bash. - - -set OLDGOMAXPROCS=%GOMAXPROCS% - -echo ##### ..\test -cd ..\test -set FAIL=0 -set GOMAXPROCS= -go run run.go -if errorlevel 1 set FAIL=1 -cd ..\src -echo. -if %FAIL%==1 goto fail - -set GOMAXPROCS=%OLDGOMAXPROCS% -set OLDGOMAXPROCS= - -:: echo ##### Checking API compatibility. -go run "%GOROOT%\src\cmd\api\run.go" -if errorlevel 1 goto fail -echo. - -echo ALL TESTS PASSED goto end :fail |