Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The server's binary gets all the test flags #72

Open
oleksandr opened this issue Nov 25, 2013 · 5 comments
Open

The server's binary gets all the test flags #72

oleksandr opened this issue Nov 25, 2013 · 5 comments

Comments

@oleksandr
Copy link

I've noticed weird flags appear when I print the -help of my binary:

Usage of app/bin/server:
-conf="etc/config.yml": Configuration file
-ip="0.0.0.0": IP address to bind server to. Example: 127.0.0.1
-port=8080: Port number to bind server to. Example: 8080
-test.bench="": regular expression to select benchmarks to run
-test.benchmem=false: print memory allocations for benchmarks
-test.benchtime=1s: approximate run time for each benchmark
-test.blockprofile="": write a goroutine blocking profile to the named file after execution
-test.blockprofilerate=1: if >= 0, calls runtime.SetBlockProfileRate()
-test.cpu="": comma-separated list of number of CPUs to use for each test
-test.cpuprofile="": write a cpu profile to the named file during execution
-test.memprofile="": write a memory profile to the named file after execution
-test.memprofilerate=0: if >=0, sets runtime.MemProfileRate
-test.parallel=1: maximum test parallelism
-test.run="": regular expression to select tests and examples to run
-test.short=false: run smaller test suite to save time
-test.timeout=0: if positive, sets an aggregate time limit for all tests
-test.v=false: verbose: print additional output

As far as I can see from:

$ go list -f '{{join .Deps "\n"}}' github.com/stretchr/goweb | grep testing
testing

Goweb can be the reason... Any ideas how to get rid of these flags?

@tylerstillwater
Copy link
Contributor

It looks like test_helper.go imports testing. That may be causing it.

On Nov 25, 2013, at 2:14 PM, Oleksandr Lobunets [email protected] wrote:

I've noticed weird flags appear when I print the -help of my binary:

Usage of app/bin/server:
-conf="etc/config.yml": Configuration file
-ip="0.0.0.0": IP address to bind server to. Example: 127.0.0.1
-port=8080: Port number to bind server to. Example: 8080
-test.bench="": regular expression to select benchmarks to run
-test.benchmem=false: print memory allocations for benchmarks
-test.benchtime=1s: approximate run time for each benchmark
-test.blockprofile="": write a goroutine blocking profile to the named file after execution
-test.blockprofilerate=1: if >= 0, calls runtime.SetBlockProfileRate()
-test.cpu="": comma-separated list of number of CPUs to use for each test
-test.cpuprofile="": write a cpu profile to the named file during execution
-test.memprofile="": write a memory profile to the named file after execution
-test.memprofilerate=0: if >=0, sets runtime.MemProfileRate
-test.parallel=1: maximum test parallelism
-test.run="": regular expression to select tests and examples to run
-test.short=false: run smaller test suite to save time
-test.timeout=0: if positive, sets an aggregate time limit for all tests
-test.v=false: verbose: print additional output

As far as I can see from:

$ go list -f '{{join .Deps "\n"}}' github.com/stretchr/goweb | grep testing
testing

Goweb can be the reason... Any ideas how to get rid of these flags?


Reply to this email directly or view it on GitHub.

@matryer
Copy link
Member

matryer commented Nov 25, 2013

How very weird.

Sent from my iPhone

On Nov 25, 2013, at 2:14 PM, Oleksandr Lobunets [email protected] wrote:

I've noticed weird flags appear when I print the -help of my binary:

Usage of app/bin/server:
-conf="etc/config.yml": Configuration file
-ip="0.0.0.0": IP address to bind server to. Example: 127.0.0.1
-port=8080: Port number to bind server to. Example: 8080
-test.bench="": regular expression to select benchmarks to run
-test.benchmem=false: print memory allocations for benchmarks
-test.benchtime=1s: approximate run time for each benchmark
-test.blockprofile="": write a goroutine blocking profile to the named file after execution
-test.blockprofilerate=1: if >= 0, calls runtime.SetBlockProfileRate()
-test.cpu="": comma-separated list of number of CPUs to use for each test
-test.cpuprofile="": write a cpu profile to the named file during execution
-test.memprofile="": write a memory profile to the named file after execution
-test.memprofilerate=0: if >=0, sets runtime.MemProfileRate
-test.parallel=1: maximum test parallelism
-test.run="": regular expression to select tests and examples to run
-test.short=false: run smaller test suite to save time
-test.timeout=0: if positive, sets an aggregate time limit for all tests
-test.v=false: verbose: print additional output

As far as I can see from:

$ go list -f '{{join .Deps "\n"}}' github.com/stretchr/goweb | grep testing
testing

Goweb can be the reason... Any ideas how to get rid of these flags?


Reply to this email directly or view it on GitHub.

@oleksandr
Copy link
Author

We had the same issue internally in the code, but once eliminated I started suspecting one of the external dependencies. Goweb that was...

@matryer
Copy link
Member

matryer commented Nov 26, 2013

@tylerb should test_helper.go get renamed or moved to another package?

@tylerstillwater
Copy link
Contributor

If it ends in _test, it won't be linked into the final binary.

Sent from my iPhone

On Nov 25, 2013, at 7:05 PM, Mat Ryer [email protected] wrote:

@tylerb should test_helper.go get renamed or moved to another package?


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants