mirror of
https://github.com/golang/go
synced 2024-10-05 07:11:22 -06:00
f70f277875
I'm tired of having to remember it on every command. Rebuilding everything is the wrong default. This CL updates the build script, but the builders may (or may not) need work, depending on whether they rebuild using the test command (I doubt it). Change-Id: I21f202a2f13e73df3f6bd54ae6a317c467b68151 Reviewed-on: https://go-review.googlesource.com/18084 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
39 lines
1.3 KiB
Bash
Executable File
39 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright 2009 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.
|
|
|
|
set -e
|
|
|
|
eval $(go env)
|
|
export GOROOT # the api test requires GOROOT to be set.
|
|
|
|
unset CDPATH # in case user has it set
|
|
unset GOPATH # we disallow local import for non-local packages, if $GOROOT happens
|
|
# to be under $GOPATH, then some tests below will fail
|
|
|
|
export GOHOSTOS
|
|
export CC
|
|
|
|
# no core files, please
|
|
ulimit -c 0
|
|
|
|
# Raise soft limits to hard limits for NetBSD/OpenBSD.
|
|
# We need at least 256 files and ~300 MB of bss.
|
|
# On OS X ulimit -S -n rejects 'unlimited'.
|
|
#
|
|
# Note that ulimit -S -n may fail if ulimit -H -n is set higher than a
|
|
# non-root process is allowed to set the high limit.
|
|
# This is a system misconfiguration and should be fixed on the
|
|
# broken system, not "fixed" by ignoring the failure here.
|
|
# See longer discussion on golang.org/issue/7381.
|
|
[ "$(ulimit -H -n)" == "unlimited" ] || ulimit -S -n $(ulimit -H -n)
|
|
[ "$(ulimit -H -d)" == "unlimited" ] || ulimit -S -d $(ulimit -H -d)
|
|
|
|
# Thread count limit on NetBSD 7.
|
|
if ulimit -T &> /dev/null; then
|
|
[ "$(ulimit -H -T)" == "unlimited" ] || ulimit -S -T $(ulimit -H -T)
|
|
fi
|
|
|
|
exec go tool dist test -rebuild "$@"
|