[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin ec13cc2 260/439: Let ert-support.el work for subdire
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin ec13cc2 260/439: Let ert-support.el work for subdirectories |
Date: |
Sun, 17 Oct 2021 15:48:15 -0400 (EDT) |
branch: elpa-admin
commit ec13cc2946c9b23acbe0f2552fcefe6786bdc47b
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Let ert-support.el work for subdirectories
* admin/ert-support.el (all): Use `expand-file-name'.
(ert-support-test-find-tests): Add autoload file. Return absolute
file names. Do not return "." and ".." from subdirectories.
(ert-support-load-tests): Let-bind `force-load-messages'.
---
admin/ert-support.el | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/admin/ert-support.el b/admin/ert-support.el
index 93d1af8..a0ff9ab 100644
--- a/admin/ert-support.el
+++ b/admin/ert-support.el
@@ -1,6 +1,6 @@
;; The contents of this file are subject to the GPL License, Version 3.0.
-;; Copyright (C) 2016, Free Software Foundation, Inc.
+;; Copyright (C) 2016-2017, 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
@@ -18,37 +18,38 @@
(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))
+ `(("local-elpa"
+ . ,(expand-file-name "archive/packages" top-directory)))
+ 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)))))
+ (append
+ `(,(expand-file-name
+ (concat (symbol-name package) "-autoloads.el") package-directory))
+ (or
+ (directory-files package-directory t ".*-test.el$")
+ (directory-files package-directory t ".*-tests.el$")
+ (let ((dir-test (expand-file-name "test" package-directory)))
+ (when (file-directory-p dir-test)
+ (directory-files dir-test t directory-files-no-dot-files-regexp)))
+ (let ((dir-tests (expand-file-name "tests" package-directory)))
+ (when (file-directory-p dir-tests)
+ (directory-files dir-tests t directory-files-no-dot-files-regexp))))))
(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)))
+ (lambda (file)
+ (let ((force-load-messages t))
+ (load-file 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) "/")
+ (expand-file-name (concat "packages/" (symbol-name package)) top-directory)
package)
(ert-run-tests-batch-and-exit t))
- [nongnu] elpa-admin dfa5808 053/439: Rework archive-contents.el to handle new packages/ structure., (continued)
- [nongnu] elpa-admin dfa5808 053/439: Rework archive-contents.el to handle new packages/ structure., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin da7456c 065/439: write README in markdown, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7ce78d5 071/439: Note that 'autogen.sh' should be run to generate 'configure' and 'Makefile.in' (see #11), Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a745b29 076/439: * admin/archive-contents.el: Create web pages., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 1daf0bb 085/439: Merge branch 'master' of github.com:rocky/emacs-loc-changes, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e71d997 087/439: Merge remote-tracking branch 'repo.or.cz/elpa', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin cd01c51 080/439: Remove the angle brackets, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 30c8a11 248/439: Merge commit '5f47b1f64cad8a06e945e2a1287b986a3676554d', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 299da86 255/439: Package pages improvements, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5067b05 258/439: Change to package directory before checking .elpaignore exclusions., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin ec13cc2 260/439: Let ert-support.el work for subdirectories,
Philip Kaludercic <=
- [nongnu] elpa-admin 8ee4770 264/439: [admin int] Add abstraction: archive--form-from-file-contents, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin ae66216 267/439: [admin int] Replace one-armed-‘if’ w/ either ‘when’ or ‘and’., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a23a8b8 271/439: Merge branch 'scratch/hook-helpers', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 334aa51 273/439: Merge commit 'a1130df3ada34e76675324a8c25823b420b20239', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin cb72492 279/439: Merge branch 'ebdb-bits', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c60a3bb 280/439: Merge branch 'scratch/which-key', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8154769 282/439: * copyright_exceptions: Update for new uni-confusables/gen-confusables.el, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 280353e 287/439: Merge commit 'cb905bdc728fb3b5f9fdff8836d71b62bd717eab' from mmm-mode, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin aa346f0 290/439: * GNUmakefile (org-fetch): Use https and stick to wget, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 84f67ae 294/439: * admin/archive-contents.el (archive--insert-repolinks): Fix last change, Philip Kaludercic, 2021/10/17