]> Sergey Matveev's repositories - zsh-autoenv.git/blobdiff - Makefile
Use 'command cat'
[zsh-autoenv.git] / Makefile
index fc1e35da8b079d21a5e1e0289ad4a8db3225a031..b43d7097990801d24614fc827a80f1c7f958ac42 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,11 +12,16 @@ itest:
 
 # Run tests with all ZDOTDIRs.
 test_full:
-       for i in $(wildcard tests/ZDOTDIR*); do \
-               echo "ZDOTDIR=$$i"; \
-               ZDOTDIR=${CURDIR}/$$i cram --shell=zsh -v tests; \
-               echo; \
-       done
+       for zsh in zsh /opt/zsh4/bin/zsh; do \
+               command -v $$zsh || { echo "Skipping non-existing shell: $$zsh"; continue; }; \
+               ret=0; \
+               for i in $(wildcard tests/ZDOTDIR*); do \
+                       echo "zsh=$zsh ZDOTDIR=$$i"; \
+                       SHELL=$$zsh ZDOTDIR=${CURDIR}/$$i cram --shell=zsh -v tests || ret=$$?; \
+                       echo; \
+               done; \
+       done; \
+       return $$ret
 
 # Define targets for test files, with relative and abolute path.
 # Use verbose output, which is useful with Vim's 'errorformat'.
@@ -29,3 +34,6 @@ $(_TESTS_REL_AND_ABS):
 .PHONY: $(_TESTS_REL_AND_ABS)
 
 .PHONY: itest test
+
+clean:
+       $(RM) tests/*.err