]> code.delx.au - gnu-emacs/blobdiff - test/automated/Makefile.in
* lisp/emacs-lisp/package.el (package-unpack): Load before compiling
[gnu-emacs] / test / automated / Makefile.in
index e0eaffa4c2c09284cb5c926956e761be5e8db55e..41f54f8aa69a061b4f32bbfc593d90c4d9cd825a 100644 (file)
@@ -1,6 +1,6 @@
 ### @configure_input@
 
-# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -39,10 +39,12 @@ SEPCHAR = @SEPCHAR@
 # directory, we can use emacs --chdir.
 EMACS = ../../src/emacs
 
+EMACS_EXTRAOPT=
+
 # Command line flags for Emacs.
 # Apparently MSYS bash would convert "-L :" to "-L ;" anyway,
 # but we might as well be explicit.
-EMACSOPT = -batch --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)"
+EMACSOPT = -batch --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)" $(EMACS_EXTRAOPT)
 
 # Prevent any settings in the user environment causing problems.
 unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS
@@ -50,9 +52,15 @@ unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS
 ## To run tests under a debugger, set this to eg: "gdb --args".
 GDB =
 
+# The locale to run tests under.  Tests should work if this is set to
+# any supported locale.  Use the C locale by default, as it should be
+# supported everywhere.
+TEST_LOCALE = C
+
 # The actual Emacs command run in the targets below.
 # Prevent any setting of EMACSLOADPATH in user environment causing problems.
-emacs = EMACSLOADPATH= LC_ALL=C EMACS_TEST_DIRECTORY=$(srcdir) $(GDB) "$(EMACS)" $(EMACSOPT)
+emacs = EMACSLOADPATH= LC_ALL=$(TEST_LOCALE) EMACS_TEST_DIRECTORY=$(srcdir) \
+ $(GDB) "$(EMACS)" $(EMACSOPT)
 
 .PHONY: all check
 
@@ -64,7 +72,7 @@ all: check
 
 ## Ignore any test errors so we can continue to test other files.
 ## But compilation errors are always fatal.
-WRITE_LOG = >& $@ || { stat=ERROR; cat $@; }; echo $$stat: $@
+WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@
 
 ## I'd prefer to use -emacs -f ert-run-tests-batch-and-exit rather
 ## than || true, since the former makes problems more obvious.
@@ -78,7 +86,7 @@ WRITE_LOG = >& $@ || { stat=ERROR; cat $@; }; echo $$stat: $@
 ## -l ./basename treats basename as a literal file (it would be nice
 ## to change this; bug#17848 - if that gets done, this can be simplified).
 ##
-## Beware: it approximates `no-byte-compile', so watch out for false-positives!
+## Beware: it approximates 'no-byte-compile', so watch out for false-positives!
 %.log: ${srcdir}/%.el
        @if grep '^;.*no-byte-compile: t' $< > /dev/null; then \
          loadfile=$<; \
@@ -91,7 +99,7 @@ WRITE_LOG = >& $@ || { stat=ERROR; cat $@; }; echo $$stat: $@
        $(emacs) -l ert -l $$loadfile \
          -f ert-run-tests-batch-and-exit ${WRITE_LOG}
 
-ELFILES = $(wildcard ${srcdir}/*.el)
+ELFILES = $(sort $(wildcard ${srcdir}/*.el))
 LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
 TESTS = ${LOGFILES:.log=}