[#137] Makefile: add target for testing

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-10-04 15:08:37 +03:00 committed by Alex Vanin
parent 6a6d377259
commit fdf27687bb
2 changed files with 12 additions and 1 deletions

View file

@ -4,7 +4,7 @@ SHELL=bash
NEOGO?=neo-go
VERSION?=$(shell git describe --tags)
.PHONY: all build sidechain
.PHONY: all build sidechain test
build: all
all: sidechain mainnet
sidechain: alphabet morph nns
@ -33,6 +33,9 @@ morph: $(foreach sc,$(morph_sc),$(sc)/$(sc)_contract.nef)
mainnet: $(foreach sc,$(mainnet_sc),$(sc)/$(sc)_contract.nef)
nns: $(foreach sc,$(nns_sc),$(sc)/$(sc)_contract.nef)
test:
@go test ./tests/...
clean:
find . -name '*.nef' -exec rm -rf {} \;
find . -name 'config.json' -exec rm -rf {} \;

View file

@ -67,6 +67,14 @@ $ NEOGO=/home/user/neo-go/bin/neo-go make all
Remove compiled files with `make clean` or `make mr_proper` command.
# Testing
Smartcontract tests reside in `tests/` directory. To execute test suite
after applying changes simply run `make test`.
```
$ make test
ok github.com/nspcc-dev/neofs-contract/tests 0.462s
```
# NeoFS API compatibility
|neofs-contract version|supported NeoFS API versions|