auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 8b44b4f74f75e2f49e690


From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 8b44b4f74f75e2f49e690d634675bc14105a39ff
Date: Sat, 29 Nov 2014 14:39:27 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  8b44b4f74f75e2f49e690d634675bc14105a39ff (commit)
       via  8b93c8f8ea96c05604b2e86be05eba5f3e1445a6 (commit)
      from  ecdb72bef3fd1e216d6f75dffe3a90031799052f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8b44b4f74f75e2f49e690d634675bc14105a39ff
Author: Mosè Giordano <address@hidden>
Date:   Sat Nov 29 15:35:31 2014 +0100

    Add Makefile to run ERT tests.
    
    * tests/latex/latex-test.el (latex): Require latex.el.
    (LaTeX-indent-tabular-test/in): Expand file name in load
    directory, for automated tests.
    (LaTeX-indent-tabular-test/out): Ditto.
    
    * tests/Makefile: New Makefile.
    
    * Makefile.in (.PHONY): Add new check target.
    (check): New rule.  Suggest in comments to run it before a new
    release.

diff --git a/ChangeLog b/ChangeLog
index 339d936..3ecfba4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2014-11-29  Mosè Giordano  <address@hidden>
+
+       * tests/latex/latex-test.el (latex): Require latex.el.
+       (LaTeX-indent-tabular-test/in): Expand file name in load
+       directory, for automated tests.
+       (LaTeX-indent-tabular-test/out): Ditto.
+
+       * tests/Makefile: New Makefile.
+
+       * Makefile.in (.PHONY): Add new check target.
+       (check): New rule.  Suggest in comments to run it before a new
+       release.
+
 2014-11-28  Stefan Monnier  <address@hidden>
 
        * tex.el (TeX-view-program-list-builtin): Fix up paren typo.
diff --git a/Makefile.in b/Makefile.in
index 950a27a..60e21dc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -178,8 +178,8 @@ all: texmf lisp docs
 .PHONY: all lisp info dvi some install install-el install-lisp docs    \
        install-docs install-auto install-metadata install-startup      \
        install-man clean distclean maintainer-clean extraclean         \
-       tar-ball-clean check-tag release-commit dist snapshot patch     \
-       tar-ball rpm-packages wc xemacs-package windows-package         \
+       tar-ball-clean check-tag check release-commit dist snapshot     \
+       patch tar-ball rpm-packages wc xemacs-package windows-package   \
        release-sign release-upload preview-ball
 
 texmf: latex/Makefile
@@ -381,6 +381,10 @@ wc:
 
 # Steps for making a release:
 #
+# 0) check
+#    Run tests using ERT tool.  Not necessary but strongly suggested before a
+#    release.
+#
 # 1) release-commit TAG=<tag> COMMITTER=<committer>
 #    Tag the release.
 #    Pass `COMMITTER=<committer>' argument only if it is different from
@@ -418,6 +422,9 @@ snapshot: dist
 check-tag:
        @if [ "X$(TAG)" = "X" ]; then echo "*** Error: No TAG ***"; exit 1; fi
 
