diff options
| author | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2015-04-27 15:00:48 +1200 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2015-04-29 23:47:47 +0000 |
| commit | 0774f6dbfd3103f59c7232a056b030d49cf5e82d (patch) | |
| tree | 312e25916f5cfe28d13aecf8e4a8aea10e039e15 /src | |
| parent | 98e0556231b43d26e8b22936299c49c4b794ced0 (diff) | |
| download | go-0774f6dbfd3103f59c7232a056b030d49cf5e82d.tar.xz | |
misc/cgo/testshared: add basic test for -buildmode=shared/-linkshared
Just a first basic test, I'll extend this to test more but want to get an
opinion on basic approach first.
Change-Id: Idab9ebd7d9960b000b81a01a1e53258bf4bce755
Reviewed-on: https://go-review.googlesource.com/9386
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/dist/test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 7ffe5d6f62..a50322214b 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -281,6 +281,9 @@ func (t *tester) registerTests() { if t.buildmode("c-shared") { t.registerTest("testcshared", "../misc/cgo/testcshared", "./test.bash") } + if t.buildmode("shared") { + t.registerTest("testshared", "../misc/cgo/testshared", "./test.bash") + } if t.gohostos == "linux" && t.goarch == "amd64" { t.registerTest("testasan", "../misc/cgo/testasan", "go", "run", "main.go") } @@ -399,6 +402,12 @@ func (t *tester) buildmode(mode string) bool { return true } return false + case "shared": + switch pair { + case "linux-amd64": + return true + } + return false default: log.Fatal("internal error: unknown buildmode %s", mode) return false |
