From 901a7241973d85f9734d66bc56946e1e417087ec Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 20 Feb 2017 10:39:30 +0700 Subject: [PATCH] determine the path to the quic_clients at runtime in integration tests --- integrationtests/integrationtests_suite_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/integrationtests/integrationtests_suite_test.go b/integrationtests/integrationtests_suite_test.go index 2fcbfc676..a9a5442b8 100644 --- a/integrationtests/integrationtests_suite_test.go +++ b/integrationtests/integrationtests_suite_test.go @@ -5,7 +5,6 @@ import ( "crypto/md5" "encoding/hex" "fmt" - "go/build" "io" "io/ioutil" "mime/multipart" @@ -14,6 +13,7 @@ import ( "os" "os/exec" "path" + "path/filepath" "runtime" "strconv" @@ -73,11 +73,11 @@ var _ = BeforeEach(func() { err = os.MkdirAll(uploadDir, os.ModeDir|0777) Expect(err).ToNot(HaveOccurred()) - clientPath = fmt.Sprintf( - "%s/src/github.com/lucas-clemente/quic-clients/client-%s-debug", - build.Default.GOPATH, - runtime.GOOS, - ) + _, thisfile, _, ok := runtime.Caller(0) + if !ok { + Fail("Failed to get current path") + } + clientPath = filepath.Join(thisfile, fmt.Sprintf("../../../quic-clients/client-%s-debug", runtime.GOOS)) }) var _ = AfterEach(func() {