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

Add short-with-failures format #73

Merged
merged 2 commits into from
Oct 27, 2019

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Oct 13, 2019

Closes #72

Adds a new format, similar to short, that prints test output as soon as a test fails. Useful when a test suite runs for a long time and you want to see errors before the run ends.

@dnephin dnephin changed the title Add short-with-failure format Add short-with-failures format Oct 13, 2019
@wendorf
Copy link

wendorf commented Oct 14, 2019

Works great! Thanks for doing this. The help text needs updating, though:

diff --git a/main.go b/main.go
index cd9b7c9..81cc97e 100644
--- a/main.go
+++ b/main.go
@@ -65,11 +65,12 @@ Flags:
 		flags.PrintDefaults()
 		fmt.Fprint(os.Stderr, `
 Formats:
-    dots              print a character for each test
-    short             print a line for each package
-    short-verbose     print a line for each test and package
-    standard-quiet    default go test format
-    standard-verbose  default go test -v format
+    dots                 print a character for each test
+    short                print a line for each package
+    short-verbose        print a line for each test and package
+    short-with-failures  print a line for each test and package
+    standard-quiet       default go test format
+    standard-verbose     default go test -v format
 `)
 	}
 	flags.BoolVar(&opts.debug, "debug", false, "enabled debug")

And make the README match the help output.
@dnephin
Copy link
Member Author

dnephin commented Oct 27, 2019

Good catch, thanks!

@dnephin dnephin merged commit 0b91335 into gotestyourself:master Oct 27, 2019
@dnephin dnephin deleted the format-verbose-errors branch October 27, 2019 18:34
thaJeztah added a commit to thaJeztah/cli that referenced this pull request Jan 27, 2020
full diff: gotestyourself/gotestsum@v0.3.5...v0.4.0

includes:

- gotestyourself/gotestsum#59 Report if a package was cached in short formats
- gotestyourself/gotestsum#63 always colorize output unless specifically requested not to
- gotestyourself/gotestsum#61 Improve short-verbose output for tests in CWD
- gotestyourself/gotestsum#70 gotestyourself/gotestsum#70
- gotestyourself/gotestsum#73 Add short-with-failures format

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request Jan 28, 2020
full diff: gotestyourself/gotestsum@v0.3.5...v0.4.0

includes:

- gotestyourself/gotestsum#59 Report if a package was cached in short formats
- gotestyourself/gotestsum#63 always colorize output unless specifically requested not to
- gotestyourself/gotestsum#61 Improve short-verbose output for tests in CWD
- gotestyourself/gotestsum#70 gotestyourself/gotestsum#70
- gotestyourself/gotestsum#73 Add short-with-failures format

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 594be50a631c4d83517be993f1ccf1bc359c1ed2
Component: cli
eiffel-fl pushed a commit to eiffel-fl/cli that referenced this pull request Jul 28, 2020
full diff: gotestyourself/gotestsum@v0.3.5...v0.4.0

includes:

- gotestyourself/gotestsum#59 Report if a package was cached in short formats
- gotestyourself/gotestsum#63 always colorize output unless specifically requested not to
- gotestyourself/gotestsum#61 Improve short-verbose output for tests in CWD
- gotestyourself/gotestsum#70 gotestyourself/gotestsum#70
- gotestyourself/gotestsum#73 Add short-with-failures format

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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

Successfully merging this pull request may close these issues.

Configure verbosity of failing tests separately from passing tests
2 participants