mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-13 18:29:11 +00:00
test: add basic cli test
tar and filesystem check Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
85eacd2163
commit
b83c40e7f9
2 changed files with 60 additions and 6 deletions
22
Makefile
22
Makefile
|
@ -1,10 +1,12 @@
|
|||
|
||||
BUILD := gomtree
|
||||
CWD := $(shell pwd)
|
||||
SOURCE_FILES := $(shell find . -type f -name "*.go")
|
||||
|
||||
default: validation build
|
||||
|
||||
.PHONY: validation
|
||||
validation: test lint vet
|
||||
validation: test lint vet .cli.test
|
||||
|
||||
.PHONY: test
|
||||
test: .test
|
||||
|
@ -24,12 +26,20 @@ vet: .vet
|
|||
.vet: $(SOURCE_FILES)
|
||||
go vet ./... && touch $@
|
||||
|
||||
.PHONY: build
|
||||
build: gomtree
|
||||
.PHONY: cli.test
|
||||
cli.test: .cli.test
|
||||
|
||||
gomtree: $(SOURCE_FILES)
|
||||
go build ./cmd/gomtree
|
||||
.cli.test: $(BUILD) $(wildcard ./test/cli/*.sh)
|
||||
@ for test in ./test/cli/*.sh ; do \
|
||||
bash $$test $(CWD) ; \
|
||||
done && touch $@
|
||||
|
||||
.PHONY: build
|
||||
build: $(BUILD)
|
||||
|
||||
$(BUILD): $(SOURCE_FILES)
|
||||
go build ./cmd/$(BUILD)
|
||||
|
||||
clean:
|
||||
rm -rf gomtree
|
||||
rm -rf $(BUILD) .test .vet .lint .cli.test
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue