quan-xie / goclipse

Automatically exported from code.google.com/p/goclipse
0 stars 0 forks source link

gotest integration #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Just like the other people from the Go community (see e.g. 
<https://groups.google.com/d/topic/goclipse/GSkaWw3zCsc/discussion>), I would 
like the IDE to prepare gotest makefiles and run it for me rather than doing it 
manually.

Original issue reported on code.google.com by trustmas...@kodigy.com on 3 Jun 2011 at 9:43

GoogleCodeExporter commented 9 years ago
Can you send me a zip of simple project with gotest makefile?

Original comment by emerson....@gmail.com on 3 Jun 2011 at 3:08

GoogleCodeExporter commented 9 years ago
Here it is. Gotest usage (if you get a FAIL from gotest don't worry, it is 
desired behavior):
cd path/to/factorial/src/pkg/factorial
gotest

The problem is that gotest is usually run in the package directory 
(src/pkg/package_name) and expects the Makefile in the same folder.

See also: <http://golang.org/cmd/gotest/>, <http://golang.org/doc/code.html>

Original comment by trustmas...@kodigy.com on 4 Jun 2011 at 11:01

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by emerson....@gmail.com on 5 Jun 2011 at 6:49

GoogleCodeExporter commented 9 years ago
What about recreating the logic of gotest in eclipse, so we can get rid of 
those makefiles.

Original comment by ungerik on 6 Jul 2011 at 1:37

GoogleCodeExporter commented 9 years ago
I added the _testmain.go file generated by gotest in the cmd directory. But 
since *_test.go files are ignored by goclipse, I renamed my util_test.go to 
util_test_.go . So my testing environment is not too far from gotest and I 
could change it easily when gotest will be integrated or simulated in goclipse.

Note: AFAIK gotest doesn't work yet with local packages. (I mean without 
creating a specific MakeFile)

Original comment by benoit.b...@gmail.com on 9 Jul 2011 at 7:03

GoogleCodeExporter commented 9 years ago
Update: latest Go weekly builds don't require custom makefiles for tests. They 
can be simply invoked by
go test <full_package_name_in_GOPATH>

Original comment by trustmas...@kodigy.com on 10 Feb 2012 at 6:16

GoogleCodeExporter commented 9 years ago
As a result of Go 1, we just need a way to create a run configuration that 
invokes 'go test <pkg>'. This is necessary in order to debug failing tests.

Original comment by sekhar.v...@gmail.com on 28 Jul 2012 at 4:13

GoogleCodeExporter commented 9 years ago
Also, auto builds should (optionally) build the test binary. That way you can 
see errors as you code in test files as well as regular files.

Original comment by sekhar.v...@gmail.com on 1 Sep 2012 at 1:37

GoogleCodeExporter commented 9 years ago
Since the test files ARE go code files alos  they have to be compiled during 
auto-build. Otherwise the integrity of the project is lost. 

Original comment by eryzhikov on 29 Jan 2013 at 1:07