diff --git a/test/fixedbugs/bug302.go b/test/fixedbugs/bug302.go index 87f9d4ef70..a2ab661277 100644 --- a/test/fixedbugs/bug302.go +++ b/test/fixedbugs/bug302.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,gc // run // Copyright 2010 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/bug369.go b/test/fixedbugs/bug369.go index 9316f7aad0..83f638d046 100644 --- a/test/fixedbugs/bug369.go +++ b/test/fixedbugs/bug369.go @@ -1,4 +1,4 @@ -// +build !nacl,!js,!windows +// +build !nacl,!js,!windows,gc // run // Copyright 2011 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue10607.go b/test/fixedbugs/issue10607.go index 6f4717d820..448a37dcac 100644 --- a/test/fixedbugs/issue10607.go +++ b/test/fixedbugs/issue10607.go @@ -1,4 +1,4 @@ -// +build linux,!ppc64,!riscv64 +// +build linux,!ppc64,!riscv64,gc // run // Copyright 2015 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue11771.go b/test/fixedbugs/issue11771.go index 99d7060d44..c95dd6ba39 100644 --- a/test/fixedbugs/issue11771.go +++ b/test/fixedbugs/issue11771.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,gc // run // Copyright 2015 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue13268.go b/test/fixedbugs/issue13268.go index fcb69c9068..53a82d5074 100644 --- a/test/fixedbugs/issue13268.go +++ b/test/fixedbugs/issue13268.go @@ -1,3 +1,4 @@ +// +build gc // run // Copyright 2015 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue14636.go b/test/fixedbugs/issue14636.go index 6797046e02..06fd193dae 100644 --- a/test/fixedbugs/issue14636.go +++ b/test/fixedbugs/issue14636.go @@ -1,4 +1,4 @@ -// +build !nacl,!js,!android +// +build !nacl,!js,!android,gc // run // Copyright 2016 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue16037_run.go b/test/fixedbugs/issue16037_run.go index d05e3f7f31..68104a9000 100644 --- a/test/fixedbugs/issue16037_run.go +++ b/test/fixedbugs/issue16037_run.go @@ -1,4 +1,4 @@ -// +build !nacl,!js,!android +// +build !nacl,!js,!android,!gccgo // run // Copyright 2016 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue19658.go b/test/fixedbugs/issue19658.go index b2539629df..bab409c6c0 100644 --- a/test/fixedbugs/issue19658.go +++ b/test/fixedbugs/issue19658.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,!gccgo // run // Copyright 2017 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue21317.go b/test/fixedbugs/issue21317.go index f4ec422371..32b660c163 100644 --- a/test/fixedbugs/issue21317.go +++ b/test/fixedbugs/issue21317.go @@ -1,3 +1,4 @@ +// +build !js,gc // run // Copyright 2017 The Go Authors. All rights reserved. @@ -16,15 +17,10 @@ import ( "log" "os" "os/exec" - "runtime" "strings" ) func main() { - if runtime.Compiler != "gc" || runtime.GOOS == "js" { - return - } - f, err := ioutil.TempFile("", "issue21317.go") if err != nil { log.Fatal(err) diff --git a/test/fixedbugs/issue21576.go b/test/fixedbugs/issue21576.go index ae6161ccf5..3f9b1ba008 100644 --- a/test/fixedbugs/issue21576.go +++ b/test/fixedbugs/issue21576.go @@ -1,6 +1,6 @@ // run -// +build !nacl,!js +// +build !nacl,!js,!gccgo // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue22660.go b/test/fixedbugs/issue22660.go index 44ba42ac96..9ce9c4d732 100644 --- a/test/fixedbugs/issue22660.go +++ b/test/fixedbugs/issue22660.go @@ -1,3 +1,4 @@ +// +build !js,gc // run // Copyright 2017 The Go Authors. All rights reserved. @@ -14,15 +15,10 @@ import ( "os" "os/exec" "path/filepath" - "runtime" "strings" ) func main() { - if runtime.GOOS == "js" { - return // no file system available on builders - } - f, err := ioutil.TempFile("", "issue22660.go") if err != nil { log.Fatal(err) diff --git a/test/fixedbugs/issue22662b.go b/test/fixedbugs/issue22662b.go index 0fcfe8d0db..8da17679be 100644 --- a/test/fixedbugs/issue22662b.go +++ b/test/fixedbugs/issue22662b.go @@ -1,3 +1,4 @@ +// +build !js,gc // run // Copyright 2018 The Go Authors. All rights reserved. @@ -13,7 +14,6 @@ import ( "log" "os" "os/exec" - "runtime" "strings" ) @@ -36,10 +36,6 @@ var tests = []struct { } func main() { - if runtime.GOOS == "js" { - return // can not exec go tool - } - f, err := ioutil.TempFile("", "issue22662b.go") if err != nil { log.Fatal(err) diff --git a/test/fixedbugs/issue33275_run.go b/test/fixedbugs/issue33275_run.go index f3e2e14f39..ed03dccf4c 100644 --- a/test/fixedbugs/issue33275_run.go +++ b/test/fixedbugs/issue33275_run.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,!gccgo // run // Copyright 2019 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue33555.go b/test/fixedbugs/issue33555.go index 7debd2049c..c1fcd2a79b 100644 --- a/test/fixedbugs/issue33555.go +++ b/test/fixedbugs/issue33555.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,!gccgo // run // Copyright 2019 The Go Authors. All rights reserved. diff --git a/test/fixedbugs/issue36437.go b/test/fixedbugs/issue36437.go index f96544beff..c7a11d27a8 100644 --- a/test/fixedbugs/issue36437.go +++ b/test/fixedbugs/issue36437.go @@ -1,6 +1,6 @@ // run -// +build !nacl,!js +// +build !nacl,!js,gc // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/issue9355.go b/test/fixedbugs/issue9355.go index ab3369d415..319a2a90df 100644 --- a/test/fixedbugs/issue9355.go +++ b/test/fixedbugs/issue9355.go @@ -1,3 +1,4 @@ +// +build !js,gc // run // Copyright 2014 The Go Authors. All rights reserved. @@ -13,14 +14,9 @@ import ( "os/exec" "path/filepath" "regexp" - "runtime" ) func main() { - if runtime.Compiler != "gc" || runtime.GOOS == "js" { - return - } - err := os.Chdir(filepath.Join("fixedbugs", "issue9355.dir")) check(err) diff --git a/test/fixedbugs/issue9862_run.go b/test/fixedbugs/issue9862_run.go index 299e809545..c956c7f7bd 100644 --- a/test/fixedbugs/issue9862_run.go +++ b/test/fixedbugs/issue9862_run.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,gc // run // Copyright 2015 The Go Authors. All rights reserved. diff --git a/test/linkobj.go b/test/linkobj.go index 2902d23f4b..4c9bd24568 100644 --- a/test/linkobj.go +++ b/test/linkobj.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,gc // run // Copyright 2016 The Go Authors. All rights reserved. diff --git a/test/linkx_run.go b/test/linkx_run.go index f25053bf28..ccfc3a93df 100644 --- a/test/linkx_run.go +++ b/test/linkx_run.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,gc // run // Copyright 2014 The Go Authors. All rights reserved. diff --git a/test/nosplit.go b/test/nosplit.go index a3f2a9fb7e..faa7b8c2d8 100644 --- a/test/nosplit.go +++ b/test/nosplit.go @@ -1,4 +1,4 @@ -// +build !nacl,!js,!aix,!gcflags_noopt +// +build !nacl,!js,!aix,!gcflags_noopt,gc // run // Copyright 2014 The Go Authors. All rights reserved. diff --git a/test/run.go b/test/run.go index 4abf32d25c..db3e9f6c2f 100644 --- a/test/run.go +++ b/test/run.go @@ -438,7 +438,7 @@ func (ctxt *context) match(name string) bool { } } - if name == ctxt.GOOS || name == ctxt.GOARCH { + if name == ctxt.GOOS || name == ctxt.GOARCH || name == "gc" { return true } diff --git a/test/sinit_run.go b/test/sinit_run.go index c37fc9b88c..dcaf338331 100644 --- a/test/sinit_run.go +++ b/test/sinit_run.go @@ -1,4 +1,4 @@ -// +build !nacl,!js +// +build !nacl,!js,gc // run // Copyright 2014 The Go Authors. All rights reserved.