aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-05-09 14:04:47 -0700
committerEric Biggers <ebiggers@google.com>2020-05-09 14:04:47 -0700
commit3619eed4515cf51161cfa7c57be4f330cd07e377 (patch)
treef09f6f8963088dc05fa62e4a6e4003a8825c697f /Makefile
parent5716215ceae3ab8b49a7b2ba410cb51a82c3176b (diff)
Add cli-tests framework
Add a framework for writing automated tests of the fscrypt command-line tool. See cli-tests/README.md for details.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
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)