aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2015-12-25 10:45:20 +0100
committerMichael Albinus2015-12-25 10:45:20 +0100
commitdfad97b6539af4d43a47f070ec200536021ad0a7 (patch)
tree10e40169fde127c4c4e43cf134d38f0033f17b7f /test
parentd107eda498f94423d846b0e2f1be7facab417b2a (diff)
downloademacs-dfad97b6539af4d43a47f070ec200536021ad0a7.tar.gz
emacs-dfad97b6539af4d43a47f070ec200536021ad0a7.zip
Make tramp-test29-vc-registered more robust
* test/automated/tramp-tests.el (tramp-test29-vc-registered): Move `bzr' case down. Skip test when `vc-create-repo' fails. Remove instrumentation.
Diffstat (limited to 'test')
-rw-r--r--test/automated/tramp-tests.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index 97b2ffed267..23171d6e983 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -1601,7 +1601,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
1601 (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory) 1601 (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
1602 'tramp-sh-file-name-handler)) 1602 'tramp-sh-file-name-handler))
1603 1603
1604 (tramp--instrument-test-case 10
1605 (let* ((default-directory tramp-test-temporary-file-directory) 1604 (let* ((default-directory tramp-test-temporary-file-directory)
1606 (tmp-name1 (tramp--test-make-temp-name)) 1605 (tmp-name1 (tramp--test-make-temp-name))
1607 (tmp-name2 (expand-file-name "foo" tmp-name1)) 1606 (tmp-name2 (expand-file-name "foo" tmp-name1))
@@ -1609,6 +1608,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
1609 (vc-handled-backends 1608 (vc-handled-backends
1610 (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil 1609 (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
1611 (cond 1610 (cond
1611 ((tramp-find-executable v vc-git-program (tramp-get-remote-path v))
1612 '(Git))
1613 ((tramp-find-executable v vc-hg-program (tramp-get-remote-path v))
1614 '(Hg))
1612 ((tramp-find-executable v vc-bzr-program (tramp-get-remote-path v)) 1615 ((tramp-find-executable v vc-bzr-program (tramp-get-remote-path v))
1613 (setq tramp-remote-process-environment 1616 (setq tramp-remote-process-environment
1614 (cons (format "BZR_HOME=%s" 1617 (cons (format "BZR_HOME=%s"
@@ -1619,10 +1622,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
1619 (tramp-dissect-file-name tramp-test-temporary-file-directory) 1622 (tramp-dissect-file-name tramp-test-temporary-file-directory)
1620 nil 'keep-password) 1623 nil 'keep-password)
1621 '(Bzr)) 1624 '(Bzr))
1622 ((tramp-find-executable v vc-git-program (tramp-get-remote-path v))
1623 '(Git))
1624 ((tramp-find-executable v vc-hg-program (tramp-get-remote-path v))
1625 '(Hg))
1626 (t nil))))) 1625 (t nil)))))
1627 (skip-unless vc-handled-backends) 1626 (skip-unless vc-handled-backends)
1628 (message "%s" vc-handled-backends) 1627 (message "%s" vc-handled-backends)
@@ -1638,7 +1637,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
1638 1637
1639 (let ((default-directory tmp-name1)) 1638 (let ((default-directory tmp-name1))
1640 ;; Create empty repository, and register the file. 1639 ;; Create empty repository, and register the file.
1641 (vc-create-repo (car vc-handled-backends)) 1640 ;; Sometimes, creation of repository fails (bzr!); we skip
1641 ;; the test then.
1642 (condition-case nil
1643 (vc-create-repo (car vc-handled-backends))
1644 (error (skip-unless nil)))
1642 ;; The structure of VC-FILESET is not documented. Let's 1645 ;; The structure of VC-FILESET is not documented. Let's
1643 ;; hope it won't change. 1646 ;; hope it won't change.
1644 (condition-case nil 1647 (condition-case nil
@@ -1653,7 +1656,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
1653 (should (vc-registered tmp-name2))) 1656 (should (vc-registered tmp-name2)))
1654 1657
1655 ;; Cleanup. 1658 ;; Cleanup.
1656 (ignore-errors (delete-directory tmp-name1 'recursive)))))) 1659 (ignore-errors (delete-directory tmp-name1 'recursive)))))
1657 1660
1658(ert-deftest tramp-test30-make-auto-save-file-name () 1661(ert-deftest tramp-test30-make-auto-save-file-name ()
1659 "Check `make-auto-save-file-name'." 1662 "Check `make-auto-save-file-name'."