[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin ff431a8 223/439: Merge branch 'master' of git.sv.gnu
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin ff431a8 223/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa |
Date: |
Sun, 17 Oct 2021 15:48:06 -0400 (EDT) |
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))
- [nongnu] elpa-admin 83d4032 202/439: * README: Typos, (continued)
- [nongnu] elpa-admin 83d4032 202/439: * README: Typos, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7e4545d 200/439: * admin/archive-contents.el (archive--html-header): Use `title' for the H1., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a30b538 216/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a3dcbb3 225/439: Merge branch 'master' into new-website, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b9f2b90 208/439: * admin/archive-contents.el (archive--sync-emacs-repo): Fix thinko., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 839fe96 209/439: * GNUmakefile (check_copyrights): Skip symlinks, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c8b582a 220/439: Merge commit '1054ea1bc5b07a1438a18c1b33f4266b28ff9d77', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7558d12 206/439: Make externals directory removal safer, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5b91341 226/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 3fc8681 221/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin ff431a8 223/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa,
Philip Kaludercic <=
- [nongnu] elpa-admin 4fdec5b 230/439: packages/yasnippet: subtree pull from external, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 33b7bc9 236/439: Merge commit '8d07bdedfe9e56de8a32f32af6e4c853a5fa6c4d', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0d7eb99 235/439: Add 'packages/realgud/' from commit 'b7a7fe924217931332915d457928c6851db4a636', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b2531f1 233/439: * admin/archive-contents.el: Minimal support for local externals, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c55c928 238/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8efb626 241/439: Merge commit '4d1dcdf7631c23b1259ad4f72bf9686cf95fb46c', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c398fd6 116/439: supports web sockets, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0306c73 111/439: update README, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 210b02d 125/439: README and install instructions mention GNU ELPA, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 96a8283 129/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17