Skip to content

Commit c79452e

Browse files
committed
fix(Makefile): fix stonks tests grep
1 parent ced54b8 commit c79452e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ STONKS_POSTVOTE_SUITES ?= staking-revenue-source buyback-happy-path
104104
test-stonks-integration-prevote:
105105
cd $(STONKS_DIR) && \
106106
{ [ -d node_modules ] || npm ci; } && \
107-
POSTVOTE_PATTERN=$$(echo "$(STONKS_POSTVOTE_SUITES)" | tr ' ' '|') && \
108-
RPC_URL=$(ETH_RPC_URL) npx hardhat test $$(ls test/integration/*.ts | grep -vE "$$POSTVOTE_PATTERN") --network localhost
107+
POSTVOTE_PATTERN="^test/integration/($$(echo $(STONKS_POSTVOTE_SUITES) | tr ' ' '|'))\.ts$$" && \
108+
PREVOTE_SUITES=$$(ls test/integration/*.ts | grep -vE "$$POSTVOTE_PATTERN" || true) && \
109+
{ [ -n "$$PREVOTE_SUITES" ] || { echo "No pre-vote suites left after excluding: $(STONKS_POSTVOTE_SUITES)" >&2; exit 1; }; } && \
110+
RPC_URL=$(ETH_RPC_URL) npx hardhat test $$PREVOTE_SUITES --network localhost
109111

110112
test-stonks-integration-postvote: ci-prepare-environment
111113
cd $(STONKS_DIR) && \

0 commit comments

Comments
 (0)