[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4bab499ed0: Fix Tramp test environment on hydra.nixos.org
From: |
Michael Albinus |
Subject: |
master 4bab499ed0: Fix Tramp test environment on hydra.nixos.org |
Date: |
Sun, 10 Jul 2022 12:14:01 -0400 (EDT) |
branch: master
commit 4bab499ed0d40d4e5ca68e5a17bcf5341125f734
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Fix Tramp test environment on hydra.nixos.org
* lisp/emacs-lisp/ert-x.el (tramp-remote-path): Declare. Adapt
`tramp-remote-path' on hydra. (Bug#56424)
* test/lisp/dnd-tests.el (dnd-tests-begin-drag-files): Remove
instrumentation.
* test/lisp/filenotify-tests.el:
* test/lisp/shadowfile-tests.el:
* test/lisp/net/tramp-tests.el: Do not adapt `tramp-remote-path'.
---
lisp/emacs-lisp/ert-x.el | 8 ++++++--
test/lisp/dnd-tests.el | 6 ------
test/lisp/filenotify-tests.el | 4 ----
test/lisp/net/tramp-tests.el | 11 ++++++-----
test/lisp/shadowfile-tests.el | 4 ----
5 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index ae72a47c2f..21a967cb4c 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -488,9 +488,13 @@ The same keyword arguments are supported as in
(string-match "Apple \\(LLVM\\|[Cc]lang\\)\\|Xcode\\.app"
(shell-command-to-string "gcc --version")))
-
-(defvar tramp-methods)
(defvar tramp-default-host-alist)
+(defvar tramp-methods)
+(defvar tramp-remote-path)
+
+;; This should happen on hydra only.
+(when (getenv "EMACS_HYDRA_CI")
+ (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
;; If this defconst is used in a test file, `tramp' shall be loaded
;; prior `ert-x'. There is no default value on w32 systems, which
diff --git a/test/lisp/dnd-tests.el b/test/lisp/dnd-tests.el
index 7ce3677eaa..88f6e69457 100644
--- a/test/lisp/dnd-tests.el
+++ b/test/lisp/dnd-tests.el
@@ -274,7 +274,6 @@ This function only tries to handle strings."
(skip-unless (and (dnd-tests-remote-accessible-p)
;; TODO: make these tests work under X.
(not (eq window-system 'x))))
- (let ((tramp-verbose (if (getenv "EMACS_HYDRA_CI") 10 3)))
(let ((normal-temp-file (expand-file-name (make-temp-name "dnd-test")
temporary-file-directory))
(normal-temp-file-1 (expand-file-name (make-temp-name "dnd-test")
@@ -384,14 +383,9 @@ This function only tries to handle strings."
;; And when all remote files are inaccessible.
(should-error (dnd-begin-drag-files (list nonexistent-remote-file
nonexistent-remote-file-1))))
- (when (getenv "EMACS_HYDRA_CI")
- (dolist (buf (tramp-list-tramp-buffers))
- (message ";; %s\n%s" buf (tramp-get-buffer-string buf))
- (kill-buffer buf)))
(delete-file normal-temp-file)
(delete-file normal-temp-file-1)
(delete-file remote-temp-file))))
- )
(ert-deftest dnd-tests-get-local-file-uri ()
(should (equal (dnd-get-local-file-uri "file://localhost/path/to/foo")
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index ad0138b2e7..4ed1786a8e 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -178,10 +178,6 @@ Return nil when any other file notification watch is still
active."
tramp-allow-unsafe-temporary-files
(or tramp-allow-unsafe-temporary-files noninteractive))
-;; This should happen on hydra only.
-(when (getenv "EMACS_HYDRA_CI")
- (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
-
(defun file-notify--test-add-watch (file flags callback)
"Like `file-notify-add-watch', but also passing FILE to CALLBACK."
(file-notify-add-watch file flags
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index a53fc7ec7a..8b6d10033f 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -128,6 +128,7 @@ A resource file is in the resource directory as per
`(expand-file-name ,file (ert-resource-directory)))))
;; `ert-remote-temporary-file-directory' was introduced in Emacs 29.1.
+;; Adapting `tramp-remote-path' happens also there.
(unless (boundp 'ert-remote-temporary-file-directory)
(eval-and-compile
;; There is no default value on w32 systems, which could work out
@@ -152,7 +153,11 @@ A resource file is in the resource directory as per
(unless (and (null noninteractive) (file-directory-p "~/"))
(setenv "HOME" temporary-file-directory))
(format "/mock::%s" temporary-file-directory)))
- "Temporary directory for remote file tests.")))
+ "Temporary directory for remote file tests.")
+
+ ;; This should happen on hydra only.
+ (when (getenv "EMACS_HYDRA_CI")
+ (add-to-list 'tramp-remote-path 'tramp-own-remote-path))))
;; Beautify batch mode.
(when noninteractive
@@ -178,10 +183,6 @@ A resource file is in the resource directory as per
tramp-persistency-file-name nil
tramp-verbose 0)
-;; This should happen on hydra only.
-(when (getenv "EMACS_HYDRA_CI")
- (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
-
(defvar tramp--test-enabled-checked nil
"Cached result of `tramp--test-enabled'.
If the function did run, the value is a cons cell, the `cdr'
diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el
index e822bc9eb6..0916f7ce68 100644
--- a/test/lisp/shadowfile-tests.el
+++ b/test/lisp/shadowfile-tests.el
@@ -55,10 +55,6 @@
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")
- (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
-
(defconst shadow-test-info-file
(expand-file-name "shadows_test" temporary-file-directory)
"File to keep shadow information in during tests.")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4bab499ed0: Fix Tramp test environment on hydra.nixos.org,
Michael Albinus <=