1
0
Fork 0
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:
Vincent Batts 2016-11-07 09:53:24 -05:00
parent 85eacd2163
commit b83c40e7f9
Signed by: vbatts
GPG key ID: 10937E57733F1362
2 changed files with 60 additions and 6 deletions

View file

@ -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