unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14937: vc-bzr.el test fails when bzr installed but using Git checkout of Emacs
@ 2013-07-23 13:13 Barry OReilly
  2013-07-23 16:04 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Barry OReilly @ 2013-07-23 13:13 UTC (permalink / raw)
  To: 14937

Patch follows. May I install to trunk?

diff --git a/test/automated/vc-bzr.el b/test/automated/vc-bzr.el
index 2776435..09010aa 100644
--- a/test/automated/vc-bzr.el
+++ b/test/automated/vc-bzr.el
@@ -31,10 +31,14 @@
 ;; bzr installed.  We could just put everything inside an IF
 ;; statement, but it would be nice if ERT had a "skipped" facility (?).

+(defun vc-bzr-test-p ()
+  (and (executable-find vc-bzr-program)
+       (file-accessible-directory-p ".bzr")))
+
 (ert-deftest vc-bzr-test-bug9726 ()
   "Test for http://debbugs.gnu.org/9726 ."
-  :expected-result (if (executable-find vc-bzr-program) :passed :failed)
-  (should (executable-find vc-bzr-program))
+  :expected-result (if (vc-bzr-test-p) :passed :failed)
+  (should (vc-bzr-test-p))
   (let* ((tempdir (make-temp-file "vc-bzr-test" t))
          (ignored-dir (expand-file-name "ignored-dir" tempdir))
          (default-directory (file-name-as-directory tempdir)))
@@ -64,8 +68,8 @@
 ;; Not specific to bzr.
 (ert-deftest vc-bzr-test-bug9781 ()
   "Test for http://debbugs.gnu.org/9781 ."
-  :expected-result (if (executable-find vc-bzr-program) :passed :failed)
-  (should (executable-find vc-bzr-program))
+  :expected-result (if (vc-bzr-test-p) :passed :failed)
+  (should (vc-bzr-test-p))
   (let* ((tempdir (make-temp-file "vc-bzr-test" t))
          (subdir (expand-file-name "subdir" tempdir))
          (file (expand-file-name "file" tempdir))
@@ -101,8 +105,8 @@
 ;; http://lists.gnu.org/archive/html/help-gnu-emacs/2012-04/msg00145.html
 (ert-deftest vc-bzr-test-faulty-bzr-autoloads ()
   "Test we can generate autoloads in a bzr directory when bzr is faulty."
-  :expected-result (if (executable-find vc-bzr-program) :passed :failed)
-  (should (executable-find vc-bzr-program))
+  :expected-result (if (vc-bzr-test-p) :passed :failed)
+  (should (vc-bzr-test-p))
   (let* ((tempdir (make-temp-file "vc-bzr-test" t))
          (file (expand-file-name "foo.el" tempdir))
          (default-directory (file-name-as-directory tempdir))





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#14937: vc-bzr.el test fails when bzr installed but using Git checkout of Emacs
  2013-07-23 13:13 bug#14937: vc-bzr.el test fails when bzr installed but using Git checkout of Emacs Barry OReilly
@ 2013-07-23 16:04 ` Glenn Morris
  2013-07-23 16:49   ` Barry OReilly
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2013-07-23 16:04 UTC (permalink / raw)
  To: Barry OReilly; +Cc: 14937


I can't reproduce such a failure, don't see why it should fail in such a
case, nor how this change can be correct (see below). Could you show the
actual failure message?

Barry OReilly wrote:

> +(defun vc-bzr-test-p ()
> +  (and (executable-find vc-bzr-program)
> +       (file-accessible-directory-p ".bzr")))

This looks in whatever random directory the PWD happens to be for a .bzr
directory. That can't be right.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#14937: vc-bzr.el test fails when bzr installed but using Git checkout of Emacs
  2013-07-23 16:04 ` Glenn Morris
@ 2013-07-23 16:49   ` Barry OReilly
  0 siblings, 0 replies; 3+ messages in thread
From: Barry OReilly @ 2013-07-23 16:49 UTC (permalink / raw)
  Cc: 14937-done

On Tue, Jul 23, 2013 at 12:04 PM, Glenn Morris <rgm@gnu.org> wrote:
>
> I can't reproduce such a failure, don't see why it should fail in such a
> case, nor how this change can be correct (see below). Could you show the
> actual failure message?

I mistook error messages as test failures and then jumped to a
conclusion. Closing.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-23 16:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-23 13:13 bug#14937: vc-bzr.el test fails when bzr installed but using Git checkout of Emacs Barry OReilly
2013-07-23 16:04 ` Glenn Morris
2013-07-23 16:49   ` Barry OReilly

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).