]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/run.bat
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / src / run.bat
index 89ed10d7a84b773bf8c8af73470103bb11022a2e..35c8ead8cb22473e96605ceb9474cb661c705d34 100644 (file)
@@ -1,47 +1,42 @@
-:: 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
-
-set GOOLDPATH=%PATH%
-set GOBUILDFAIL=0
-
-..\bin\tool\dist env -wp >env.bat
-if errorlevel 1 goto fail
-call env.bat
-del env.bat
-
-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, especially $GOROOT/test/run.
-
-echo ALL TESTS PASSED
-goto end
-
-:fail
-set GOBUILDFAIL=1
-
-:end
-set PATH=%GOOLDPATH%
+:: Copyright 2012 The Go Authors. All rights reserved.\r
+:: Use of this source code is governed by a BSD-style\r
+:: license that can be found in the LICENSE file.\r
+\r
+@echo off\r
+\r
+if exist ..\bin\go.exe goto ok\r
+echo Must run run.bat from Go src directory after installing cmd/go.\r
+goto fail\r
+:ok\r
+\r
+:: Keep environment variables within this script\r
+:: unless invoked with --no-local.\r
+if x%1==x--no-local goto nolocal\r
+if x%2==x--no-local goto nolocal\r
+setlocal\r
+:nolocal\r
+\r
+set GOBUILDFAIL=0\r
+\r
+set GOENV=off\r
+..\bin\go tool dist env > env.bat\r
+if errorlevel 1 goto fail\r
+call .\env.bat\r
+del env.bat\r
+\r
+set GOPATH=c:\nonexist-gopath\r
+\r
+if x%1==x--no-rebuild goto norebuild\r
+..\bin\go tool dist test --rebuild\r
+if errorlevel 1 goto fail\r
+goto end\r
+\r
+:norebuild\r
+..\bin\go tool dist test\r
+if errorlevel 1 goto fail\r
+goto end\r
+\r
+:fail\r
+set GOBUILDFAIL=1\r
+\r
+:end\r