1
0
mirror of https://github.com/golang/go synced 2024-10-04 10:21:21 -06:00
go/src/run.bat
Alex Brainman 7c128493a4 test: actually run them on windows
R=golang-dev, r, rsc, bradfitz, minux.ma
CC=golang-dev
https://golang.org/cl/5756065
2012-03-13 12:51:28 +11:00

57 lines
1.0 KiB
Batchfile

:: Copyright 2012 The Go Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
@echo off
:: Keep environment variables within this script
:: unless invoked with --no-local.
if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal
setlocal
:nolocal
set GOBUILDFAIL=0
rem TODO avoid rebuild if possible
if x%1==x--no-rebuild goto norebuild
echo # Building packages and commands.
go install -a -v std
if errorlevel 1 goto fail
echo.
:norebuild
echo # Testing packages.
go test std -short -timeout=120s
if errorlevel 1 goto fail
echo.
echo # runtime -cpu=1,2,4
go test runtime -short -timeout=120s -cpu=1,2,4
if errorlevel 1 goto fail
echo.
echo # sync -cpu=10
go test sync -short -timeout=120s -cpu=10
if errorlevel 1 goto fail
echo.
:: TODO: The other tests in run.bash.
echo # test
cd ..\test
set FAIL=0
go run run.go
if errorlevel 1 set FAIL=1
cd ..\src
echo.
if %FAIL%==1 goto fail
echo ALL TESTS PASSED
goto end
:fail
set GOBUILDFAIL=1
:end