diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2013-06-22 11:45:47 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2013-06-22 11:57:59 +0100 |
commit | 9842c826f1fb667feb006693ab10cb18c774f8e5 (patch) | |
tree | 27a8dada8f1b95754a204675dc18e7101845cb19 /Makefile | |
parent | 10c24e03326ea7d69485af0271c8be77033abf08 (diff) | |
download | gitano-9842c826f1fb667feb006693ab10cb18c774f8e5.tar.gz |
Initial testing tool, library and basic test
The tool (testing/gitano-test-tool.in) provides a bunch of complex behaviours
which are then used by the scenario test implementations in
testing/library.yarn. From there, those implementations for scenario tests
which are in the rest of the .yarn files in testing/. A top level 'make test'
will invoke the test suite.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -25,6 +25,10 @@ LIB_BINS := gitano-auth gitano-post-receive-hook gitano-update-hook \ BINS := gitano-setup +TEST_BIN_NAMES := gitano-test-tool + +TESTS := 01-basics + MODS := gitano \ \ gitano.util \ @@ -54,6 +58,13 @@ SRC_MOD_FILES := $(patsubst %,lib/%,$(MOD_FILES)) LOCAL_BINS := $(patsubst %,bin/%,$(BINS) $(LIB_BINS)) LIB_BIN_SRCS := $(patsubst %,bin/%.in,$(LIB_BINS)) +TEST_BINS := $(patsubst %,testing/%,$(TEST_BIN_NAMES)) +TEST_BIN_SRCS := $(patsubst %,%.in,$(TEST_BINS)) + +YARN := yarn + +TESTS := $(patsubst %,testing/%.yarn,$(TESTS)) + GEN_BIN := utils/install-lua-bin RUN_GEN_BIN := $(LUA) $(GEN_BIN) $(LUA) define GEN_LOCAL_BIN @@ -88,6 +99,8 @@ local: $(LOCAL_BINS) clean: @echo "CLEAN: local binaries" @$(RM) $(LOCAL_BINS) + @echo "CLEAN: test binaries" + @$(RM) $(TEST_BINS) distclean: clean @find . -name "*~" -delete @@ -118,3 +131,10 @@ install-skel: for SKELFILE in $(SKEL_FILES); do \ install -m 644 skel/$$SKELFILE $(SKEL_INST_PATH)/$$SKELFILE; \ done + +test: local $(TEST_BINS) + @env GTT="$$(pwd)/testing/gitano-test-tool" \ + $(YARN) testing/library.yarn $(TESTS) + +testing/%: testing/%.in $(GEN_BIN) + $(call GEN_LOCAL_BIN,$<,$@) |