Skip to content

Commit

Permalink
Fix test using gcflags
Browse files Browse the repository at this point in the history
Packages need to be already imported to be remapped using the
`-importmap` compiler flag.

Signed-off-by: Andrea Nodari <anodari@pivotal.io>
  • Loading branch information
gcapizzi authored and Andrea Nodari committed Mar 21, 2018
1 parent ba8e856 commit bca5260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration/_fixtures/flags_tests/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"flag"
"fmt"
remapped "math"
_ "math/cmplx"
"time"

. "github.com/onsi/ginkgo"
Expand Down
1 change: 1 addition & 0 deletions integration/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ var _ = Describe("Flags Specs", func() {
output = regextest("-regexScansFilePath=false", "-focus=/passing/") // nothing gets focused (nothing runs)
Ω(output).Should(ContainSubstring("0 of 4 Specs"))
})

It("should honor compiler flags", func() {
session := startGinkgo(pathToTest, "-gcflags=-importmap 'math=math/cmplx'")
Eventually(session).Should(gexec.Exit(types.GINKGO_FOCUS_EXIT_CODE))
Expand Down

0 comments on commit bca5260

Please sign in to comment.