summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2012-01-04 21:02:14 +0100
committerAchim Gratz <Stromeko@Stromeko.DE>2012-04-20 21:04:12 +0200
commit4a7ed95010d20c0f62bf9c26b331e1e353444585 (patch)
treeb69ac285500d24d28616fc679efd77e58be2d774
parentb323d9e5c3b64fbca90912db75f4d02e2c6575c9 (diff)
downloadorg-mode-4a7ed95010d20c0f62bf9c26b331e1e353444585.tar.gz
introduce new make target "test"
Makefile: add help for target "test" default.mk: more sane location for local data, add $(BTEST) that will run the test in batch mode. Some tests require non-standard packages, introduce $(BTEST_EXTRA) in order to add options so they can be found. targets.mk: new target "test" that implies "all" and then runs all test. Hidden target "test-dirty" runs tests without doing compilation.
-rw-r--r--Makefile1
-rw-r--r--default.mk11
-rw-r--r--targets.mk10
3 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8f52015..7e82e4a 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,7 @@ targets help:
$(info make pdf - make pdf documentation)
$(info make card - make refcards documentation)
$(info )
+ $(info make test - build org and run all test suite)
$(info make clean - clean Org ELisp and documentation files)
$(info make compile - cleanly compile Org ELisp files)
$(info make compile-dirty - compile Org ELisp without cleaning)
diff --git a/default.mk b/default.mk
index 0d32e3a..cdbcb49 100644
--- a/default.mk
+++ b/default.mk
@@ -12,7 +12,7 @@ prefix = /usr/share
lispdir = $(prefix)/emacs/site-lisp/org
# Where local data files go.
-datadir = $(lispdir)/etc
+datadir = $(prefix)/emacs/etc/org
# Where info files go.
infodir = $(prefix)/info
@@ -22,9 +22,16 @@ infodir = $(prefix)/info
##----------------------------------------------------------------------
# Using emacs in batch mode.
-
BATCH = $(EMACS) -batch -Q -L .
+# run tests
+BTEST = $(EMACS) -batch \
+ $(BTEST_EXTRA) \
+ -L lisp/ \
+ -l testing/org-test.el \
+ -eval "(setq org-confirm-babel-evaluate nil)" \
+ -f org-test-run-batch-tests
+
# How to byte-compile the whole source directory
ELCDIR = $(BATCH) \
--eval '(defconst org-release "$(ORGVERSION)")' \
diff --git a/targets.mk b/targets.mk
index 49795fc..02d1be0 100644
--- a/targets.mk
+++ b/targets.mk
@@ -21,8 +21,8 @@ ifneq ($(GITSTATUS),)
endif
.PHONY: default all up2 update compile lisp doc etc \
- install info html pdf card docs $(INSTSUB) \
- autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel
+ test install info html pdf card docs $(INSTSUB) \
+ autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel clean-install
all \
compile:: lisp
@@ -36,6 +36,12 @@ all \
clean-install:: $(SUBDIRS)
$(foreach dir, $?, $(MAKE) -C $(dir) $@;)
+test:: all
+
+test \
+test-dirty::
+ $(BTEST)
+
up2: update
sudo ${MAKE} install