]> code.delx.au - gnu-emacs/commitdiff
; Instrument tramp-tests.el
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 10 May 2016 06:05:49 +0000 (08:05 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 10 May 2016 06:05:49 +0000 (08:05 +0200)
test/lisp/net/tramp-tests.el

index 6bbe9691286a65e959603be4873866c7b3884010..0f40468ec98101f34f51416d72f4630446596aef 100644 (file)
@@ -639,9 +639,13 @@ This checks also `file-name-as-directory', `file-name-directory',
   (should-not
    (unhandled-file-name-directory "/method:host:/path/to/file"))
 
+  (unwind-protect
   ;; Bug#10085.
   (dolist (n-e '(nil t))
     (let ((non-essential n-e))
+      (when (getenv "NIX_STORE")
+        (dolist (elt (all-completions "tramp-" obarray 'functionp))
+          (trace-function-background (intern elt))))
       (dolist (file
               `(,(file-remote-p tramp-test-temporary-file-directory 'method)
                 ,(file-remote-p tramp-test-temporary-file-directory 'host)))
@@ -656,7 +660,10 @@ This checks also `file-name-as-directory', `file-name-directory',
            (file-name-as-directory file)
            (if (tramp-completion-mode-p) file (concat file "./"))))
          (should (string-equal (file-name-directory file) file))
-         (should (string-equal (file-name-nondirectory file) "")))))))
+         (should (string-equal (file-name-nondirectory file) ""))))))
+  (when (getenv "NIX_STORE")
+    (untrace-all)
+    (message "%s" (with-current-buffer trace-buffer (buffer-string))))))
 
 (ert-deftest tramp-test07-file-exists-p ()
   "Check `file-exist-p', `write-region' and `delete-file'."