diff options
author | Ian Cottrell <iancottrell@google.com> | 2015-06-26 16:31:58 +0100 |
---|---|---|
committer | Ian Cottrell <iancottrell@google.com> | 2015-06-29 13:30:14 +0100 |
commit | c936967c444f983ec6d06bede85484ea817364f5 (patch) | |
tree | a56bfd9a10d5e6f1242e8dc56c67c1f26869d796 /integration/replay/utils | |
parent | 507f7b1e477bf280f45b2fafa29a8f2ae8618970 (diff) | |
download | gpu-c936967c444f983ec6d06bede85484ea817364f5.tar.gz |
Allow replayd binary path to be overridden, and do so in tests to force it to the one in GOPATH/bin This removes the need to have the folder on your PATH to run tests…
Change-Id: I0c68074cc62f0ba0c81d19eaa05023dfa8b8c65f
Diffstat (limited to 'integration/replay/utils')
-rw-r--r-- | integration/replay/utils/find_local_device.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/integration/replay/utils/find_local_device.go b/integration/replay/utils/find_local_device.go index da305268b..a615bcae7 100644 --- a/integration/replay/utils/find_local_device.go +++ b/integration/replay/utils/find_local_device.go @@ -15,6 +15,8 @@ package utils import ( + "os" + "path/filepath" "testing" "time" @@ -29,6 +31,7 @@ const localDeviceName = "Local machine" // TODO: Remove hard-coded string. // host cannot be found then the test fails and nil is returned. func FindLocalDevice(t *testing.T, mgr *replay.Manager) replay.Device { replay.DisableLocalDeviceCache = true // disable disk-cache + replay.LocalReplayBinary = filepath.Join(os.Getenv("GOPATH"), "bin", filepath.Base(replay.LocalReplayBinary)) for i := 0; i < findLocalDeviceAttempts; i++ { for _, d := range mgr.Devices() { info := d.Info() |