aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hackney2013-08-13 20:56:58 -0400
committerStefan Monnier2013-08-13 20:56:58 -0400
commit281c7202ccf811154efa219d69d1aaababbd7501 (patch)
treecd8ad9e1330fc1f55d54b7439eb096c4bef4863a
parent2d065031e4f2010b41e64fed1d9c7f9a4b3e5091 (diff)
downloademacs-281c7202ccf811154efa219d69d1aaababbd7501.tar.gz
emacs-281c7202ccf811154efa219d69d1aaababbd7501.zip
* package-test.el: Remove tar-package-building functions. Tar file
used for testing is included in the repository. (package-test-install-texinfo, package-test-cleanup-built-files): Remove.
-rw-r--r--test/ChangeLog7
-rwxr-xr-xtest/automated/package-test.el38
2 files changed, 7 insertions, 38 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 1d38f2dd429..5f3006ec7bf 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,10 @@
12013-08-14 Daniel Hackney <dan@haxney.org>
2
3 * package-test.el: Remove tar-package-building functions. Tar file
4 used for testing is included in the repository.
5 (package-test-install-texinfo, package-test-cleanup-built-files):
6 Remove.
7
12013-08-13 Fabián Ezequiel Gallina <fgallina@gnu.org> 82013-08-13 Fabián Ezequiel Gallina <fgallina@gnu.org>
2 9
3 * automated/python-tests.el (python-imenu-create-index-4) 10 * automated/python-tests.el (python-imenu-create-index-4)
diff --git a/test/automated/package-test.el b/test/automated/package-test.el
index a5f0ebb1f94..799009063e1 100755
--- a/test/automated/package-test.el
+++ b/test/automated/package-test.el
@@ -85,9 +85,6 @@
85 (expand-file-name "archive-contents" package-test-data-dir) 85 (expand-file-name "archive-contents" package-test-data-dir)
86 "Path to a static copy of \"archive-contents\".") 86 "Path to a static copy of \"archive-contents\".")
87 87
88(defvar package-test-built-file-suffixes '(".tar" "/dir" "/*.info")
89 "Remove these files when cleaning up a built package.")
90
91(cl-defmacro with-package-test ((&optional &key file 88(cl-defmacro with-package-test ((&optional &key file
92 basedir 89 basedir
93 install 90 install
@@ -142,33 +139,6 @@
142 (let ((help-xref-following t)) 139 (let ((help-xref-following t))
143 ,@body))) 140 ,@body)))
144 141
145(autoload 'makeinfo-buffer "makeinfo")
146(defvar compilation-in-progress)
147
148(defun package-test-install-texinfo (file)
149 "Install from texinfo FILE.
150
151FILE should be a .texinfo file relative to the current
152`default-directory'"
153 (require 'info)
154 (let* ((full-file (expand-file-name file))
155 (info-file (replace-regexp-in-string "\\.texi\\'" ".info" full-file))
156 (old-info-defn (symbol-function 'Info-revert-find-node)))
157 (require 'info)
158 (setf (symbol-function 'Info-revert-find-node) #'ignore)
159 (with-current-buffer (find-file-literally full-file)
160 (unwind-protect
161 (progn
162 (makeinfo-buffer)
163 ;; Give `makeinfo-buffer' a chance to finish
164 (while compilation-in-progress
165 (sit-for 0.1))
166 (call-process "ginstall-info" nil nil nil
167 (format "--info-dir=%s" default-directory)
168 (format "%s" info-file)))
169 (kill-buffer)
170 (setf (symbol-function 'Info-revert-find-node) old-info-defn)))))
171
172(defun package-test-strip-version (dir) 142(defun package-test-strip-version (dir)
173 (replace-regexp-in-string "-pkg\\.el\\'" "" (package--description-file dir))) 143 (replace-regexp-in-string "-pkg\\.el\\'" "" (package--description-file dir)))
174 144
@@ -178,14 +148,6 @@ FILE should be a .texinfo file relative to the current
178 '(lambda (item) (file-expand-wildcards (concat base item))) 148 '(lambda (item) (file-expand-wildcards (concat base item)))
179 suffix-list)) 149 suffix-list))
180 150
181(defun package-test-cleanup-built-files (dir)
182 "Remove files which were the result of creating a tar archive.
183
184DIR is the base name of the package directory, without the trailing slash"
185 (let* ((pkg-dirname (file-name-nondirectory dir)))
186 (dolist (file (package-test-suffix-matches dir package-test-built-file-suffixes))
187 (delete-file file))))
188
189(defvar tar-parse-info) 151(defvar tar-parse-info)
190(declare-function tar-header-name "tar-mode" (cl-x) t) ; defstruct 152(declare-function tar-header-name "tar-mode" (cl-x) t) ; defstruct
191 153