GNU bug report logs - #29187
flymake ruby and perl tests fail on rhel7.4

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Mon, 6 Nov 2017 23:45:01 UTC

Severity: normal

Found in version 26.0.90

Done: joaotavora <at> gmail.com (João Távora)

Bug is archived. No further changes may be made.

Full log


Message #33 received at 29187 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: joaotavora <at> gmail.com (João Távora)
Cc: 29187 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#29187: flymake ruby and perl tests fail on rhel7.4
Date: Tue, 07 Nov 2017 20:42:02 -0500
João Távora wrote:

> Wow, subtle stuff. My ruby (2.3) doesn't crash. Does yours also fail if
> you use a absolute path after -wc instead of a relative one?

Still fails.

> So I guess all that's missing is a fix to the ruby case. If the absolute
> path doesn't fix it, I think we can fake a dummy HOME

This works for me:

--- i/test/lisp/progmodes/flymake-tests.el
+++ w/test/lisp/progmodes/flymake-tests.el
@@ -120,11 +120,17 @@ flymake-tests--wait-for-backends
 (ert-deftest ruby-backend ()
   "Test the ruby backend"
   (skip-unless (executable-find "ruby"))
-  (flymake-tests--with-flymake ("test.rb")
-    (flymake-goto-next-error)
-    (should (eq 'flymake-warning (face-at-point)))
-    (flymake-goto-next-error)
-    (should (eq 'flymake-error (face-at-point)))))
+  ;; Some versions of ruby fail if HOME doesn't exist (bug#29187).
+  (let* ((tempdir (make-temp-file "flymake-tests-ruby" t))
+         (process-environment (cons (format "HOME=%s" tempdir)
+                                    process-environment)))
+    (unwind-protect
+        (flymake-tests--with-flymake ("test.rb")
+          (flymake-goto-next-error)
+          (should (eq 'flymake-warning (face-at-point)))
+          (flymake-goto-next-error)
+          (should (eq 'flymake-error (face-at-point))))
+      (delete-directory tempdir t))))
 
 (ert-deftest different-diagnostic-types ()
   "Test GCC warning via function predicate."




This bug report was last modified 7 years and 273 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.