From 3619eed4515cf51161cfa7c57be4f330cd07e377 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 9 May 2020 14:04:47 -0700 Subject: Add cli-tests framework Add a framework for writing automated tests of the fscrypt command-line tool. See cli-tests/README.md for details. --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d110dd8..6e2eda2 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ lint: $(BIN)/golint $(BIN)/staticcheck $(BIN)/misspell clean: rm -f $(BIN)/$(NAME) $(PAM_MODULE) $(TOOLS) coverage.out $(COVERAGE_FILES) $(PAM_CONFIG) -###### Testing Commands (setup/teardown require sudo) ###### +###### Go tests ###### .PHONY: test test-setup test-teardown # If MOUNT exists signal that we should run integration tests. @@ -139,6 +139,15 @@ test-teardown: rmdir $(MOUNT) rm -f $(IMAGE) +###### Command-line interface tests ###### +.PHONY: cli-test cli-test-update + +cli-test: $(BIN)/$(NAME) + sudo cli-tests/run.sh + +cli-test-update: $(BIN)/$(NAME) + sudo cli-tests/run.sh --update-output + # Runs tests and generates coverage COVERAGE_FILES := $(addsuffix coverage.out,$(GO_DIRS)) coverage.out: $(BIN)/gocovmerge $(COVERAGE_FILES) -- cgit v1.2.3