maelstrom-software / maelstrom

Maelstrom is a fast Rust, Go, and Python test runner that runs every test in its own container. Tests are either run locally or distributed to a clustered job runner.
https://maelstrom-software.com/
Apache License 2.0
583 stars 10 forks source link

Add support for test coverage to `maelstrom-go-test` #350

Open nfachan opened 3 months ago

nfachan commented 3 months ago

There are few things to consider.

First, we'll have to compile the code with coverage instrumentation enabled.

Second, when we run the code, we'll need to get the coverage profile back from the test runner. Go test also provides for printing a summary of coverage percentages without creating the whole coverage profile. We'd have to decide if we wanted to put that in the UI somehow.

There are various go test flags regarding the coverage profile type and the instrumentation that we'd need to parse and then give to go test -c.

nfachan commented 3 months ago

Part of #319