aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rwxr-xr-xinput_fail.py5
2 files changed, 11 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 6ff5e71..a28522e 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@ MOUNT ?= /mnt/$(NAME)_mount
ifneq ("$(wildcard $(MOUNT))","")
export TEST_FILESYSTEM_ROOT = $(MOUNT)
endif
+
# The flags code below lets the caller of the makefile change the build flags
# for fscrypt in a familiar manner.
# CFLAGS
@@ -121,16 +122,16 @@ gen:
# Update the vendored dependencies.
.PHONY: update
update:
- @govendor init
- @govendor fetch +missing
- @govendor add +external
- @govendor remove +unused
+ govendor init
+ govendor fetch +missing
+ govendor add +external
+ govendor remove +unused
# Format all the Go and C code
.PHONY: format format-check
format:
- @goimports -l -w $(GO_FILES)
- @clang-format -i -style=Google $(C_FILES)
+ goimports -l -w $(GO_FILES)
+ clang-format -i -style=Google $(C_FILES)
format-check:
@goimports -d $(GO_FILES) \
@@ -191,7 +192,7 @@ test-teardown:
travis-install: go-tools test-setup
go get -u github.com/mattn/goveralls
-travis-script: lint format-check default
+travis-script: lint format-check test default
goveralls -service=travis-ci
@govendor list +missing +external +unused \
| ./input_fail.py "Incorrect vendored dependencies. Run \"make update\"."
diff --git a/input_fail.py b/input_fail.py
index 4b7e802..7bf33c3 100755
--- a/input_fail.py
+++ b/input_fail.py
@@ -1,13 +1,14 @@
#!/usr/bin/env python
# Exit with 1 if any input is provided. Print the input to stdout, unless an
-# argument is specified. In that case, also print the argument.
+# argument is specified. In that case, print the argument instead.
import sys
input_string = sys.stdin.read()
if input_string != "":
- sys.stdout.write(input_string)
if len(sys.argv) >= 2:
print(sys.argv[1])
+ else:
+ sys.stdout.write(input_string)
sys.exit(1)