From fdf27687bba6a286720928977cd942d587232037 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 4 Oct 2021 15:08:37 +0300 Subject: [PATCH] [#137] Makefile: add target for testing Signed-off-by: Evgenii Stratonikov --- Makefile | 5 ++++- README.md | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b039d81..1d3aa9c 100644 --- a/Makefile +++ b/Makefile @@ -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 {} \; diff --git a/README.md b/README.md index 8e4404f..22d7275 100644 --- a/README.md +++ b/README.md @@ -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|