-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
What steps will reproduce the problem? 1. Let's say you have a file library.go, and a test file library_test.go 2. Add a Makefile which uses a similar structure as other go packages 3. run 'gotest' . The test file can't find the library because it's not installed yet. What is the expected output? What do you see instead? Running 'gotest' should run tests, even if the package is not installed in the go root directory. What is your $GOOS? $GOARCH? linux/i386 Which revision are you sync'ed to? (hg log -l 1) 4030:52ad1606d994 Please provide any additional information below. You shouldn't need to have a package installed to run unit tests. When you build go, it installs everything first, and then runs tests. But gotest should be able to run tests by only examining the build directory. Also, in general, I don't think that gotest should be so coupled with the go build system. If I'm writing a go program, I should be able to choose whatever build system I want, and still be able to use gotest for unit tests. To make the tests work, I either have to install the package in GOROOT/pkg, or use something like "import library "./_go_.8" in the test file.