]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix TestFFLAGS for Fortran compilers that accept unknown options
authorIan Lance Taylor <iant@golang.org>
Thu, 2 Mar 2017 01:31:06 +0000 (17:31 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 2 Mar 2017 04:04:34 +0000 (04:04 +0000)
The test assumed that passing an unknown option to the Fortran
compiler would cause the compiler to fail. Unfortunately it appears
that some succeed. It's irrelevant to the actual test, which is
verifying that the flag was indeed passed.

Fixes #19080.

Change-Id: Ib9e89447a2104e4742f4b98938373fc2522772aa
Reviewed-on: https://go-review.googlesource.com/37658
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/cmd/go/go_test.go

index 06e87798d0fae5f4c1809d702574154f055ae4be..2f8f36b162821db130ac57c25c2806bbb5a35bed 100644 (file)
@@ -3795,6 +3795,11 @@ func TestFFLAGS(t *testing.T) {
        `)
        tg.tempFile("p/src/p/a.f", `! comment`)
        tg.setenv("GOPATH", tg.path("p"))
-       tg.runFail("build", "-x", "p")
+
+       // This should normally fail because we are passing an unknown flag,
+       // but issue #19080 points to Fortran compilers that succeed anyhow.
+       // To work either way we call doRun directly rather than run or runFail.
+       tg.doRun([]string{"build", "-x", "p"})
+
        tg.grepStderr("no-such-fortran-flag", `missing expected "-no-such-fortran-flag"`)
 }