1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:46:12 -07:00
go/test/fixedbugs/issue10607.go
Ian Lance Taylor 92e2252b21 test: don't run issue10607.go on ppc64
This is a reprise of https://golang.org/cl/12623.  In that a CL I made
a suggestion which forgot that the +build constraints in the test
directory are not the same as those supported by the go tool: in the
test directory, if a single +build line fails, the test is skipped.
(In my defense, the code I was commenting on was also wrong.)

Change-Id: I8f29392a80b1983027f9a33043c803578409d678
Reviewed-on: https://go-review.googlesource.com/12776
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-07-28 15:22:56 +00:00

32 lines
696 B
Go

// +build linux,!ppc64,!ppc64le
// run
// Copyright 2015 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.
// Test that a -B option is passed through when using both internal
// and external linking mode.
package main
import (
"fmt"
"os"
"os/exec"
"path/filepath"
)
func main() {
test("internal")
test("external")
}
func test(linkmode string) {
out, err := exec.Command("go", "run", "-ldflags", "-B=0x12345678 -linkmode="+linkmode, filepath.Join("fixedbugs", "issue10607a.go")).CombinedOutput()
if err != nil {
fmt.Printf("BUG: linkmode=%s %v\n%s\n", linkmode, err, out)
os.Exit(1)
}
}