Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Get rid of -test. flags in production binary #2296

Open
kwk opened this issue Sep 24, 2018 · 0 comments
Open

Get rid of -test. flags in production binary #2296

kwk opened this issue Sep 24, 2018 · 0 comments

Comments

@kwk
Copy link
Collaborator

kwk commented Sep 24, 2018

When you currently run the production binary ./wit --help you see flags that begin with -test.. Those were added by a dependency on the testify package. These flags should not show up in the production binary.

Usage of ./bin/wit:
  -alsologtostderr
        log to standard error as well as files
  -config string
        Path to the config file to read
  -httptest.serve string
        if non-empty, httptest.NewServer serves on this address and blocks
  -log_backtrace_at value
        when logging hits line file:N, emit a stack trace
  -log_dir string
        If non-empty, write log files in this directory
  -logtostderr
        log to standard error instead of files
  -migrateDatabase
        Migrates the database to the newest version and exits.
  -printConfig
        Prints the config (including merged environment variables) and exits
  -stderrthreshold value
        logs at or above this threshold go to stderr
  -test.bench regexp
        run only benchmarks matching regexp
  -test.benchmem
        print memory allocations for benchmarks
  -test.benchtime d
        run each benchmark for duration d (default 1s)
  -test.blockprofile file
        write a goroutine blocking profile to file
  -test.blockprofilerate rate
        set blocking profile rate (see runtime.SetBlockProfileRate) (default 1)
  -test.count n
        run tests and benchmarks n times (default 1)
  -test.coverprofile file
        write a coverage profile to file
  -test.cpu list
        comma-separated list of cpu counts to run each test with
  -test.cpuprofile file
        write a cpu profile to file
  -test.failfast
        do not start new tests after the first test failure
  -test.list regexp
        list tests, examples, and benchmarks matching regexp then exit
  -test.memprofile file
        write a memory profile to file
  -test.memprofilerate rate
        set memory profiling rate (see runtime.MemProfileRate)
  -test.mutexprofile string
        write a mutex contention profile to the named file after execution
  -test.mutexprofilefraction int
        if >= 0, calls runtime.SetMutexProfileFraction() (default 1)
  -test.outputdir dir
        write profiles to dir
  -test.parallel n
        run at most n tests in parallel (default 4)
  -test.run regexp
        run only tests and examples matching regexp
  -test.short
        run smaller test suite to save time
  -test.testlogfile file
        write test action log to file (for use only by cmd/go)
  -test.timeout d
        panic test binary after duration d (default 0, timeout disabled)
  -test.trace file
        write an execution trace to file
  -test.v
        verbose: print additional output
  -v value
        log level for V logs
  -vmodule value
        comma-separated list of pattern=N settings for file-filtered logging
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant