Skip to content

Commit

Permalink
test: fix mempool_test and runners
Browse files Browse the repository at this point in the history
  • Loading branch information
losh11 committed Jun 1, 2023
1 parent 54ae71c commit 5a2d0e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ jobs:
- name: Send btcutil coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: btcutil/coverage.txt
path-to-profile: ltcutil/coverage.txt

- name: Send btcutil coverage for psbt package
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: btcutil/psbt/coverage.txt
path-to-profile: ltcutil/psbt/coverage.txt

test-race:
name: Unit race
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ unit:
@$(call print, "Running unit tests.")
$(GOTEST_DEV) ./... -test.timeout=20m
cd btcec; $(GOTEST_DEV) ./... -test.timeout=20m
cd btcutil; $(GOTEST_DEV) ./... -test.timeout=20m
cd btcutil/psbt; $(GOTEST_DEV) ./... -test.timeout=20m
cd ltcutil; $(GOTEST_DEV) ./... -test.timeout=20m
cd ltcutil/psbt; $(GOTEST_DEV) ./... -test.timeout=20m

unit-cover: $(GOACC_BIN)
@$(call print, "Running unit coverage tests.")
Expand All @@ -92,16 +92,16 @@ unit-cover: $(GOACC_BIN)
# 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 ltcutil; $(GOACC_BIN) ./...

cd btcutil/psbt; $(GOACC_BIN) ./...
cd ltcutil/psbt; $(GOACC_BIN) ./...

unit-race:
@$(call print, "Running unit race tests.")
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
cd btcec; env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
cd btcutil; env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
cd btcutil/psbt; env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
cd ltcutil; env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...
cd ltcutil/psbt; env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(GOTEST) -race -test.timeout=20m ./...

# =========
# UTILITIES
Expand All @@ -119,7 +119,7 @@ lint: $(LINT_BIN)

clean:
@$(call print, "Cleaning source.$(NC)")
$(RM) coverage.txt btcec/coverage.txt btcutil/coverage.txt btcutil/psbt/coverage.txt
$(RM) coverage.txt btcec/coverage.txt ltcutil/coverage.txt ltcutil/psbt/coverage.txt

.PHONY: all \
default \
Expand Down
2 changes: 1 addition & 1 deletion mempool/mempool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ func TestOrphanReject(t *testing.T) {

// Ensure no transactions were reported as accepted.
if len(acceptedTxns) != 0 {
t.Fatal("ProcessTransaction: reported %d accepted "+
t.Fatalf("ProcessTransaction: reported %d accepted "+
"transactions from failed orphan attempt",
len(acceptedTxns))
}
Expand Down

0 comments on commit 5a2d0e3

Please sign in to comment.