(require 'cl-lib)
(require 'dired)
(require 'dired-aux)
-(require 'ert)
+(require 'tramp)
(require 'ert-x)
(require 'seq) ; For `seq-random-elt', autoloaded since Emacs 28.1
(require 'tar-mode)
(require 'trace)
-(require 'tramp)
(require 'vc)
(require 'vc-bzr)
(require 'vc-git)
`ert-resource-directory'."
`(expand-file-name ,file (ert-resource-directory)))))
+;; `ert-remote-temporary-file-directory' was introduced in Emacs 29.1.
+(unless (boundp 'ert-remote-temporary-file-directory)
+ (eval-and-compile
+ ;; There is no default value on w32 systems, which could work out
+ ;; of the box.
+ (defconst ert-remote-temporary-file-directory
+ (cond
+ ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY"))
+ ((eq system-type 'windows-nt) null-device)
+ (t (add-to-list
+ 'tramp-methods
+ '("mock"
+ (tramp-login-program "sh")
+ (tramp-login-args (("-i")))
+ (tramp-remote-shell "/bin/sh")
+ (tramp-remote-shell-args ("-c"))
+ (tramp-connection-timeout 10)))
+ (add-to-list
+ 'tramp-default-host-alist
+ `("\\`mock\\'" nil ,(system-name)))
+ ;; Emacs's Makefile sets $HOME to a nonexistent value.
+ ;; Needed in batch mode only, therefore.
+ (unless (and (null noninteractive) (file-directory-p "~/"))
+ (setenv "HOME" temporary-file-directory))
+ (format "/mock::%s" temporary-file-directory)))
+ "Temporary directory for remote file tests.")))
+
;; Beautify batch mode.
(when noninteractive
;; Suppress nasty messages.
'(fset 'tramp-gvfs-handler-askquestion
(lambda (_message _choices) '(t nil 0)))))
-;; There is no default value on w32 systems, which could work out of the box.
-(defconst tramp-test-temporary-file-directory
- (cond
- ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY"))
- ((eq system-type 'windows-nt) null-device)
- (t (add-to-list
- 'tramp-methods
- '("mock"
- (tramp-login-program "sh")
- (tramp-login-args (("-i")))
- (tramp-remote-shell "/bin/sh")
- (tramp-remote-shell-args ("-c"))
- (tramp-connection-timeout 10)))
- (add-to-list
- 'tramp-default-host-alist
- `("\\`mock\\'" nil ,(system-name)))
- ;; Emacs's Makefile sets $HOME to a nonexistent value. Needed
- ;; in batch mode only, therefore.
- (unless (and (null noninteractive) (file-directory-p "~/"))
- (setenv "HOME" temporary-file-directory))
- (format "/mock::%s" temporary-file-directory)))
- "Temporary directory for Tramp tests.")
-
(defconst tramp-test-vec
- (and (file-remote-p tramp-test-temporary-file-directory)
- (tramp-dissect-file-name tramp-test-temporary-file-directory))
+ (and (file-remote-p ert-remote-temporary-file-directory)
+ (tramp-dissect-file-name ert-remote-temporary-file-directory))
"The used `tramp-file-name' structure.")
(setq auth-source-save-behavior nil
(cons
t (ignore-errors
(and
- (file-remote-p tramp-test-temporary-file-directory)
- (file-directory-p tramp-test-temporary-file-directory)
- (file-writable-p tramp-test-temporary-file-directory))))))
+ (file-remote-p ert-remote-temporary-file-directory)
+ (file-directory-p ert-remote-temporary-file-directory)
+ (file-writable-p ert-remote-temporary-file-directory))))))
(when (cdr tramp--test-enabled-checked)
;; Cleanup connection.
(if quoted #'tramp-compat-file-name-quote #'identity)
(expand-file-name
(make-temp-name "tramp-test")
- (if local temporary-file-directory tramp-test-temporary-file-directory))))
+ (if local temporary-file-directory ert-remote-temporary-file-directory))))
;; Method "smb" supports `make-symbolic-link' only if the remote host
;; has CIFS capabilities. tramp-adb.el, tramp-gvfs.el, tramp-rclone.el
"Test availability of Tramp functions."
:expected-result (if (tramp--test-enabled) :passed :failed)
(tramp--test-message
- "Remote directory: `%s'" tramp-test-temporary-file-directory)
+ "Remote directory: `%s'" ert-remote-temporary-file-directory)
(should (ignore-errors
(and
- (file-remote-p tramp-test-temporary-file-directory)
- (file-directory-p tramp-test-temporary-file-directory)
- (file-writable-p tramp-test-temporary-file-directory)))))
+ (file-remote-p ert-remote-temporary-file-directory)
+ (file-directory-p ert-remote-temporary-file-directory)
+ (file-writable-p ert-remote-temporary-file-directory)))))
(ert-deftest tramp-test01-file-name-syntax ()
"Check remote file name syntax."
(find-file
(format
"%s|%s:foo:"
- (substring (file-remote-p tramp-test-temporary-file-directory) 0 -1)
+ (substring (file-remote-p ert-remote-temporary-file-directory) 0 -1)
m))
:type 'user-error))))
(should-error
(tramp-smb-get-localname
(tramp-dissect-file-name
- (expand-file-name file tramp-test-temporary-file-directory)))
+ (expand-file-name file ert-remote-temporary-file-directory)))
:type 'file-error))))
(ert-deftest tramp-test04-substitute-in-file-name ()
(string-equal
(let ((default-directory
(concat
- (file-remote-p tramp-test-temporary-file-directory) "/path")))
+ (file-remote-p ert-remote-temporary-file-directory) "/path")))
(expand-file-name ".." "./"))
- (concat (file-remote-p tramp-test-temporary-file-directory) "/"))))
+ (concat (file-remote-p ert-remote-temporary-file-directory) "/"))))
(ert-deftest tramp-test05-expand-file-name-top ()
"Check `expand-file-name'."
(skip-unless (tramp--test-enabled))
(skip-unless (not (tramp--test-ange-ftp-p)))
- (let ((dir (concat (file-remote-p tramp-test-temporary-file-directory) "/")))
+ (let ((dir (concat (file-remote-p ert-remote-temporary-file-directory) "/")))
(dolist (local '("." ".."))
(should (string-equal (expand-file-name local dir) dir))
(should (string-equal (expand-file-name (concat dir local)) dir)))))
;; We must clear `tramp-default-method'. On hydra, it is "ftp",
;; which ruins the tests.
(let ((tramp-default-method
- (file-remote-p tramp-test-temporary-file-directory 'method))
- (host (file-remote-p tramp-test-temporary-file-directory 'host)))
+ (file-remote-p ert-remote-temporary-file-directory 'method))
+ (host (file-remote-p ert-remote-temporary-file-directory 'host)))
(dolist
(file
`(,(format "/%s::" tramp-default-method)
(skip-unless (tramp--test-emacs29-p))
;; We must refill the cache. `file-truename' does it.
- (file-truename tramp-test-temporary-file-directory)
- (let* ((remote-host (file-remote-p tramp-test-temporary-file-directory))
+ (file-truename ert-remote-temporary-file-directory)
+ (let* ((remote-host (file-remote-p ert-remote-temporary-file-directory))
(remote-host-nohop
(tramp-make-tramp-file-name (tramp-dissect-file-name remote-host)))
;; Not all methods can expand "~".
(insert-file-contents tmp-name2)
(should (string-equal (buffer-string) "foo")))
;; Check also that a file transfer with compression works.
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
(tramp-copy-size-limit 4)
(tramp-inline-compress-start-size 2))
(delete-file tmp-name2)
;; The function was introduced in Emacs 28.1.
(skip-unless (boundp 'tar-goto-file))
- (let* ((default-directory tramp-test-temporary-file-directory)
+ (let* ((default-directory ert-remote-temporary-file-directory)
(archive (ert-resource-file "foo.tar.gz"))
(tmp-file (expand-file-name (file-name-nondirectory archive)))
(require-final-newline t)
(ert-deftest tramp-test17-dired-with-wildcards ()
"Check `dired' with wildcards."
;; `separate' syntax and IPv6 host name syntax do not work.
- (skip-unless (not (string-match-p "\\[" tramp-test-temporary-file-directory)))
+ (skip-unless (not (string-match-p "\\[" ert-remote-temporary-file-directory)))
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
(skip-unless (not (tramp--test-rsync-p)))
(expand-file-name (tramp--test-make-temp-name nil quoted)))
(tmp-name3 (expand-file-name "foo" tmp-name1))
(tmp-name4 (expand-file-name "bar" tmp-name2))
- (tramp-test-temporary-file-directory
+ (ert-remote-temporary-file-directory
(funcall
(if quoted #'tramp-compat-file-name-quote #'identity)
- tramp-test-temporary-file-directory))
+ ert-remote-temporary-file-directory))
buffer)
(unwind-protect
(progn
(setq buffer
(dired-noselect
(expand-file-name
- "tramp-test*" tramp-test-temporary-file-directory)))
+ "tramp-test*" ert-remote-temporary-file-directory)))
(goto-char (point-min))
(should
(re-search-forward
(regexp-quote
(file-relative-name
- tmp-name1 tramp-test-temporary-file-directory))))
+ tmp-name1 ert-remote-temporary-file-directory))))
(goto-char (point-min))
(should
(re-search-forward
(regexp-quote
(file-relative-name
- tmp-name2 tramp-test-temporary-file-directory)))))
+ tmp-name2 ert-remote-temporary-file-directory)))))
(kill-buffer buffer)
;; Check for expanded directory and file names.
(setq buffer
(dired-noselect
(expand-file-name
- "tramp-test*/*" tramp-test-temporary-file-directory)))
+ "tramp-test*/*" ert-remote-temporary-file-directory)))
(goto-char (point-min))
(should
(re-search-forward
(regexp-quote
(file-relative-name
- tmp-name3 tramp-test-temporary-file-directory))))
+ tmp-name3 ert-remote-temporary-file-directory))))
(goto-char (point-min))
(should
(re-search-forward
(regexp-quote
(file-relative-name
tmp-name4
- tramp-test-temporary-file-directory)))))
+ ert-remote-temporary-file-directory)))))
(kill-buffer buffer)
;; Check for special characters.
(setq buffer
(dired-noselect
(expand-file-name
- "tramp-test*/*" tramp-test-temporary-file-directory)))
+ "tramp-test*/*" ert-remote-temporary-file-directory)))
(goto-char (point-min))
(should
(re-search-forward
(regexp-quote
(file-relative-name
- tmp-name3 tramp-test-temporary-file-directory))))
+ tmp-name3 ert-remote-temporary-file-directory))))
(goto-char (point-min))
(should
(re-search-forward
(regexp-quote
(file-relative-name
tmp-name4
- tramp-test-temporary-file-directory)))))
+ ert-remote-temporary-file-directory)))))
(kill-buffer buffer))
;; Cleanup.
;; We must use `file-truename' for the temporary directory,
;; because it could be located on a symlinked directory. This
;; would let the test fail.
- (let* ((tramp-test-temporary-file-directory
- (file-truename tramp-test-temporary-file-directory))
+ (let* ((ert-remote-temporary-file-directory
+ (file-truename ert-remote-temporary-file-directory))
(tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (tramp--test-make-temp-name nil quoted))
;; File name with "//".
(and test-file-ownership-preserved-p
(zerop (logand
#o1000
- (file-modes tramp-test-temporary-file-directory))))
+ (file-modes ert-remote-temporary-file-directory))))
(write-region "foo" nil tmp-name1)
(setq test-file-ownership-preserved-p
(= (file-attribute-group-id (file-attributes tmp-name1))
;; Check, that "//" in symlinks are handled properly.
(with-temp-buffer
- (let ((default-directory tramp-test-temporary-file-directory))
+ (let ((default-directory ert-remote-temporary-file-directory))
(shell-command
(format
"ln -s %s %s"
;; We must use `file-truename' for the temporary directory,
;; because it could be located on a symlinked directory. This
;; would let the test fail.
- (let* ((tramp-test-temporary-file-directory
- (file-truename tramp-test-temporary-file-directory))
+ (let* ((ert-remote-temporary-file-directory
+ (file-truename ert-remote-temporary-file-directory))
(tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (tramp--test-make-temp-name nil quoted))
(tmp-name3 (tramp--test-make-temp-name 'local quoted))
(should (file-equal-p tmp-name1 tmp-name2))
;; Check relative symlink file name.
(delete-file tmp-name2)
- (let ((default-directory tramp-test-temporary-file-directory))
+ (let ((default-directory ert-remote-temporary-file-directory))
(make-symbolic-link (file-name-nondirectory tmp-name1) tmp-name2))
(should (file-symlink-p tmp-name2))
(should-not (string-equal tmp-name2 (file-truename tmp-name2)))
(tramp--test-ignore-make-symbolic-link-error
(make-directory tmp-name1)
(should (file-directory-p tmp-name1))
- (let* ((tramp-test-temporary-file-directory
+ (let* ((ert-remote-temporary-file-directory
(file-truename tmp-name1))
(tmp-name2 (tramp--test-make-temp-name nil quoted))
(tmp-name3 tmp-name2)
(directory-file-name
(funcall
(if quoted #'tramp-compat-file-name-quote #'identity)
- tramp-test-temporary-file-directory)))
+ ert-remote-temporary-file-directory)))
(dir2 (file-name-as-directory dir1)))
(should (string-equal (file-truename dir1) (expand-file-name dir1)))
(should (string-equal (file-truename dir2) (expand-file-name dir2)))))))
"Check that `file-acl' and `set-file-acl' work proper."
(skip-unless (tramp--test-enabled))
;; The following test checks also whether `set-file-modes' will work.
- (skip-unless (file-acl tramp-test-temporary-file-directory))
+ (skip-unless (file-acl ert-remote-temporary-file-directory))
(skip-unless (not (tramp--test-crypt-p)))
;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
"Check `file-selinux-context' and `set-file-selinux-context'."
(skip-unless (tramp--test-enabled))
(skip-unless
- (not (equal (file-selinux-context tramp-test-temporary-file-directory)
+ (not (equal (file-selinux-context ert-remote-temporary-file-directory)
'(nil nil nil nil))))
(skip-unless (not (tramp--test-crypt-p)))
(let ((default-directory temporary-file-directory))
(shell-command-to-string "id -Z"))
(let ((default-directory
- tramp-test-temporary-file-directory))
+ ert-remote-temporary-file-directory))
(shell-command-to-string "id -Z"))))
;; Two files with same SELinux context.
;; does not work on MS Windows.
(unless (memq system-type '(cygwin windows-nt))
(let ((tramp-fuse-remove-hidden-files t)
- (method (file-remote-p tramp-test-temporary-file-directory 'method))
- (host (file-remote-p tramp-test-temporary-file-directory 'host))
+ (method (file-remote-p ert-remote-temporary-file-directory 'method))
+ (host (file-remote-p ert-remote-temporary-file-directory 'host))
(orig-syntax tramp-syntax))
(when (and (stringp host) (string-match tramp-host-with-port-regexp host))
(setq host (match-string 1 host)))
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
(let* ((tmp-name (tramp--test-make-temp-name nil quoted))
(fnnd (file-name-nondirectory tmp-name))
- (default-directory tramp-test-temporary-file-directory)
+ (default-directory ert-remote-temporary-file-directory)
(buffer (get-buffer-create "*tramp-tests*"))
kill-buffer-query-functions)
(unwind-protect
(skip-unless (tramp--test-supports-processes-p))
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
(tmp-name (tramp--test-make-temp-name nil quoted))
kill-buffer-query-functions command proc)
:tags (append '(:expensive-test :tramp-asynchronous-processes)
(and ,unstable '(:unstable)))
(skip-unless (tramp--test-enabled))
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
(ert-test (ert-get-test ',test))
(tramp-connection-properties
(cons '(nil "direct-async-process" t)
(cl-letf (((symbol-function #'tramp--test-enabled) #'tramp--test-always)
((symbol-function #'internal-default-process-sentinel)
#'ignore))
- (file-truename tramp-test-temporary-file-directory)
+ (file-truename ert-remote-temporary-file-directory)
(funcall (ert-test-body ert-test)))))))
(tramp--test--deftest-direct-async-process tramp-test29-start-file-process
(skip-unless (tramp--test-emacs27-p))
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
(tmp-name (tramp--test-make-temp-name nil quoted))
kill-buffer-query-functions command proc)
(with-no-warnings (should-not (make-process)))
;; We must use `file-truename' for the temporary directory, in
;; order to establish the connection prior running an asynchronous
;; process.
- (let ((default-directory (file-truename tramp-test-temporary-file-directory))
+ (let ((default-directory (file-truename ert-remote-temporary-file-directory))
(delete-exited-processes t)
kill-buffer-query-functions command proc)
(unwind-protect
;; We must use `file-truename' for the temporary directory, in
;; order to establish the connection prior running an asynchronous
;; process.
- (let ((default-directory (file-truename tramp-test-temporary-file-directory))
+ (let ((default-directory (file-truename ert-remote-temporary-file-directory))
(delete-exited-processes t)
kill-buffer-query-functions command proc)
;; `list-system-processes' is supported since Emacs 29.1.
(skip-unless (tramp--test-emacs29-p))
- (let ((default-directory tramp-test-temporary-file-directory))
+ (let ((default-directory ert-remote-temporary-file-directory))
(skip-unless (consp (list-system-processes)))
(should (not (equal (list-system-processes)
(let ((default-directory temporary-file-directory))
;; We must use `file-truename' for the temporary directory, in
;; order to establish the connection prior running an asynchronous
;; process.
- (let ((default-directory (file-truename tramp-test-temporary-file-directory))
+ (let ((default-directory (file-truename ert-remote-temporary-file-directory))
(delete-exited-processes t)
kill-buffer-query-functions command proc)
(skip-unless (consp (list-system-processes)))
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
(let ((tmp-name (tramp--test-make-temp-name nil quoted))
- (default-directory tramp-test-temporary-file-directory)
+ (default-directory ert-remote-temporary-file-directory)
;; Suppress nasty messages.
(inhibit-message t)
kill-buffer-query-functions)
(when (and (tramp--test-asynchronous-processes-p)
(tramp--test-sh-p) (tramp--test-emacs27-p))
(let* ((async-shell-command-width 1024)
- (default-directory tramp-test-temporary-file-directory)
+ (default-directory ert-remote-temporary-file-directory)
(cols (ignore-errors
(read (tramp--test-shell-command-to-string-asynchronously
"tput cols")))))
;; We check both the local and remote case, in order to guarantee
;; that they behave similar.
(dolist (default-directory
- `(,temporary-file-directory ,tramp-test-temporary-file-directory))
+ `(,temporary-file-directory ,ert-remote-temporary-file-directory))
;; These are the possible values of `shell-command-dont-erase-buffer'.
;; `random' is taken as non-nil value without special meaning.
(dolist (shell-command-dont-erase-buffer
(and (tramp--test-asynchronous-processes-p)
'(tramp--test-shell-command-to-string-asynchronously))))
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
(shell-file-name "/bin/sh")
(envvar (concat "VAR_" (upcase (md5 (current-time-string)))))
kill-buffer-query-functions)
(skip-unless (not (tramp--test-crypt-p)))
;; We force a reconnect, in order to have a clean environment.
- (dolist (dir `(,tramp-test-temporary-file-directory
+ (dolist (dir `(,ert-remote-temporary-file-directory
"/mock:localhost#11111:" "/mock:localhost#22222:"))
(tramp-cleanup-connection
(tramp-dissect-file-name dir) 'keep-debug 'keep-password))
;; Since Emacs 27.1.
(skip-unless (macrop 'with-connection-local-variables))
- (let* ((default-directory tramp-test-temporary-file-directory)
+ (let* ((default-directory ert-remote-temporary-file-directory)
(tmp-name1 (tramp--test-make-temp-name))
(tmp-name2 (expand-file-name "foo" tmp-name1))
(enable-local-variables :all)
(when (tramp--test-adb-p)
(skip-unless (tramp--test-emacs27-p)))
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
explicit-shell-file-name kill-buffer-query-functions
connection-local-profile-alist connection-local-criteria-alist)
(unwind-protect
(skip-unless (fboundp 'exec-path))
(let ((tmp-name (tramp--test-make-temp-name))
- (default-directory tramp-test-temporary-file-directory))
+ (default-directory ert-remote-temporary-file-directory))
(unwind-protect
(progn
(should (consp (with-no-warnings (exec-path))))
(skip-unless (fboundp 'exec-path))
(let* ((tmp-name (tramp--test-make-temp-name))
- (default-directory tramp-test-temporary-file-directory)
+ (default-directory ert-remote-temporary-file-directory)
(orig-exec-path (with-no-warnings (exec-path)))
(tramp-remote-path tramp-remote-path)
(orig-tramp-remote-path tramp-remote-path)
;; order to establish the connection prior running an asynchronous
;; process.
(let* ((default-directory
- (file-truename tramp-test-temporary-file-directory))
+ (file-truename ert-remote-temporary-file-directory))
(tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (expand-file-name "foo" tmp-name1))
(tramp-remote-process-environment tramp-remote-process-environment)
(if quoted #'tramp-compat-file-name-quote #'identity)
(expand-file-name
(format "#%s#" (file-name-nondirectory tmp-name1))
- tramp-test-temporary-file-directory))))))
+ ert-remote-temporary-file-directory))))))
;; Use default `tramp-auto-save-directory' mechanism.
;; Ange-FTP doesn't care.
(if quoted #'tramp-compat-file-name-quote #'identity)
(expand-file-name
(format "%s~" (file-name-nondirectory tmp-name1))
- tramp-test-temporary-file-directory)))))))
+ ert-remote-temporary-file-directory)))))))
(unwind-protect
;; Map `backup-directory-alist'.
(skip-unless (tramp--test-enabled))
(skip-unless (not (tramp--test-ange-ftp-p)))
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
tmp-file)
;; The remote host shall know a temporary file directory.
(should (stringp (temporary-file-directory)))
(defun tramp--test-adb-p ()
"Check, whether the remote host runs Android.
This requires restrictions of file name syntax."
- (tramp-adb-file-name-p tramp-test-temporary-file-directory))
+ (tramp-adb-file-name-p ert-remote-temporary-file-directory))
(defun tramp--test-ange-ftp-p ()
"Check, whether Ange-FTP is used."
(defun tramp--test-crypt-p ()
"Check, whether the remote directory is crypted."
- (tramp-crypt-file-name-p tramp-test-temporary-file-directory))
+ (tramp-crypt-file-name-p ert-remote-temporary-file-directory))
(defun tramp--test-docker-p ()
"Check, whether the docker method is used.
This does not support some special file names."
(string-equal
- "docker" (file-remote-p tramp-test-temporary-file-directory 'method)))
+ "docker" (file-remote-p ert-remote-temporary-file-directory 'method)))
(defun tramp--test-expensive-test-p ()
"Whether expensive tests are run.
This does not support globbing characters in file names (yet)."
;; Globbing characters are ??, ?* and ?\[.
(string-match-p
- "ftp$" (file-remote-p tramp-test-temporary-file-directory 'method)))
+ "ftp$" (file-remote-p ert-remote-temporary-file-directory 'method)))
(defun tramp--test-fuse-p ()
"Check, whether an FUSE file system isused."
(defun tramp--test-gdrive-p ()
"Check, whether the gdrive method is used."
(string-equal
- "gdrive" (file-remote-p tramp-test-temporary-file-directory 'method)))
+ "gdrive" (file-remote-p ert-remote-temporary-file-directory 'method)))
(defun tramp--test-gvfs-p (&optional method)
"Check, whether the remote host runs a GVFS based method.
This requires restrictions of file name syntax.
If optional METHOD is given, it is checked first."
(or (member method tramp-gvfs-methods)
- (tramp-gvfs-file-name-p tramp-test-temporary-file-directory)))
+ (tramp-gvfs-file-name-p ert-remote-temporary-file-directory)))
(defun tramp--test-hpux-p ()
"Check, whether the remote host runs HP-UX.
Several special characters do not work properly there."
;; We must refill the cache. `file-truename' does it.
- (file-truename tramp-test-temporary-file-directory)
+ (file-truename ert-remote-temporary-file-directory)
(ignore-errors (tramp-check-remote-uname tramp-test-vec "^HP-UX")))
(defun tramp--test-ksh-p ()
ksh93 makes some strange conversions of non-latin characters into
a $'' syntax."
;; We must refill the cache. `file-truename' does it.
- (file-truename tramp-test-temporary-file-directory)
+ (file-truename ert-remote-temporary-file-directory)
(string-match-p
"ksh$" (tramp-get-connection-property tramp-test-vec "remote-shell" "")))
(defun tramp--test-macos-p ()
"Check, whether the remote host runs macOS."
;; We must refill the cache. `file-truename' does it.
- (file-truename tramp-test-temporary-file-directory)
+ (file-truename ert-remote-temporary-file-directory)
(ignore-errors (tramp-check-remote-uname tramp-test-vec "Darwin")))
(defun tramp--test-mock-p ()
"Check, whether the mock method is used.
This does not support external Emacs calls."
(string-equal
- "mock" (file-remote-p tramp-test-temporary-file-directory 'method)))
+ "mock" (file-remote-p ert-remote-temporary-file-directory 'method)))
(defun tramp--test-out-of-band-p ()
"Check, whether an out-of-band method is used."
(defun tramp--test-rclone-p ()
"Check, whether the remote host is offered by rclone.
This requires restrictions of file name syntax."
- (tramp-rclone-file-name-p tramp-test-temporary-file-directory))
+ (tramp-rclone-file-name-p ert-remote-temporary-file-directory))
(defun tramp--test-rsync-p ()
"Check, whether the rsync method is used.
This does not support special file names."
(string-equal
- "rsync" (file-remote-p tramp-test-temporary-file-directory 'method)))
+ "rsync" (file-remote-p ert-remote-temporary-file-directory 'method)))
(defun tramp--test-sh-p ()
"Check, whether the remote host runs a based method from tramp-sh.el."
;; We must refill the cache. `insert-directory' does it.
;; This fails for tramp-crypt.el, so we ignore that.
(ignore-errors
- (insert-directory tramp-test-temporary-file-directory "-al"))
+ (insert-directory ert-remote-temporary-file-directory "-al"))
(not (tramp-get-connection-property tramp-test-vec "ls--dired" nil)))))
(defun tramp--test-share-p ()
(and (tramp--test-gvfs-p)
(string-match-p
"^\\(afp\\|davs?\\|smb\\)$"
- (file-remote-p tramp-test-temporary-file-directory 'method))))
+ (file-remote-p ert-remote-temporary-file-directory 'method))))
(defun tramp--test-sshfs-p ()
"Check, whether the remote host is offered by sshfs.
This requires restrictions of file name syntax."
- (tramp-sshfs-file-name-p tramp-test-temporary-file-directory))
+ (tramp-sshfs-file-name-p ert-remote-temporary-file-directory))
(defun tramp--test-sudoedit-p ()
"Check, whether the sudoedit method is used."
- (tramp-sudoedit-file-name-p tramp-test-temporary-file-directory))
+ (tramp-sudoedit-file-name-p ert-remote-temporary-file-directory))
(defun tramp--test-telnet-p ()
"Check, whether the telnet method is used.
This does not support special file names."
(string-equal
- "telnet" (file-remote-p tramp-test-temporary-file-directory 'method)))
+ "telnet" (file-remote-p ert-remote-temporary-file-directory 'method)))
(defun tramp--test-windows-nt-p ()
"Check, whether the locale host runs MS Windows."
(defun tramp--test-smb-p ()
"Check, whether the locale or remote host runs MS Windows.
This requires restrictions of file name syntax."
- (tramp-smb-file-name-p tramp-test-temporary-file-directory))
+ (tramp-smb-file-name-p ert-remote-temporary-file-directory))
(defun tramp--test-supports-processes-p ()
"Return whether the method under test supports external processes."
(and
(tramp--test-gvfs-p)
(string-match-p
- "ftp" (file-remote-p tramp-test-temporary-file-directory 'method)))))
+ "ftp" (file-remote-p ert-remote-temporary-file-directory 'method)))))
(defun tramp--test-check-files (&rest files)
"Run a simple but comprehensive test over every file in FILES."
;; We must use `file-truename' for the temporary directory,
;; because it could be located on a symlinked directory. This
;; would let the test fail.
- (let* ((tramp-test-temporary-file-directory
- (file-truename tramp-test-temporary-file-directory))
+ (let* ((ert-remote-temporary-file-directory
+ (file-truename ert-remote-temporary-file-directory))
(tramp-fuse-remove-hidden-files t)
(tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (tramp--test-make-temp-name 'local quoted))
(dolist (elt files)
(let ((envvar (concat "VAR_" (upcase (md5 elt))))
(elt (encode-coding-string elt coding-system-for-read))
- (default-directory tramp-test-temporary-file-directory)
+ (default-directory ert-remote-temporary-file-directory)
(process-environment process-environment))
(setenv envvar elt)
;; The value of PS1 could confuse Tramp's detection
(skip-unless (tramp--test-sh-p))
(skip-unless (not (tramp--test-rsync-p)))
;; We cannot use `tramp-test-vec', because this fails during compilation.
- (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
+ (with-parsed-tramp-file-name ert-remote-temporary-file-directory nil
(skip-unless (tramp-get-remote-stat v)))
(let ((tramp-connection-properties
(append
- `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ `((,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"perl" nil))
tramp-connection-properties)))
(tramp--test-special-characters)))
(skip-unless (tramp--test-sh-p))
(skip-unless (not (tramp--test-rsync-p)))
;; We cannot use `tramp-test-vec', because this fails during compilation.
- (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
+ (with-parsed-tramp-file-name ert-remote-temporary-file-directory nil
(skip-unless (tramp-get-remote-perl v)))
(let ((tramp-connection-properties
(append
- `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ `((,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"stat" nil)
;; See `tramp-sh-handle-file-truename'.
- (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ (,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"readlink" nil))
tramp-connection-properties)))
(tramp--test-special-characters)))
(let ((tramp-connection-properties
(append
- `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ `((,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"perl" nil)
- (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ (,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"stat" nil)
;; See `tramp-sh-handle-file-truename'.
- (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ (,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"readlink" nil))
tramp-connection-properties)))
(tramp--test-special-characters)))
(skip-unless (not (tramp--test-ksh-p)))
(skip-unless (not (tramp--test-crypt-p)))
;; We cannot use `tramp-test-vec', because this fails during compilation.
- (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
+ (with-parsed-tramp-file-name ert-remote-temporary-file-directory nil
(skip-unless (tramp-get-remote-stat v)))
(let ((tramp-connection-properties
(append
- `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ `((,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"perl" nil))
tramp-connection-properties)))
(tramp--test-utf8)))
(skip-unless (not (tramp--test-ksh-p)))
(skip-unless (not (tramp--test-crypt-p)))
;; We cannot use `tramp-test-vec', because this fails during compilation.
- (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
+ (with-parsed-tramp-file-name ert-remote-temporary-file-directory nil
(skip-unless (tramp-get-remote-perl v)))
(let ((tramp-connection-properties
(append
- `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ `((,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"stat" nil)
;; See `tramp-sh-handle-file-truename'.
- (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ (,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"readlink" nil))
tramp-connection-properties)))
(tramp--test-utf8)))
(let ((tramp-connection-properties
(append
- `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ `((,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"perl" nil)
- (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ (,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"stat" nil)
;; See `tramp-sh-handle-file-truename'.
- (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+ (,(regexp-quote (file-remote-p ert-remote-temporary-file-directory))
"readlink" nil))
tramp-connection-properties)))
(tramp--test-utf8)))
;; `file-system-info' exists since Emacs 27.1. We don't want to see
;; compiler warnings for older Emacsen.
(when-let ((fsi (with-no-warnings
- (file-system-info tramp-test-temporary-file-directory))))
+ (file-system-info ert-remote-temporary-file-directory))))
(should (consp fsi))
(should (= (length fsi) 3))
(dotimes (i (length fsi))
;; default handler.
(skip-unless (not (tramp--test-emacs29-p)))
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
(tmp-name (tramp--test-make-temp-name)))
(write-region "foo" nil tmp-name)
(dired default-directory)
;; default handler.
(skip-unless (not (tramp--test-emacs29-p)))
- (let ((default-directory tramp-test-temporary-file-directory)
+ (let ((default-directory ert-remote-temporary-file-directory)
(tmp-name (tramp--test-make-temp-name)))
(make-directory tmp-name)
(dired default-directory)
(tramp-cleanup-connection tramp-test-vec 'keep-debug)
;; We don't want to invalidate the password.
(setq mocked-input `(,(copy-sequence pass)))
- (should (file-exists-p tramp-test-temporary-file-directory))
+ (should (file-exists-p ert-remote-temporary-file-directory))
;; Don't entering a password returns in error.
(tramp-cleanup-connection tramp-test-vec 'keep-debug)
(setq mocked-input nil)
- (should-error (file-exists-p tramp-test-temporary-file-directory))
+ (should-error (file-exists-p ert-remote-temporary-file-directory))
;; A wrong password doesn't work either.
(tramp-cleanup-connection tramp-test-vec 'keep-debug)
(setq mocked-input `(,(concat pass pass)))
- (should-error (file-exists-p tramp-test-temporary-file-directory))
+ (should-error (file-exists-p ert-remote-temporary-file-directory))
;; Reading password from auth-source works. We use the netrc
;; backend; the other backends shall behave similar.
:prefix "tramp-test" :suffix ""
:text (format
"machine %s port mock password %s"
- (file-remote-p tramp-test-temporary-file-directory 'host) pass)
+ (file-remote-p ert-remote-temporary-file-directory 'host) pass)
(let ((auth-sources `(,netrc-file)))
- (should (file-exists-p tramp-test-temporary-file-directory)))))))))
+ (should (file-exists-p ert-remote-temporary-file-directory)))))))))
;; This test is inspired by Bug#29163.
(ert-deftest tramp-test47-auto-load ()
;; Suppress method name check.
"(let ((non-essential t)) \
(message \"Tramp loaded: %%s\" (and (file-remote-p %S) t)))"
- tramp-test-temporary-file-directory)))
+ ert-remote-temporary-file-directory)))
(should
(string-match-p
"Tramp loaded: t[\n\r]+"
(dolist (code
(list
(format
- "(expand-file-name %S)" tramp-test-temporary-file-directory)
+ "(expand-file-name %S)" ert-remote-temporary-file-directory)
(format
"(let ((default-directory %S)) (expand-file-name %S))"
- tramp-test-temporary-file-directory
+ ert-remote-temporary-file-directory
temporary-file-directory)))
(should-not
(string-match-p
;;; Code:
-(require 'ert)
-(require 'shadowfile)
(require 'tramp)
-
-;; There is no default value on w32 systems, which could work out of the box.
-(defconst shadow-test-remote-temporary-file-directory
- (cond
- ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY"))
- ((eq system-type 'windows-nt) null-device)
- (t (add-to-list
- 'tramp-methods
- '("mock"
- (tramp-login-program "sh")
- (tramp-login-args (("-i")))
- (tramp-remote-shell "/bin/sh")
- (tramp-remote-shell-args ("-c"))
- (tramp-connection-timeout 10)))
- (add-to-list
- 'tramp-default-host-alist
- `("\\`mock\\'" nil ,(system-name)))
- ;; Emacs' Makefile sets $HOME to a nonexistent value. Needed in
- ;; 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" (file-name-unquote temporary-file-directory))
- (setq shadow-homedir invocation-directory)
- (add-to-list
- 'tramp-connection-properties
- `(,(file-remote-p "/mock::") "~" ,invocation-directory)))
- (format "/mock::%s" temporary-file-directory)))
- "Temporary directory for Tramp tests.")
+(require 'ert-x)
+(require 'shadowfile)
(setq auth-source-save-behavior nil
password-cache-expiry nil
tramp-verbose 0
;; On macOS, `temporary-file-directory' is a symlinked directory.
temporary-file-directory (file-truename temporary-file-directory)
- shadow-test-remote-temporary-file-directory
- (ignore-errors
- (file-truename shadow-test-remote-temporary-file-directory)))
+ ert-remote-temporary-file-directory
+ (ignore-errors (file-truename ert-remote-temporary-file-directory)))
;; This should happen on hydra only.
(when (getenv "EMACS_HYDRA_CI")
"Reset all `shadowfile' internals."
;; Cleanup Tramp.
(tramp-cleanup-connection
- (tramp-dissect-file-name shadow-test-remote-temporary-file-directory) t t)
+ (tramp-dissect-file-name ert-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)))
guaranteed by the originator of a cluster definition."
:tags '(:expensive-test)
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
(let ((text-quoting-style 'grave) ;; We inspect the *Messages* buffer!
(inhibit-message t)
(shadow-cluster-regexp (shadow-get-cluster cluster)) regexp))
;; Redefine the cluster.
- (setq primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ (setq primary (file-remote-p ert-remote-temporary-file-directory)
regexp (shadow-regexp-superquote primary)
mocked-input `(,cluster ,primary ,regexp))
(call-interactively #'shadow-define-cluster)
a cluster (or site). This is not tested here; it must be
guaranteed by the originator of a cluster definition."
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
(let ((shadow-info-file shadow-test-info-file)
(shadow-todo-file shadow-test-todo-file)
(should (string-equal (system-name) (shadow-site-name primary1)))
(should
(string-equal
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ (file-remote-p ert-remote-temporary-file-directory)
(shadow-name-site
- (file-remote-p shadow-test-remote-temporary-file-directory))))
+ (file-remote-p ert-remote-temporary-file-directory))))
(should
(string-equal
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ (file-remote-p ert-remote-temporary-file-directory)
(shadow-site-name
- (file-remote-p shadow-test-remote-temporary-file-directory))))
+ (file-remote-p ert-remote-temporary-file-directory))))
(should (equal (shadow-site-cluster cluster1)
(shadow-get-cluster cluster1)))
;; Define a second cluster.
(setq cluster2 "cluster2"
- primary2
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ primary2 (file-remote-p ert-remote-temporary-file-directory)
regexp2 (format "^\\(%s\\|%s\\)$" shadow-system-name primary2))
(shadow-set-cluster cluster2 primary2 regexp2)
(ert-deftest shadow-test02-files ()
"Check file manipulation functions."
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
(let ((shadow-info-file shadow-test-info-file)
(shadow-todo-file shadow-test-todo-file)
(string-equal (shadow-local-file (concat primary file)) file))
;; Redefine the cluster.
- (setq primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ (setq primary (file-remote-p ert-remote-temporary-file-directory)
regexp (shadow-regexp-superquote primary))
(shadow-set-cluster cluster primary regexp)
(ert-deftest shadow-test03-expand-cluster-in-file-name ()
"Check canonical file name of a cluster or site."
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
(let ((shadow-info-file shadow-test-info-file)
(shadow-todo-file shadow-test-todo-file)
file2
(make-temp-name
(expand-file-name
- "shadowfile-tests"
- shadow-test-remote-temporary-file-directory)))
+ "shadowfile-tests" ert-remote-temporary-file-directory)))
;; A local file name is kept.
(should
(shadow-expand-cluster-in-file-name (concat primary file1)) file1))
;; Redefine the cluster.
- (setq primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ (setq primary (file-remote-p ert-remote-temporary-file-directory)
regexp (shadow-regexp-superquote primary))
(shadow-set-cluster cluster primary regexp)
(ert-deftest shadow-test04-contract-file-name ()
"Check canonical file name of a cluster or site."
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
(let ((shadow-info-file shadow-test-info-file)
(shadow-todo-file shadow-test-todo-file)
(concat "/cluster:" file)))
;; Redefine the cluster.
- (setq primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ (setq primary (file-remote-p ert-remote-temporary-file-directory)
regexp (shadow-regexp-superquote primary))
(shadow-set-cluster cluster primary regexp)
(should
(string-equal
(shadow-contract-file-name
- (concat
- (file-remote-p shadow-test-remote-temporary-file-directory) file))
+ (concat (file-remote-p ert-remote-temporary-file-directory) file))
(concat "/cluster:" file))))
;; Cleanup.
(ert-deftest shadow-test05-file-match ()
"Check `shadow-same-site' and `shadow-file-match'."
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
(let ((shadow-info-file shadow-test-info-file)
(shadow-todo-file shadow-test-todo-file)
(should (shadow-file-match (shadow-parse-name file) file))
;; Redefine the cluster.
- (setq primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ (setq primary (file-remote-p ert-remote-temporary-file-directory)
regexp (shadow-regexp-superquote primary))
(shadow-set-cluster cluster primary regexp)
(should
(shadow-file-match
(shadow-parse-name
- (concat
- (file-remote-p shadow-test-remote-temporary-file-directory)
- file))
+ (concat (file-remote-p ert-remote-temporary-file-directory) file))
file)))
;; Cleanup.
(ert-deftest shadow-test06-literal-groups ()
"Check literal group definitions."
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
(let ((shadow-info-file shadow-test-info-file)
(shadow-todo-file shadow-test-todo-file)
(shadow-set-cluster cluster1 primary regexp)
(setq cluster2 "cluster2"
- primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ primary (file-remote-p ert-remote-temporary-file-directory)
regexp (format "^\\(%s\\|%s\\)$" shadow-system-name primary))
(shadow-set-cluster cluster2 primary regexp)
file2
(make-temp-name
(expand-file-name
- "shadowfile-tests"
- shadow-test-remote-temporary-file-directory))
+ "shadowfile-tests" ert-remote-temporary-file-directory))
mocked-input
`(,cluster1 ,file1 ,cluster2 ,file2
,primary ,file1 ,(kbd "RET")))
(ert-deftest shadow-test07-regexp-groups ()
"Check regexp group definitions."
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
(let ((shadow-info-file shadow-test-info-file)
(shadow-todo-file shadow-test-todo-file)
(shadow-set-cluster cluster1 primary regexp)
(setq cluster2 "cluster2"
- primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ primary (file-remote-p ert-remote-temporary-file-directory)
regexp (format "^\\(%s\\|%s\\)$" shadow-system-name primary))
(shadow-set-cluster cluster2 primary regexp)
(ert-deftest shadow-test08-shadow-todo ()
"Check that needed shadows are added to todo."
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
- (skip-unless (file-writable-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
+ (skip-unless (file-writable-p ert-remote-temporary-file-directory))
(let ((backup-inhibited t)
create-lockfiles
(message
"%s %s %s %s %s"
temporary-file-directory
- shadow-test-remote-temporary-file-directory
+ ert-remote-temporary-file-directory
shadow-homedir shadow-info-file shadow-todo-file))
;; Define clusters.
cluster1 primary regexp shadow-clusters))
(setq cluster2 "cluster2"
- primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ primary (file-remote-p ert-remote-temporary-file-directory)
regexp (shadow-regexp-superquote primary))
(shadow-set-cluster cluster2 primary regexp)
(when shadow-debug
"Check that needed shadow files are copied."
:tags '(:expensive-test)
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
- (skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
- (skip-unless (file-writable-p shadow-test-remote-temporary-file-directory))
+ (skip-unless (file-remote-p ert-remote-temporary-file-directory))
+ (skip-unless (file-writable-p ert-remote-temporary-file-directory))
(let ((backup-inhibited t)
create-lockfiles
(shadow-set-cluster cluster1 primary regexp)
(setq cluster2 "cluster2"
- primary
- (file-remote-p shadow-test-remote-temporary-file-directory)
+ primary (file-remote-p ert-remote-temporary-file-directory)
regexp (shadow-regexp-superquote primary))
(shadow-set-cluster cluster2 primary regexp)