contract/*: created test-no-run target in Makefile

This commit is contained in:
aggstam
2023-06-06 14:44:18 +03:00
parent 09eb0e1147
commit 39be99644c
3 changed files with 29 additions and 7 deletions

View File

@@ -19,6 +19,9 @@ WASM_SRC = \
# wasm contract binary
WASM_BIN = consensus_contract.wasm
# Just compile the tests
NO_RUN = "--no-run"
all: $(WASM_BIN)
$(WASM_BIN): $(WASM_SRC) $(PROOFS_BIN)
@@ -31,15 +34,19 @@ $(PROOFS_BIN): $(ZKAS) $(PROOFS_SRC)
test-stake-unstake: all
$(CARGO) test --release --features=no-entrypoint,client \
--package darkfi-consensus-contract \
--test stake_unstake
--test stake_unstake $(ARGS)
test-genesis-stake-unstake: all
$(CARGO) test --release --features=no-entrypoint,client \
--package darkfi-consensus-contract \
--test genesis_stake_unstake
--test genesis_stake_unstake $(ARGS)
test: test-genesis-stake-unstake test-stake-unstake
test-no-run:
$(MAKE) test-genesis-stake-unstake ARGS=$(NO_RUN)
$(MAKE) test-stake-unstake ARGS=$(NO_RUN)
clean:
rm -f $(PROOFS_BIN) $(WASM_BIN)

View File

@@ -19,6 +19,9 @@ WASM_SRC = \
# wasm contract binary
WASM_BIN = dao_contract.wasm
# Just compile the tests
NO_RUN = "--no-run"
all: $(WASM_BIN)
$(WASM_BIN): $(WASM_SRC) $(PROOFS_BIN)
@@ -31,10 +34,13 @@ $(PROOFS_BIN): $(ZKAS) $(PROOFS_SRC)
test-integration: all
$(CARGO) test --release --features=no-entrypoint,client \
--package darkfi-dao-contract \
--test integration
--test integration $(ARGS)
test: test-integration
test-no-run:
$(MAKE) test-integration ARGS=$(NO_RUN)
clean:
rm -f $(PROOFS_BIN) $(WASM_BIN)

View File

@@ -19,6 +19,9 @@ WASM_SRC = \
# wasm contract binary
WASM_BIN = money_contract.wasm
# Just compile the tests
NO_RUN = "--no-run"
all: $(WASM_BIN)
$(WASM_BIN): $(WASM_SRC) $(PROOFS_BIN)
@@ -31,22 +34,22 @@ $(PROOFS_BIN): $(ZKAS) $(PROOFS_SRC)
test-integration: all
$(CARGO) test --release --features=no-entrypoint,client \
--package darkfi-money-contract \
--test integration
--test integration $(ARGS)
test-mint-pay-swap: all
$(CARGO) test --release --features=no-entrypoint,client \
--package darkfi-money-contract \
--test mint_pay_swap
--test mint_pay_swap $(ARGS)
test-txs-verification: all
$(CARGO) test --release --features=no-entrypoint,client \
--package darkfi-money-contract \
--test txs_verification
--test txs_verification $(ARGS)
test-genesis-mint: all
$(CARGO) test --release --features=no-entrypoint,client \
--package darkfi-money-contract \
--test genesis_mint
--test genesis_mint $(ARGS)
bench:
$(CARGO) test --release --features=no-entrypoint,client \
@@ -55,6 +58,12 @@ bench:
test: test-integration test-mint-pay-swap test-txs-verification test-genesis-mint
test-no-run:
$(MAKE) test-integration ARGS=$(NO_RUN)
$(MAKE) test-mint-pay-swap ARGS=$(NO_RUN)
$(MAKE) test-txs-verification ARGS=$(NO_RUN)
$(MAKE) test-genesis-mint ARGS=$(NO_RUN)
clean:
rm -f $(PROOFS_BIN) $(WASM_BIN)