diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 2989a07f9..adf44d88d 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -29,10 +29,6 @@ "ImportPath": "github.com/hashicorp/golang-lru", "Rev": "253b2dc1ca8bae42c3b5b6e53dd2eab1a7551116" }, - { - "ImportPath": "github.com/jbenet/go-detect-race", - "Rev": "3463798d9574bd0b7eca275dccc530804ff5216f" - }, { "ImportPath": "github.com/jbenet/go-os-rename", "Rev": "3ac97f61ef67a6b87b95c1282f6c317ed0e693c2" diff --git a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/LICENSE b/Godeps/_workspace/src/github.com/jbenet/go-detect-race/LICENSE deleted file mode 100644 index c7386b3c9..000000000 --- a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Juan Batiz-Benet - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/README.md b/Godeps/_workspace/src/github.com/jbenet/go-detect-race/README.md deleted file mode 100644 index 0ba69b7b0..000000000 --- a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# go-detect-race - -Check if the race detector is running. - -I didnt find a variable to check quickly enough so I made this. - - -## Usage - -```go -import ( - detectrace "github.com/jbenet/go-detect-race" -) - -func main() { - if detectrace.WithRace() { - // running with -race - } else { - // running without -race - } -} -``` - -## Why? - -Because the race detector doesnt like massive stress tests. Example: -https://groups.google.com/forum/#!topic/golang-nuts/XDPHUt2LE70 - -## Why didn't you just use... - -Please tell me about a better way of doing this. It wasn't -readily apparent to me, so I made this. But i would much prefer -an env var or some already existing var from the stdlib :) diff --git a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/race.go b/Godeps/_workspace/src/github.com/jbenet/go-detect-race/race.go deleted file mode 100644 index 04639f4bb..000000000 --- a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/race.go +++ /dev/null @@ -1,7 +0,0 @@ -package detectrace - -// WithRace returns whether the binary was compiled -// with the race flag on. -func WithRace() bool { - return withRace -} diff --git a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/race_test.go b/Godeps/_workspace/src/github.com/jbenet/go-detect-race/race_test.go deleted file mode 100644 index 2663ba39d..000000000 --- a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/race_test.go +++ /dev/null @@ -1,9 +0,0 @@ -package detectrace - -import ( - "testing" -) - -func TestWithRace(t *testing.T) { - t.Logf("WithRace() is %v\n", WithRace()) -} diff --git a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/withoutrace.go b/Godeps/_workspace/src/github.com/jbenet/go-detect-race/withoutrace.go deleted file mode 100644 index 958498bbe..000000000 --- a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/withoutrace.go +++ /dev/null @@ -1,5 +0,0 @@ -// +build !race - -package detectrace - -const withRace = false diff --git a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/withrace.go b/Godeps/_workspace/src/github.com/jbenet/go-detect-race/withrace.go deleted file mode 100644 index 59f0b03dc..000000000 --- a/Godeps/_workspace/src/github.com/jbenet/go-detect-race/withrace.go +++ /dev/null @@ -1,5 +0,0 @@ -// +build race - -package detectrace - -const withRace = true diff --git a/exchange/bitswap/bitswap_test.go b/exchange/bitswap/bitswap_test.go index 6558dce23..1a5771a8c 100644 --- a/exchange/bitswap/bitswap_test.go +++ b/exchange/bitswap/bitswap_test.go @@ -15,13 +15,12 @@ import ( mockrouting "github.com/ipfs/go-ipfs/routing/mock" delay "github.com/ipfs/go-ipfs/thirdparty/delay" - detectrace "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race" - tu "gx/ipfs/QmVvkK7s5imCiq3JVbL3pGfnhcCnf3LrFJPF4GE2sAoGZf/go-testutil" travis "gx/ipfs/QmVvkK7s5imCiq3JVbL3pGfnhcCnf3LrFJPF4GE2sAoGZf/go-testutil/ci/travis" p2ptestutil "gx/ipfs/QmYVR3C8DWPHdHxvLtNFYfjsXgaRAdh6hPMNH3KiwCgu4o/go-libp2p-netutil" cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid" blocks "gx/ipfs/Qmej7nf81hi2x2tvjRBF3mcp74sQyuDH4VMYDGd1YtXjb2/go-block-format" + detectrace "gx/ipfs/Qmf7HqcW7LtCi1W8y2bdx2eJpze74jkbKqpByxgXikdbLF/go-detect-race" ) // FIXME the tests are really sensitive to the network delay. fix them to work diff --git a/package.json b/package.json index c237a4c19..883338f7d 100644 --- a/package.json +++ b/package.json @@ -527,6 +527,12 @@ "hash": "QmWo8jYc19ppG7YoTsrr2kEtLRbARTJho5oNXFTR6B7Peq", "name": "go-ipfs-chunker", "version": "0.0.2" + }, + { + "author": "jbenet", + "hash": "Qmf7HqcW7LtCi1W8y2bdx2eJpze74jkbKqpByxgXikdbLF", + "name": "go-detect-race", + "version": "1.0.1" } ], "gxVersion": "0.10.0",