4 ms·
Only if `go test -cover ./...` would work. Currently in needs a lot of magic [1] (ignore sharness test coverage magic, it uses even more magic [2]). [1]: https
by Kubuxu 9y ago
Only if `go test -cover ./...` would work. Currently in needs a lot of magic [1] (ignore sharness test coverage magic, it uses even more magic [2]).
[1]: https://github.com/ipfs/go-ipfs/blob/master/coverage/Rules.mk#L12-L27 https://github.com/ipfs/go-ipfs/blob/master/coverage/Rules.m...
[2]: same file as [1], we compile unit test using `go test -c -cover` that runs our main function and saves the return value to file ([3] and [4]), but it works. If someone considers doing that, run everything in ramfs (tmpfs).
[3]: https://github.com/ipfs/go-ipfs/blob/master/coverage/main/main.go https://github.com/ipfs/go-ipfs/blob/master/coverage/main/ma...
[4]: https://github.com/ipfs/go-ipfs/blob/master/cmd/ipfs/runmain_test.go https://github.com/ipfs/go-ipfs/blob/master/cmd/ipfs/runmain...