aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2017-05-01 13:23:30 -0400
committerGlenn Morris2017-05-01 13:23:30 -0400
commit6f0dfad84e1c1608bff9d691395bbe4ba1a39a52 (patch)
treeb3cac8d6f3eba8aa116154d01d7648cf9c010dbf
parent8e94fb1dd952ed73ea03b1cd6d30eee4d6549e1a (diff)
downloademacs-6f0dfad84e1c1608bff9d691395bbe4ba1a39a52.tar.gz
emacs-6f0dfad84e1c1608bff9d691395bbe4ba1a39a52.zip
Tweak vc-tests.el for bzr
* test/lisp/vc/vc-tests.el (vc-test--working-revision): Handle test environments where HOME does not exist.
-rw-r--r--test/lisp/vc/vc-tests.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/lisp/vc/vc-tests.el b/test/lisp/vc/vc-tests.el
index f2898cb6d2c..656f673b201 100644
--- a/test/lisp/vc/vc-tests.el
+++ b/test/lisp/vc/vc-tests.el
@@ -307,8 +307,13 @@ This checks also `vc-backend' and `vc-responsible-backend'."
307 (file-name-as-directory 307 (file-name-as-directory
308 (expand-file-name 308 (expand-file-name
309 (make-temp-name "vc-test") temporary-file-directory))) 309 (make-temp-name "vc-test") temporary-file-directory)))
310 (process-environment process-environment)
311 tempdir
310 vc-test--cleanup-hook) 312 vc-test--cleanup-hook)
311 313 (when (eq backend 'Bzr)
314 (setq tempdir (make-temp-file "vc-test--state" t)
315 process-environment (cons (format "BZR_HOME=%s" tempdir)
316 process-environment)))
312 (unwind-protect 317 (unwind-protect
313 (progn 318 (progn
314 ;; Cleanup. 319 ;; Cleanup.
@@ -357,7 +362,9 @@ This checks also `vc-backend' and `vc-responsible-backend'."
357 '(nil unregistered)))))) 362 '(nil unregistered))))))
358 363
359 ;; Save exit. 364 ;; Save exit.
360 (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) 365 (ignore-errors
366 (if tempdir (delete-directory tempdir t))
367 (run-hooks 'vc-test--cleanup-hook)))))
361 368
362(defun vc-test--working-revision (backend) 369(defun vc-test--working-revision (backend)
363 "Check the working revision of a repository." 370 "Check the working revision of a repository."