[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b27c7f3: Further adaptions for shadowfile-tests.el
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master b27c7f3: Further adaptions for shadowfile-tests.el |
Date: |
Thu, 3 Oct 2019 04:44:11 -0400 (EDT) |
branch: master
commit b27c7f3e6083ee8b5d13c2e2103ee6391f2d331f
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Further adaptions for shadowfile-tests.el
* test/lisp/shadowfile-tests.el: Change some traces.
(shadow-test-remote-temporary-file-directory): Adapt also remote
home directory.
(shadow--tests-cleanup): Cleanup Tramp.
---
test/lisp/shadowfile-tests.el | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el
index c60767c..4d5dc21 100644
--- a/test/lisp/shadowfile-tests.el
+++ b/test/lisp/shadowfile-tests.el
@@ -56,16 +56,17 @@
'tramp-default-host-alist
`("\\`mock\\'" nil ,(system-name)))
;; Emacs' Makefile sets $HOME to a nonexistent value. Needed in
- ;; batch mode only, therefore. It cannot be
+ ;; batch mode only, therefore. `shadow-homedir' cannot be
;; `temporary-directory', because the tests with "~" would fail.
(unless (and (null noninteractive) (file-directory-p "~/"))
- (setenv "HOME" invocation-directory))
+ (setenv "HOME" (file-name-unquote temporary-file-directory))
+ (setq shadow-homedir invocation-directory)
+ (add-to-list
+ 'tramp-connection-properties
+ `(,(file-remote-p "/mock::%s") "~" ,invocation-directory)))
(format "/mock::%s" temporary-file-directory)))
"Temporary directory for Tramp tests.")
-(message
- "%s %s" temporary-file-directory shadow-test-remote-temporary-file-directory)
-
(setq password-cache-expiry nil
shadow-debug (getenv "EMACS_HYDRA_CI")
tramp-verbose 0
@@ -76,11 +77,6 @@
(ignore-errors
(file-truename shadow-test-remote-temporary-file-directory)))
-(when shadow-debug
- (message
- "%s %s"
- temporary-file-directory shadow-test-remote-temporary-file-directory))
-
;; This should happen on hydra only.
(when (getenv "EMACS_HYDRA_CI")
(add-to-list 'tramp-remote-path 'tramp-own-remote-path))
@@ -95,6 +91,9 @@
(defun shadow--tests-cleanup ()
"Reset all `shadowfile' internals."
+ ;; Cleanup Tramp.
+ (tramp-cleanup-connection
+ (tramp-dissect-file-name shadow-test-remote-temporary-file-directory) t t)
;; Delete auto-saved files.
(with-current-buffer (find-file-noselect shadow-info-file 'nowarn)
(ignore-errors (delete-file (make-auto-save-file-name)))
@@ -740,6 +739,12 @@ guaranteed by the originator of a cluster definition."
;; Cleanup & initialize.
(shadow--tests-cleanup)
(shadow-initialize)
+ (when shadow-debug
+ (message
+ "%s %s %s %s %s"
+ temporary-file-directory
+ shadow-test-remote-temporary-file-directory
+ shadow-homedir shadow-info-file shadow-todo-file))
;; Define clusters.
(setq cluster1 "cluster1"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master b27c7f3: Further adaptions for shadowfile-tests.el,
Michael Albinus <=