~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/race.bat

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
:: Copyright 2013 The Go Authors. All rights reserved.
 
2
:: Use of this source code is governed by a BSD-style
 
3
:: license that can be found in the LICENSE file.
 
4
 
 
5
:: race.bash tests the standard library under the race detector.
 
6
:: http://golang.org/doc/articles/race_detector.html
 
7
 
 
8
@echo off
 
9
 
 
10
setlocal
 
11
 
 
12
if exist make.bat goto ok
 
13
echo race.bat must be run from go\src
 
14
:: cannot exit: would kill parent command interpreter
 
15
goto end
 
16
:ok
 
17
 
 
18
call make.bat --dist-tool >NUL
 
19
if errorlevel 1 goto fail
 
20
.\cmd\dist\dist env -wp >env.bat
 
21
if errorlevel 1 goto fail
 
22
call env.bat
 
23
del env.bat
 
24
 
 
25
if %GOHOSTARCH% == amd64 goto continue
 
26
echo Race detector is only supported on windows/amd64.
 
27
goto fail
 
28
 
 
29
:continue
 
30
call make.bat --no-banner --no-local
 
31
if %GOBUILDFAIL%==1 goto end
 
32
echo # go install -race std
 
33
go install -race std
 
34
if errorlevel 1 goto fail
 
35
echo # go test -race -short -std
 
36
go test -race -short std
 
37
if errorlevel 1 goto fail
 
38
echo # go test -race -run=nothingplease -bench=.* -benchtime=.1s -cpu=4 std
 
39
go test -race -run=nothingplease -bench=.* -benchtime=.1s -cpu=4 std
 
40
if errorlevel 1 goto fail
 
41
goto succ
 
42
 
 
43
:fail
 
44
set GOBUILDFAIL=1
 
45
echo Fail.
 
46
goto end
 
47
 
 
48
:succ
 
49
echo All tests passed.
 
50
 
 
51
:end
 
52