golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/windows/test_buildlet.bash (about) 1 #!/bin/bash 2 3 # Copyright 2017 The Go Authors. All rights reserved. 4 # Use of this source code is governed by a BSD-style 5 # license that can be found in the LICENSE file. 6 7 # Prerequisites for using this script 8 9 set -ue 10 11 hostname="$1" 12 BUILDLET="windows-amd64-2012@${hostname}" 13 14 echo "Pushing go1.4 to buildlet" 15 gomote put14 "$BUILDLET" 16 17 echo "Pushing go tip to buildlet" 18 ( 19 TEMPDIR=`mktemp -d ` 20 cd $TEMPDIR 21 git clone https://go.googlesource.com/go 22 echo "devel.dummy_to_avoid_git_usage" > go/VERSION 23 tar zcf - ./go > go.tar.gz 24 gomote puttar "$BUILDLET" go.tar.gz 25 rm -rf go go.tar.gz 26 ) 27 28 echo "Building go (32-bit)" 29 gomote run -e GOARCH=386 -e GOHOSTARCH=386 -path 'C:/godep/gcc32/bin,$WORKDIR/go/bin,$PATH' -e 'GOROOT=c:\workdir\go' "$BUILDLET" go/src/make.bat 30 31 echo "Building go (64-bit)" 32 gomote run -path '$PATH,C:/godep/gcc64/bin,$WORKDIR/go/bin,$PATH' -e 'GOROOT=c:\workdir\go' "$BUILDLET" go/src/make.bat 33 34 # Note: full tests commented out for now. Comment out this early exit to 35 # re-enable tests when qualifying new VMs. 36 exit 0 37 38 # Keep going on error. 39 set +e 40 41 echo "Rebuilding go (32-bit)" 42 gomote run -e GOARCH=386 -e GOHOSTARCH=386 -path 'C:/godep/gcc32/bin,$WORKDIR/go/bin,$PATH' -e 'GOROOT=c:\workdir\go' "$BUILDLET" go/src/make.bat 43 44 echo "Running tests for go (32-bit)" 45 gomote run -e GOARCH=386 -e GOHOSTARCH=386 -path 'C:/godep/gcc32/bin,$WORKDIR/go/bin,$PATH' -e 'GOROOT=C:\workdir\go' "$BUILDLET" go/bin/go.exe tool dist test -v --no-rebuild 46 47 echo "Rebuilding go (64-bit)" 48 gomote run -path '$PATH,C:/godep/gcc64/bin,$WORKDIR/go/bin,$PATH' -e 'GOROOT=c:\workdir\go' "$BUILDLET" go/src/make.bat 49 50 echo "Running tests for go (64-bit)" 51 gomote run -path 'C:/godep/gcc64/bin,$WORKDIR/go/bin,$PATH' -e 'GOROOT=C:\workdir\go' "$BUILDLET" go/bin/go.exe tool dist test -v --no-rebuild