[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa-admin ff431a8 223/357: Merge branch 'master' of git.sv.gnu.o
From: |
Stefan Monnier |
Subject: |
[elpa] elpa-admin ff431a8 223/357: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa |
Date: |
Thu, 10 Dec 2020 18:06:48 -0500 (EST) |
branch: elpa-admin
commit ff431a8a7fd36a4e0165897c1d1ecb2ec973e989
Merge: 3fc8681 cc33931
Author: Ken Manheimer <ken.manheimer@gmail.com>
Commit: Ken Manheimer <ken.manheimer@gmail.com>
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa
---
GNUmakefile | 29 ++++++++++++++++++++++++++++
admin/ert-support.el | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+)
diff --git a/GNUmakefile b/GNUmakefile
index ad86a7f..d23d523 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,4 +1,5 @@
# Makefile for GNU Emacs Lisp Package Archive.
+#
EMACS=emacs --batch
@@ -190,3 +191,31 @@ all-in-place: $(extra_elcs) $(autoloads) $(pkg_descs)
externals:
$(EMACS) -l admin/archive-contents.el \
-f archive-add/remove/update-externals
+
+
+
+
+################### Testing ###############
+
+PACKAGE_DIRS = $(shell find packages -maxdepth 1 -type d)
+PACKAGES=$(subst /,,$(subst packages,,$(PACKAGE_DIRS)))
+
+TOP =$(shell pwd)
+
+define test_template
+$(1)-test:
+ cd packages/$(1);\
+ $(EMACS) -l $(TOP)/admin/ert-support.el \
+ --eval "(ert-support-test-package \"$(TOP)\" '$(1))" \
+
+$(1)-test-log:
+ $(MAKE) $(1)-test > packages/$(1)/$(1).log 2>&1 || { stat=ERROR; }
+endef
+
+$(foreach package,$(PACKAGES),$(eval $(call test_template,$(package))))
+
+PACKAGES_TESTS=$(addsuffix -test-log,$(PACKAGES))
+PACKAGES_LOG=$(foreach package,$(PACKAGES),packages/$(package)/$(package).log)
+
+check: $(PACKAGES_TESTS)
+ $(EMACS) -l ert -f ert-summarize-tests-batch-and-exit $(PACKAGES_LOG)
diff --git a/admin/ert-support.el b/admin/ert-support.el
new file mode 100644
index 0000000..93d1af8
--- /dev/null
+++ b/admin/ert-support.el
@@ -0,0 +1,54 @@
+;; The contents of this file are subject to the GPL License, Version 3.0.
+
+;; Copyright (C) 2016, Free Software Foundation, Inc.
+
+;; This program 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.
+
+;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+(defun ert-support-package-install (top-directory package)
+ ;; blitz default value and set up from elpa.
+ (setq package-archives
+ `(("local-elpa" . ,(concat top-directory "/archive/packages"))))
+ (setq package-user-dir
+ (make-temp-file "elpa-test" t))
+ (package-initialize)
+ (package-refresh-contents)
+ (package-install package))
+
+(defun ert-support-test-find-tests (package-directory package)
+ (or
+ (directory-files package-directory nil ".*-test.el$")
+ (directory-files package-directory nil ".*-tests.el$")
+ (let ((dir-test
+ (concat package-directory "/test")))
+ (when (file-exists-p dir-test)
+ (directory-files dir-test)))
+ (let ((dir-tests
+ (concat package-directory "/tests")))
+ (when (file-exists-p dir-tests)
+ (directory-files dir-tests)))))
+
+(defun ert-support-load-tests (package-directory package)
+ (mapc
+ (lambda(file)
+ (message "Loading test file... %s" (concat package-directory file))
+ (load-file (concat package-directory file)))
+ (ert-support-test-find-tests package-directory package)))
+
+(defun ert-support-test-package (top-directory package)
+ (ert-support-package-install top-directory package)
+ (ert-support-load-tests
+ (concat top-directory "/packages/" (symbol-name package) "/")
+ package)
+
+ (ert-run-tests-batch-and-exit t))
- [elpa] elpa-admin 876bb45 128/357: Merge git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, (continued)
- [elpa] elpa-admin 876bb45 128/357: Merge git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 8861b20 138/357: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin a3f667f 133/357: Don't allow package-initialize to use ~/.emacs.d, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 60d74f2 136/357: Merge commit 'aecfbcbc10cf03ec94062ac3e590f8118e5a0434', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 428b368 137/357: Add "rudel" to the list of externals., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 3038d13 151/357: README: Use remote.origin.url to avoid loosing write access and save some typing., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 773b9dd 147/357: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 1b86fe8 166/357: Add 'packages/load-relative/' from commit '15ffaa9ebf1b7bbfcc307d1716eec135253b3b8d', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 839fe96 209/357: * GNUmakefile (check_copyrights): Skip symlinks, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 642c7c1 203/357: Prevent accidental deletion of .git, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin ff431a8 223/357: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa,
Stefan Monnier <=
- [elpa] elpa-admin 0907441 229/357: packages/yasnippet: subtree pull from external, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin c8b582a 220/357: Merge commit '1054ea1bc5b07a1438a18c1b33f4266b28ff9d77', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 8c08096 285/357: * GNUmakefile (org-fetch): Don't stop the whole update if it fails., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 8154769 282/357: * copyright_exceptions: Update for new uni-confusables/gen-confusables.el, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 6734638 244/357: Merge commit 'd7bac581f04756582078cd9ea45e5a28406ee05c', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin d276c3d 288/357: * README: Don't clone a clone., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 5ac89c8 281/357: * packages/yasnippet: Merge version 0.12.2 from upstream., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin f25cda3 303/357: * GNUmakefile (%.elc): Use load-prefer-newer, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 21c69f7 308/357: Merge commit 'c304ac9a80ab7e96f705771a3842a48bf5a32c8a', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin cdefe40 311/357: Improve copying of :core files; update .gitignore, Stefan Monnier, 2020/12/10