+check:
+       cd tests && $(MAKE) check
+
 release-commit: check-tag
        @echo "Tagging release $(TAG) in Git ..."
        sleep 5
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..6f281bc
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,89 @@
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+
+# This file is part of AUCTeX.
+
+# GNU Emacs is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU Emacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+### Commentary:
+
+## Some targets:
+## check: re-run all tests, writing to .log files.
+## check-maybe: run all tests whose .log file needs updating
+## filename.log: run tests from filename.el if .log file needs updating
+## filename: re-run tests from filename.el, with no logging
+
+## Adapted from test/automated/Makefile.in of GNU Emacs.
+
+### Code:
+
+SHELL = /bin/sh
+
+EMACS = emacs
+# AUCTeX source directory.
+SRCDIR = ".."
+
+# Command line flags for Emacs.
+EMACSOPT = -batch -L $(SRCDIR)
+
+# Prevent any settings in the user environment causing problems.
+unexport EMACSDATA EMACSDOC EMACSPATH
+
+## To run tests under a debugger, set this to eg: "gdb --args".
+GDB =
+
+# The actual Emacs command run in the targets below.
+# Prevent any setting of EMACSLOADPATH in user environment causing problems.
+emacs = EMACSLOADPATH= LC_ALL=C $(GDB) "$(EMACS)" $(EMACSOPT)
+
+.PHONY: all check
+
+all: check
+
+# In GNU Emacs there is a bashism here to direct output to file and to standard
+# output at the same time.
+WRITE_LOG = 2>&1 | tee $@
+
+%.log: %.el
+       $(emacs) -l ert -l $< -f ert-run-tests-batch-and-exit ${WRITE_LOG}
+
+ELFILES = $(wildcard */*.el)
+LOGFILES = $(patsubst %.el,%.log, ${ELFILES})
+TESTS = ${LOGFILES:.log=}
+
+## If we have to interrupt a hanging test, preserve the log so we can
+## see what the problem was.
+.PRECIOUS: %.log
+
+.PHONY: ${TESTS}
+
+## The short aliases that always re-run the tests, with no logging.
+define test_template
+$(1):
+       @test ! -f $(1).log || mv $(1).log $(1).log~
+       @${MAKE} $(1).log WRITE_LOG=
+endef
+
+$(foreach test,${TESTS},$(eval $(call test_template,${test})))
+
+## Re-run all the tests every time.
+check:
+       address@hidden f in */*.log; do test ! -f $$f || mv $$f $$f~; done
+       @${MAKE} ${LOGFILES}
+
+.PHONY: clean
+
+clean:
+       -rm -f */*.log */*.log~
+
+# Makefile ends here.
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index 6e04230..ac662db 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -1,4 +1,4 @@
-;;; latex-test.el --- tests for LaTeX mode?
+;;; latex-test.el --- tests for LaTeX mode
 
 ;; Copyright (C) 2014 Free Software Foundation, Inc.
 
@@ -22,10 +22,16 @@
 ;;; Code:
 
 (require 'ert)
-
-
-(defvar LaTeX-indent-tabular-test/in  (expand-file-name "tabular-in.tex"))
-(defvar LaTeX-indent-tabular-test/out (expand-file-name "tabular-out.tex"))
+(require 'latex)
+
+(defvar LaTeX-indent-tabular-test/in
+  (expand-file-name "tabular-in.tex"
+                   (when load-file-name
+                     (file-name-directory load-file-name))))
+(defvar LaTeX-indent-tabular-test/out
+  (expand-file-name "tabular-out.tex"
+                   (when load-file-name
+                     (file-name-directory load-file-name))))
 
 (ert-deftest LaTeX-indent-tabular ()
   (should (string=

commit 8b93c8f8ea96c05604b2e86be05eba5f3e1445a6
Author: Stefan Monnier <address@hidden>
Date:   Sun Nov 2 01:10:30 2014 -0400

    * latex-test.el: Add proper copyright header.
    
    Signed-off-by: Mosè Giordano <address@hidden>

diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index a2d71e4..6e04230 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -1,3 +1,29 @@
+;;; latex-test.el --- tests for LaTeX mode?
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Code:
+
+(require 'ert)
+
+
 (defvar LaTeX-indent-tabular-test/in  (expand-file-name "tabular-in.tex"))
 (defvar LaTeX-indent-tabular-test/out (expand-file-name "tabular-out.tex"))
 
@@ -11,3 +37,5 @@
            (with-temp-buffer
              (insert-file-contents LaTeX-indent-tabular-test/out)
              (buffer-string)))))
+
+;;; latex-test.el ends here

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |   13 +++++++
 Makefile.in               |   11 +++++-
 tests/Makefile            |   89 +++++++++++++++++++++++++++++++++++++++++++++
 tests/latex/latex-test.el |   38 ++++++++++++++++++-
 4 files changed, 147 insertions(+), 4 deletions(-)
 create mode 100644 tests/Makefile


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]