don't use ldflags in credential tests

gccgo silently ignores them, causing tests to fail.
This commit is contained in:
risk danger olson 2015-08-11 14:18:30 -06:00
parent 3f2a526bf2
commit 63f388f4e0
3 changed files with 10 additions and 2 deletions

@ -21,9 +21,15 @@ var (
hostRE = regexp.MustCompile(`\A127.0.0.1:\d+\z`) hostRE = regexp.MustCompile(`\A127.0.0.1:\d+\z`)
credsDir = "wat" credsDir = ""
) )
func init() {
if len(credsDir) == 0 {
credsDir = os.Getenv("CREDSDIR")
}
}
func main() { func main() {
if argsize := len(os.Args); argsize != 2 { if argsize := len(os.Args); argsize != 2 {
fmt.Fprintf(os.Stderr, "wrong number of args: %d\n", argsize) fmt.Fprintf(os.Stderr, "wrong number of args: %d\n", argsize)

@ -49,6 +49,8 @@ TESTHOME="$REMOTEDIR/home"
GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_NOSYSTEM=1
export CREDSDIR
if [[ `git config --system credential.helper | grep osxkeychain` == "osxkeychain" ]] if [[ `git config --system credential.helper | grep osxkeychain` == "osxkeychain" ]]
then then
OSXKEYFILE="$TMPDIR/temp.keychain" OSXKEYFILE="$TMPDIR/temp.keychain"

@ -165,7 +165,7 @@ setup() {
if [ -z "$SKIPCOMPILE" ]; then if [ -z "$SKIPCOMPILE" ]; then
for go in test/cmd/*.go; do for go in test/cmd/*.go; do
go build -ldflags "-X main.credsDir $CREDSDIR" -o "$BINPATH/$(basename $go .go)" "$go" go build -o "$BINPATH/$(basename $go .go)" "$go"
done done
fi fi