build: use sed to remove v2 path from btcec/coverage.txt

The `goveralls` tool we use to handle code coverage upload seems to not
understand that a `v2 module can exist, without having a v2 file path on
disk. We use a `sed` command to remove the `v2` module prefix so the
tool can reach into the correct file to extract the source code.
This commit is contained in:
Olaoluwa Osuntokun 2022-01-26 16:31:54 -08:00
parent 3ee1211e78
commit b3d263e902
No known key found for this signature in database
GPG key ID: 3BBD59E99B280306

View file

@ -87,8 +87,13 @@ unit:
unit-cover: $(GOACC_BIN) unit-cover: $(GOACC_BIN)
@$(call print, "Running unit coverage tests.") @$(call print, "Running unit coverage tests.")
$(GOACC_BIN) ./... $(GOACC_BIN) ./...
cd btcec; $(GOACC_BIN) ./...
# We need to remove the /v2 pathing from the module to have it work
# nicely with the CI tool we use to render live code coverage.
cd btcec; $(GOACC_BIN) ./...; sed -i.bak 's/v2\///g' coverage.txt
cd btcutil; $(GOACC_BIN) ./... cd btcutil; $(GOACC_BIN) ./...
cd btcutil/psbt; $(GOACC_BIN) ./... cd btcutil/psbt; $(GOACC_BIN) ./...
unit-race: unit-race: