From bca5260f3a4059bd6992bdb8cdfd0f7a71418ff6 Mon Sep 17 00:00:00 2001 From: Giuseppe Capizzi Date: Wed, 21 Mar 2018 17:29:52 +0000 Subject: [PATCH] Fix test using gcflags Packages need to be already imported to be remapped using the `-importmap` compiler flag. Signed-off-by: Andrea Nodari --- integration/_fixtures/flags_tests/flags_test.go | 1 + integration/flags_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/integration/_fixtures/flags_tests/flags_test.go b/integration/_fixtures/flags_tests/flags_test.go index 8f6587875..27dadf19c 100644 --- a/integration/_fixtures/flags_tests/flags_test.go +++ b/integration/_fixtures/flags_tests/flags_test.go @@ -4,6 +4,7 @@ import ( "flag" "fmt" remapped "math" + _ "math/cmplx" "time" . "github.com/onsi/ginkgo" diff --git a/integration/flags_test.go b/integration/flags_test.go index 67703c7e4..cef1f11d3 100644 --- a/integration/flags_test.go +++ b/integration/flags_test.go @@ -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))