onsi / ginkgo

A Modern Testing Framework for Go
http://onsi.github.io/ginkgo/
MIT License
8.38k stars 660 forks source link

run “ginkgo --show-node-events [test suit]” ,but output :flag provided but not defined: --show-node-events #1448

Closed XuQinWL closed 3 months ago

XuQinWL commented 3 months ago

run “ginkgo --show-node-events [test suit]” ,but output :flag provided but not defined: --show-node-events, and show a very long menu below:

xuqin@PC:~/go/qtest/kodo/v2$ ./init_env.sh -c k8s.z0.conf
++ dirname ./init_env.sh
+ cd .
++ pwd
+ WORKDIR=/home/xuqin/go/qtest/kodo/v2
+ getopts :c:l: opt
+ case $opt in
+ CONFIG_FILE=k8s.z0.conf
+ getopts :c:l: opt
+ '[' -z k8s.z0.conf ']'
+ ginkgo -v --show-node-events --trace --label-filter= init/... -- -c /home/xuqin/go/qtest/kodo/v2/configs/k8s.z0.conf
flag provided but not defined: -show-node-events
Ginkgo Version 1.16.5

ginkgo <FLAGS> <PACKAGES> -- <PASS-THROUGHS>
--------------------------------------------
Run the tests in the passed in <PACKAGES> (or the package in the current directory if left blank).
Any arguments after -- will be passed to the test.
Accepts the following flags:
  -a    Force rebuilding of packages that are already up-to-date.
  -afterSuiteHook string
        Run a command when a suite test run completes
  -asmflags string
        Arguments to pass on each go tool asm invocation.
  -blockprofilerate int
        Control the detail provided in goroutine blocking profiles by calling runtime.SetBlockProfileRate with the given value. (default 1)
  -buildmode string
        Build mode to use. See 'go help buildmode' for more.
  -compiler string
        Name of compiler to use, as in runtime.Compiler (gccgo or gc).
  -compilers int
        The number of concurrent compilations to run (0 will autodetect)
  -cover
        Run tests with coverage analysis, will generate coverage profiles with the package name in the current directory.
  -covermode string
        Set the mode for coverage analysis.
  -coverpkg string
        Run tests with coverage on the given external modules.
  -coverprofile string
        Write a coverage profile to the specified file after all tests have passed.
  -cpuprofile string
        Write a CPU profile to the specified file before exiting.
  -debug
        If set, ginkgo will emit node output to files when running in parallel.
  -dryRun
        If set, ginkgo will walk the test hierarchy without actually running anything.  Best paired with -v.
  -failFast
        If set, ginkgo will stop running a test suite after a failure occurs.
  -failOnPending
        If set, ginkgo will mark the test suite as failed if any specs are pending.
  -flakeAttempts int
        Make up to this many attempts to run each spec. Please note that if any of the attempts succeed, the suite will not be failed. But any failures will still be recorded. (default 1)
  -focus value
        If set, ginkgo will only run specs that match this regular expression. Can be specified multiple times, values are ORed.
  -gccgoflags string
        Arguments to pass on each gccgo compiler/linker invocation.
  -gcflags string
        Arguments to pass on each go tool compile invocation.
  -installsuffix string
        A suffix to use in the name of the package installation directory.
  -keepGoing
        When true, failures from earlier test suites do not prevent later test suites from running
  -ldflags string
        Arguments to pass on each go tool link invocation.
  -linkshared
        Link against shared libraries previously created with -buildmode=shared.
  -memprofile string
        Write a memory profile to the specified file after all tests have passed.
  -memprofilerate int
        Enable more precise (and expensive) memory profiles by setting runtime.MemProfileRate.
  -mod string
        Go module control. See 'go help modules' for more.
  -msan
        Enable interoperation with memory sanitizer.
  -n go test
        Have go test print the commands but do not run them.
  -noColor
        If set, suppress color output in default reporter.
  -nodes int
        The number of parallel test nodes to run (default 1)
  -noisyPendings
        If set, default reporter will shout about pending tests. (default true)
  -noisySkippings
        If set, default reporter will shout about skipping tests. (default true)
  -notify
        Send desktop notifications when a test run completes
  -outputdir string
        Place output files from profiling in the specified directory.
  -p    Run in parallel with auto-detected number of nodes
  -pkgdir string
        install and load all packages from the given dir instead of the usual locations.
  -progress
        If set, ginkgo will emit progress information as each spec runs to the GinkgoWriter.
  -r    Find and run test suites under the current directory recursively.
  -race
        Run tests with race detection enabled.
  -randomizeAllSpecs
        If set, ginkgo will randomize all specs together.  By default, ginkgo only randomizes the top level Describe, Context and When groups.
  -randomizeSuites
        When true, Ginkgo will randomize the order in which test suites run
  -regexScansFilePath
        If set, ginkgo regex matching also will look at the file path (code location).
  -reportFile string
        Override the default reporter output file path.
  -reportPassed
        If set, default reporter prints out captured output of passed tests.
  -requireSuite
        Fail if there are ginkgo tests in a directory but no test suite (missing RunSpecs)
  -seed int
        The seed used to randomize the spec suite. (default 1723116999)
  -skip value
        If set, ginkgo will only run specs that do not match this regular expression. Can be specified multiple times, values are ORed.
  -skipMeasurements
        If set, ginkgo will skip any measurement specs.
  -skipPackage string
        A comma-separated list of package names to be skipped.  If any part of the package's path matches, that package is ignored.
  -slowSpecThreshold float
        (in seconds) Specs that take longer to run than this threshold are flagged as slow by the default reporter. (default 5)
  -stream
        stream parallel test output in real time: less coherent, but useful for debugging
  -succinct
        If set, default reporter prints out a very succinct report
  -tags string
        A list of build tags to consider satisfied during the build.
  -timeout duration
        Suite fails if it does not complete within the specified timeout (default 24h0m0s)
  -toolexec string
        a program to use to invoke toolchain programs like vet and asm.
  -trace
        If set, default reporter prints out the full stack trace when a failure occurs
  -untilItFails
        When true, Ginkgo will keep rerunning tests until a failure occurs
  -v    If set, default reporter print out all specs as they begin.
  -vet string
        Configure the invocation of 'go vet' to use the comma-separated list of vet checks. If list is 'off', 'go test' does not run 'go vet' at all.
  -work
        Print the name of the temporary work directory and do not delete it when exiting.
  -x go test
        Have go test print the commands.

