summaryrefslogtreecommitdiff
path: root/src/run.bat
diff options
context:
space:
mode:
Diffstat (limited to 'src/run.bat')
-rw-r--r--src/run.bat61
1 files changed, 54 insertions, 7 deletions
diff --git a/src/run.bat b/src/run.bat
index 9a09d435c..5f7164a0c 100644
--- a/src/run.bat
+++ b/src/run.bat
@@ -30,6 +30,13 @@ echo.
:: at least runtime/debug test will fail.
set GOROOT_FINAL=
+:: get CGO_ENABLED
+go env > env.bat
+if errorlevel 1 goto fail
+call env.bat
+del env.bat
+echo.
+
echo # Testing packages.
go test std -short -timeout=120s
if errorlevel 1 goto fail
@@ -45,30 +52,70 @@ go test sync -short -timeout=120s -cpu=10
if errorlevel 1 goto fail
echo.
+if not "%GOHOSTOS%-%GOOS%-%GOARCH%-%CGO_ENABLED%" == "windows-windows-amd64-1" goto norace
+echo # Testing race detector.
+go test -race -i flag
+if errorlevel 1 goto fail
+go test -race -short flag
+if errorlevel 1 goto fail
+echo.
+:norace
+
echo # ..\misc\dashboard\builder ..\misc\goplay
go build ..\misc\dashboard\builder ..\misc\goplay
if errorlevel 1 goto fail
echo.
-:: TODO(brainman): disabled, because it fails with: mkdir C:\Users\ADMINI~1\AppData\Local\Temp\2.....\test\bench\: The filename or extension is too long.
-::echo # ..\test\bench\go1
-::go test ..\test\bench\go1
-::if errorlevel 1 goto fail
-::echo.
+echo # ..\test\bench\go1
+go test ..\test\bench\go1
+if errorlevel 1 goto fail
+echo.
+
+:: cgo tests
+:: issue 4955 - cgo is broken
+goto nocgo
+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.
+
+echo # ..\misc\cgo\test
+go test ..\misc\cgo\test
+if errorlevel 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.
-echo # test
+
+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 tool api -c ..\api\go1.txt -next ..\api\next.txt
+go tool api -c ..\api\go1.txt -next ..\api\next.txt -except ..\api\except.txt
if errorlevel 1 goto fail
echo.