## 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
## -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=$<; \
$(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=}