gotestfmt
gotestfmt copied to clipboard
Missing parsing directives
Thanks for maintaining this tool, it looks like the parser/tokenizer is missing some golang outputs and render them like any user-generated outputs.
coverage
go test "-trimpath" -tags="nofuse" -v -covermode=atomic -json -coverpkg=github.com/ipfs/go-ipfs-blockstore,github.com/ipfs/go-ipfs-cmds,github.com/ipfs/go-ipfs-cmds/cli,github.com/ipfs/go-ipfs-cmds/http,github.com/ipfs/go-ipfs-delay,github.com/ipfs/go-ipfs-ds-help,github.com/ipfs/go-ipfs-exchange-interface,github.com/ipfs/go-ipfs-pq,github.com/ipfs/go-ipfs-redirects-file,github.com/ipfs/go-ipfs-util,github.com/ipfs/kubo/cmd/ipfs -coverprofile=coverage/unitcover/github.com_ipfs_kubo_cmd_ipfs.coverprofile github.com/ipfs/kubo/cmd/ipfs | tee -a test/unit/gotest.json | gotestfmt
📦 github.com/ipfs/kubo/cmd/ipfs
coverage: 4.0% of statements in github.com/ipfs/go-ipfs-blockstore, github.com/ipfs/go-ipfs-cmds, github.com/ipfs/go-ipfs-cmds/cli, github.com/ipfs/go-ipfs-cmds/http, github.com/ipfs/go-ipfs-delay, github.com/ipfs/go-ipfs-ds-help, github.com/ipfs/go-ipfs-exchange-interface, github.com/ipfs/go-ipfs-pq, github.com/ipfs/go-ipfs-redirects-file, github.com/ipfs/go-ipfs-util, github.com/ipfs/kubo/cmd/ipfs
ok github.com/ipfs/kubo/cmd/ipfs 7.055s coverage: 4.0% of statements in github.com/ipfs/go-ipfs-blockstore, github.com/ipfs/go-ipfs-cmds, github.com/ipfs/go-ipfs-cmds/cli, github.com/ipfs/go-ipfs-cmds/http, github.com/ipfs/go-ipfs-delay, github.com/ipfs/go-ipfs-ds-help, github.com/ipfs/go-ipfs-exchange-interface, github.com/ipfs/go-ipfs-pq, github.com/ipfs/go-ipfs-redirects-file, github.com/ipfs/go-ipfs-util, github.com/ipfs/kubo/cmd/ipfs
✅ TestApiEndpointResolveDNSMultipleResults (0s)
This one looks like a bug, I got something slightly better by tweaking the regexp for coverage: https://github.com/GoTestTools/gotestfmt/commit/df22652b45415a41f60b4ea0b9cb7141449c2fb5#diff-6335c0d1fdc1cee9c49a6034df01181250a3ec7ff417e4e49b38b13daad8d4a8
expected output:
📦 github.com/ipfs/kubo/cmd/ipfs (4.0% coverage)
✅ TestApiEndpointResolveDNSMultipleResults (0s)
test warnings
📦 github.com/libp2p/go-libp2p/core/internal/catch
testing: warning: no tests to run
ok github.com/libp2p/go-libp2p/core/internal/catch 0.007s [no tests to run]
📦 github.com/libp2p/go-libp2p/core/metrics
testing: warning: no tests to run
ok github.com/libp2p/go-libp2p/core/metrics 0.005s [no tests to run]
...
I've seen other outputs like:
🛑 no test files
So I think this should be parsed and rendered with something like
🟠 no test to run
shuffle parameters
✅ TestTransportCustomAddressWebTransportDoesNotStall (0s)
📦 github.com/libp2p/go-libp2p/config (0.9% coverage)
-test.shuffle 1691756209890594234
✅ TestNilOption (0s)
📦 github.com/libp2p/go-libp2p/core
That one is less of a bug, but it would be nicer to process this as well:
🎲 using -test.shuffle 1691756209890594234