diff options
| author | Shenghou Ma <minux@golang.org> | 2015-03-24 02:23:22 -0400 |
|---|---|---|
| committer | Minux Ma <minux@golang.org> | 2015-03-24 23:58:14 +0000 |
| commit | 16d8b411b2f6d652e4e27c3ea8391d9c1e5ce8c2 (patch) | |
| tree | 7c3965436fcb01936fd40f2fc0620edd424642dc | |
| parent | 89f4fd3fd0d1d3660520f3bbb3500f2df1821f71 (diff) | |
| download | go-16d8b411b2f6d652e4e27c3ea8391d9c1e5ce8c2.tar.xz | |
nacltest.bash: reduce test time by using bootstrapping Go to build fstest_nacl.go
One full round of make.bash is saved with this change.
Change-Id: I8ad1442e9e1255b9abe14dbfec4c903d897d6015
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/7976
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
| -rwxr-xr-x | src/nacltest.bash | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nacltest.bash b/src/nacltest.bash index 534f1ef5af..eb1ac3d908 100755 --- a/src/nacltest.bash +++ b/src/nacltest.bash @@ -59,22 +59,22 @@ if ! which go_nacl_${naclGOARCH}_exec >/dev/null; then exit 1 fi -# Run host build to get toolchain for running zip generator. unset GOOS GOARCH if [ ! -f make.bash ]; then echo 'nacltest.bash must be run from $GOROOT/src' 1>&2 exit 1 fi -GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH ./make.bash # the builder might have set GOROOT_FINAL. export GOROOT=$(pwd)/.. # Build zip file embedded in package syscall. -gobin=${GOBIN:-$(pwd)/../bin} +echo "##### Building fake file system zip for nacl" rm -f syscall/fstest_nacl.go -GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH $gobin/go run ../misc/nacl/mkzip.go -p syscall -r .. ../misc/nacl/testzip.proto syscall/fstest_nacl.go +GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4} +gobin=$GOROOT_BOOTSTRAP/bin +GOROOT=$GOROOT_BOOTSTRAP $gobin/go run ../misc/nacl/mkzip.go -p syscall -r .. ../misc/nacl/testzip.proto syscall/fstest_nacl.go # Run standard build and tests. export PATH=$(pwd)/../misc/nacl:$PATH -GOOS=nacl GOARCH=$naclGOARCH ./all.bash --no-clean +GOOS=nacl GOARCH=$naclGOARCH ./all.bash |