ginkgo watch <FLAGS> <PACKAGES> -- <PASS-THROUGHS>
--------------------------------------------------
Watches the tests in the passed in <PACKAGES> and runs them when changes occur.
Any arguments after -- will be passed to the test.
Accepts all the flags that the ginkgo command accepts except for --keepGoing and --untilItFails

ginkgo build <FLAGS> <PACKAGES>
-------------------------------
Build the passed in <PACKAGES> (or the package in the current directory if left blank).
Accepts the following flags:
  -a    Force rebuilding of packages that are already up-to-date.
  -asmflags string
        Arguments to pass on each go tool asm invocation.
  -blockprofilerate int
        Control the detail provided in goroutine blocking profiles by calling runtime.SetBlockProfileRate with the given value. (default 1)
  -buildmode string
        Build mode to use. See 'go help buildmode' for more.
  -compiler string
        Name of compiler to use, as in runtime.Compiler (gccgo or gc).
  -cover
        Run tests with coverage analysis, will generate coverage profiles with the package name in the current directory.
  -covermode string
        Set the mode for coverage analysis.
  -coverpkg string
        Run tests with coverage on the given external modules.
  -coverprofile string
        Write a coverage profile to the specified file after all tests have passed.
  -cpuprofile string
        Write a CPU profile to the specified file before exiting.
  -gccgoflags string
        Arguments to pass on each gccgo compiler/linker invocation.
  -gcflags string
        Arguments to pass on each go tool compile invocation.
  -installsuffix string
        A suffix to use in the name of the package installation directory.
  -ldflags string
        Arguments to pass on each go tool link invocation.
  -linkshared
        Link against shared libraries previously created with -buildmode=shared.
  -memprofile string
        Write a memory profile to the specified file after all tests have passed.
  -memprofilerate int
        Enable more precise (and expensive) memory profiles by setting runtime.MemProfileRate.
  -mod string
        Go module control. See 'go help modules' for more.
  -msan
        Enable interoperation with memory sanitizer.
  -n go test
        Have go test print the commands but do not run them.
  -outputdir string
        Place output files from profiling in the specified directory.
  -pkgdir string
        install and load all packages from the given dir instead of the usual locations.
  -r    Find and run test suites under the current directory recursively.
  -race
        Run tests with race detection enabled.
  -requireSuite
        Fail if there are ginkgo tests in a directory but no test suite (missing RunSpecs)
  -skipPackage string
        A comma-separated list of package names to be skipped.  If any part of the package's path matches, that package is ignored.
  -tags string
        A list of build tags to consider satisfied during the build.
  -toolexec string
        a program to use to invoke toolchain programs like vet and asm.
  -vet string
        Configure the invocation of 'go vet' to use the comma-separated list of vet checks. If list is 'off', 'go test' does not run 'go vet' at all.
  -work
        Print the name of the temporary work directory and do not delete it when exiting.
  -x go test
        Have go test print the commands.

ginkgo bootstrap <FLAGS>
------------------------
Bootstrap a test suite for the current package
Accepts the following flags:
  -agouti
        If set, bootstrap will generate a bootstrap file for writing Agouti tests
  -internal
        If set, generate will generate a test file that uses the regular package name
  -nodot
        If set, bootstrap will generate a bootstrap file that does not . import ginkgo and gomega
  -template string
        If specified, generate will use the contents of the file passed as the bootstrap template

ginkgo generate <filename(s)>
-----------------------------
Generate a test file named filename_test.go
If the optional <filenames> argument is omitted, a file named after the package in the current directory will be created.
Accepts the following flags:
  -agouti
        If set, generate will generate a test file for writing Agouti tests
  -internal
        If set, generate will generate a test file that uses the regular package name
  -nodot
        If set, generate will generate a test file that does not . import ginkgo and gomega
  -template string
        If specified, generate will use the contents of the file passed as the test file template

ginkgo nodot
------------
Update the nodot declarations in your test suite
Any missing declarations (from, say, a recently added matcher) will be added to your bootstrap file.
If you've renamed a declaration, that name will be honored and not overwritten.

ginkgo convert /path/to/package
-------------------------------
Convert the package at the passed in path from an XUnit-style test to a Ginkgo-style test

ginkgo unfocus (or ginkgo blur)
-------------------------------
Recursively unfocuses any focused tests under the current directory

ginkgo version
--------------
Print Ginkgo's version

ginkgo help <COMMAND>
---------------------
Print usage information.  If a command is passed in, print usage information just for that command.

ginkgo outline <filename>
-------------------------
Create an outline of Ginkgo symbols for a file
To read from stdin, use: `ginkgo outline -`
Accepts the following flags:
  -format string
        Format of outline. Accepted: 'csv', 'indent', 'json' (default "csv")