diff options
| author | Michael Albinus | 2018-07-25 13:18:46 +0200 |
|---|---|---|
| committer | Michael Albinus | 2018-07-25 13:18:46 +0200 |
| commit | c67407e7520a97a92737200bf559c48a927db470 (patch) | |
| tree | 555b750976eb7c147061bc4eae0ff410b9202ed2 /test | |
| parent | 200195e824befa112459c0afbac7c94aea739573 (diff) | |
| download | emacs-c67407e7520a97a92737200bf559c48a927db470.tar.gz emacs-c67407e7520a97a92737200bf559c48a927db470.zip | |
Instrument shadowfile{-tests} for error hunting on hydra.
* lisp/shadowfile.el (shadow-make-fullname): Use changed
`tramp-make-tramp-file-name' from Tramp 2.4.
* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo):
Instrument test. Suppress errors in cleanup.
(shadow-test09-shadow-copy-files): Suppress errors in cleanup.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/shadowfile-tests.el | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el index 200fb4c58c6..c38d49e61f2 100644 --- a/test/lisp/shadowfile-tests.el +++ b/test/lisp/shadowfile-tests.el | |||
| @@ -696,6 +696,7 @@ guaranteed by the originator of a cluster definition." | |||
| 696 | shadow-files-to-copy | 696 | shadow-files-to-copy |
| 697 | cluster1 cluster2 primary regexp file) | 697 | cluster1 cluster2 primary regexp file) |
| 698 | (unwind-protect | 698 | (unwind-protect |
| 699 | (condition-case err | ||
| 699 | (progn | 700 | (progn |
| 700 | ;; Cleanup. | 701 | ;; Cleanup. |
| 701 | (when (file-exists-p shadow-info-file) | 702 | (when (file-exists-p shadow-info-file) |
| @@ -773,16 +774,19 @@ guaranteed by the originator of a cluster definition." | |||
| 773 | (concat (shadow-site-primary cluster2) file) | 774 | (concat (shadow-site-primary cluster2) file) |
| 774 | (shadow-contract-file-name (concat "/cluster1:" file))) | 775 | (shadow-contract-file-name (concat "/cluster1:" file))) |
| 775 | shadow-files-to-copy))) | 776 | shadow-files-to-copy))) |
| 777 | (error (message "Error: %s" err) (signal (car err) (cdr err)))) | ||
| 776 | 778 | ||
| 777 | ;; Cleanup. | 779 | ;; Cleanup. |
| 778 | (when (file-exists-p shadow-info-file) | 780 | (when (file-exists-p shadow-info-file) |
| 779 | (delete-file shadow-info-file)) | 781 | (delete-file shadow-info-file)) |
| 780 | (when (file-exists-p shadow-todo-file) | 782 | (when (file-exists-p shadow-todo-file) |
| 781 | (delete-file shadow-todo-file)) | 783 | (delete-file shadow-todo-file)) |
| 782 | (when (file-exists-p file) | 784 | (ignore-errors |
| 783 | (delete-file file)) | 785 | (when (file-exists-p file) |
| 784 | (when (file-exists-p (concat (shadow-site-primary cluster2) file)) | 786 | (delete-file file))) |
| 785 | (delete-file (concat (shadow-site-primary cluster2) file)))))) | 787 | (ignore-errors |
| 788 | (when (file-exists-p (concat (shadow-site-primary cluster2) file)) | ||
| 789 | (delete-file (concat (shadow-site-primary cluster2) file))))))) | ||
| 786 | 790 | ||
| 787 | (ert-deftest shadow-test09-shadow-copy-files () | 791 | (ert-deftest shadow-test09-shadow-copy-files () |
| 788 | "Check that needed shadow files are copied." | 792 | "Check that needed shadow files are copied." |
| @@ -864,10 +868,12 @@ guaranteed by the originator of a cluster definition." | |||
| 864 | (delete-file shadow-info-file)) | 868 | (delete-file shadow-info-file)) |
| 865 | (when (file-exists-p shadow-todo-file) | 869 | (when (file-exists-p shadow-todo-file) |
| 866 | (delete-file shadow-todo-file)) | 870 | (delete-file shadow-todo-file)) |
| 867 | (when (file-exists-p file) | 871 | (ignore-errors |
| 868 | (delete-file file)) | 872 | (when (file-exists-p file) |
| 869 | (when (file-exists-p (concat (shadow-site-primary cluster2) file)) | 873 | (delete-file file))) |
| 870 | (delete-file (concat (shadow-site-primary cluster2) file)))))) | 874 | (ignore-errors |
| 875 | (when (file-exists-p (concat (shadow-site-primary cluster2) file)) | ||
| 876 | (delete-file (concat (shadow-site-primary cluster2) file))))))) | ||
| 871 | 877 | ||
| 872 | (defun shadowfile-test-all (&optional interactive) | 878 | (defun shadowfile-test-all (&optional interactive) |
| 873 | "Run all tests for \\[shadowfile]." | 879 | "Run all tests for \\[shadowfile]." |