emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115031: * automated/file-notify-tests.el:


From: Michael Albinus
Subject: [Emacs-diffs] trunk r115031: * automated/file-notify-tests.el:
Date: Fri, 08 Nov 2013 09:31:19 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115031
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Fri 2013-11-08 10:31:15 +0100
message:
  * automated/file-notify-tests.el:
  * automated/tramp-tests.el: Add `tramp-own-remote-path' to
  `tramp-remote-path' when running on hydra.
  (tramp-test07-file-exists-p): Remove instrumentation code.
  (tramp-test26-process-file): Don't use "/bin/true" and
  "/bin/false", these paths do not exist on hydra.
modified:
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/file-notify-tests.el 
filenotifytests.el-20130702144123-sxglvo6zs3jcj8w1-1
  test/automated/tramp-tests.el  tramptests.el-20131105142319-d9zp3oprkpxj5v1e-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2013-11-08 07:52:28 +0000
+++ b/test/ChangeLog    2013-11-08 09:31:15 +0000
@@ -1,7 +1,11 @@
 2013-11-08  Michael Albinus  <address@hidden>
 
+       * automated/file-notify-tests.el:
        * automated/tramp-tests.el: Add `tramp-own-remote-path' to
-       `tramp-remote-path'.
+       `tramp-remote-path' when running on hydra.
+       (tramp-test07-file-exists-p): Remove instrumentation code.
+       (tramp-test26-process-file): Don't use "/bin/true" and
+       "/bin/false", these paths do not exist on hydra.
 
 2013-11-08  Helmut Eller  <address@hidden>
 

=== modified file 'test/automated/file-notify-tests.el'
--- a/test/automated/file-notify-tests.el       2013-10-24 07:38:45 +0000
+++ b/test/automated/file-notify-tests.el       2013-11-08 09:31:15 +0000
@@ -46,6 +46,9 @@
 (setq tramp-verbose 0
       tramp-message-show-message nil)
 (when noninteractive (defalias 'tramp-read-passwd 'ignore))
+;; This shall happen on hydra only.
+(when (getenv "NIX_STORE")
+  (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
 
 ;; We do not want to try and fail `file-notify-add-watch'.
 (defun file-notify--test-local-enabled ()

=== modified file 'test/automated/tramp-tests.el'
--- a/test/automated/tramp-tests.el     2013-11-08 07:52:28 +0000
+++ b/test/automated/tramp-tests.el     2013-11-08 09:31:15 +0000
@@ -19,13 +19,17 @@
 
 ;;; Commentary:
 
-;; Some of the tests are intended to run over remote files.  Set
+;; The tests require a recent ert.el from Emacs 24.4.
+
+;; Some of the tests require access to a remote host files.  Set
 ;; `tramp-test-temporary-file-directory' to a suitable value.  It must
 ;; NOT require an interactive password prompt, when running the tests
 ;; in batch mode.
 
-;; If you want to skip tests for remote files, set this variable to
-;; `null-device'.
+;; If you want to skip tests accessing a remote host, set this
+;; variable to `null-device'.
+
+;; A whole test run can be performed calling the command `tramp-test-all'.
 
 ;;; Code:
 
@@ -40,10 +44,9 @@
 (setq tramp-verbose 0
       tramp-message-show-message nil)
 (when noninteractive (defalias 'tramp-read-passwd 'ignore))
-;; This shall happen on hydra only; we need a proper test.  Check
-;; `process-environment' for a hint.
-(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
-(message "%s" process-environment)
+;; This shall happen on hydra only.
+(when (getenv "NIX_STORE")
+  (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
 
 (defvar tramp--test-enabled-checked nil
   "Cached result of `tramp--test-enabled'.
@@ -506,25 +509,13 @@
 
 (ert-deftest tramp-test07-file-exists-p ()
   "Check `file-exist-p', `write-region' and `delete-file'."
-  (condition-case err
-      (with-timeout (20 (should-not 'timeout))
-       (message "tramp--test-enabled")
-       (message "%S" (tramp--test-enabled))
-       (skip-unless (tramp--test-enabled))
-       (let ((tmp-name (tramp--test-make-temp-name)))
-         (message "file-exists-p")
-         (should-not (file-exists-p tmp-name))
-         (message "write-region")
-         (write-region "foo" nil tmp-name)
-         (message "file-exists-p")
-         (should (file-exists-p tmp-name))
-         (message "delete-file")
-         (delete-file tmp-name)
-         (message "file-exists-p")
-         (should-not (file-exists-p tmp-name))))
-    ((error quit)
-     (message "%S" err)
-     (signal (car err) (cdr err)))))
+  (skip-unless (tramp--test-enabled))
+  (let ((tmp-name (tramp--test-make-temp-name)))
+    (should-not (file-exists-p tmp-name))
+    (write-region "foo" nil tmp-name)
+    (should (file-exists-p tmp-name))
+    (delete-file tmp-name)
+    (should-not (file-exists-p tmp-name))))
 
 (ert-deftest tramp-test08-file-local-copy ()
   "Check `file-local-copy'."
@@ -930,8 +921,8 @@
   "Check `process-file'."
   (skip-unless (tramp--test-enabled))
   (let ((default-directory tramp-test-temporary-file-directory))
-    (should (zerop (process-file "/bin/true")))
-    (should-not (zerop (process-file "/bin/false")))
+    (should (zerop (process-file "true")))
+    (should-not (zerop (process-file "false")))
     (with-temp-buffer
       (should (zerop (process-file "ls" nil t)))
       (should (> (point-max) (point-min))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]