diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | test/Makefile (renamed from tests.makefile) | 8 | ||||
-rw-r--r-- | test/tests.sh (renamed from src/tests.sh) | 0 |
3 files changed, 10 insertions, 4 deletions
@@ -13,7 +13,7 @@ SSHD_CONFIG_DIR = $(SSH_CONFIG_DIR)/sshd_config.d | |||
13 | SSH_LIB_DIR = /usr/lib/ssh | 13 | SSH_LIB_DIR = /usr/lib/ssh |
14 | USER_SSH_CONFIG_DIR = ~$(USER)/.ssh | 14 | USER_SSH_CONFIG_DIR = ~$(USER)/.ssh |
15 | 15 | ||
16 | .PHONY: install shared doc | 16 | .PHONY: install shared doc test |
17 | 17 | ||
18 | shared: install | 18 | shared: install |
19 | git config core.self-forge true | 19 | git config core.self-forge true |
@@ -29,7 +29,9 @@ install: | |||
29 | [ -e "$(SSH_LIB_DIR)"/AuthorizedKeysCommand ] || $(SUDO) ln -s -t /etc/ssh "$(SSH_LIB_DIR)"/AuthorizedKeysCommand | 29 | [ -e "$(SSH_LIB_DIR)"/AuthorizedKeysCommand ] || $(SUDO) ln -s -t /etc/ssh "$(SSH_LIB_DIR)"/AuthorizedKeysCommand |
30 | 30 | ||
31 | doc: README.html | 31 | doc: README.html |
32 | |||
32 | README.html: README.md | 33 | README.html: README.md |
33 | pandoc -t html $< > $@ | 34 | pandoc -t html $< > $@ |
34 | 35 | ||
35 | include tests.makefile | 36 | test: |
37 | make -C test | ||
diff --git a/tests.makefile b/test/Makefile index 81c9312..3bc1a66 100644 --- a/tests.makefile +++ b/test/Makefile | |||
@@ -1,3 +1,7 @@ | |||
1 | .DEFAULT_GOAL = test | ||
2 | |||
3 | include ../Makefile | ||
4 | |||
1 | testuser = testuser | 5 | testuser = testuser |
2 | 6 | ||
3 | SU = $(SUDO) su | 7 | SU = $(SUDO) su |
@@ -10,8 +14,8 @@ useradd: | |||
10 | $(SU) - $(testuser) -c 'git config --global user.name $(testuser)' | 14 | $(SU) - $(testuser) -c 'git config --global user.name $(testuser)' |
11 | $(SU) - $(testuser) -c 'git config --global user.email $(testuser)' | 15 | $(SU) - $(testuser) -c 'git config --global user.email $(testuser)' |
12 | 16 | ||
13 | test: install $(shell getent passwd $(testuser) >/dev/null || echo useradd) | 17 | test: $(shell getent passwd $(testuser) >/dev/null || echo useradd) |
14 | $(ROOT_INSTALL) -t ~$(testuser) $(SRC)/tests.sh | 18 | $(ROOT_INSTALL) -t ~$(testuser) tests.sh |
15 | $(SU) - $(testuser) -c ./tests.sh | 19 | $(SU) - $(testuser) -c ./tests.sh |
16 | 20 | ||
17 | ifeq ($(testuser),) | 21 | ifeq ($(testuser),) |
diff --git a/src/tests.sh b/test/tests.sh index 5d221b6..5d221b6 100644 --- a/src/tests.sh +++ b/test/tests.sh | |||