From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: Re: [bug] regression tests broken Date: Sun, 13 Nov 2011 15:25:42 +0000 Message-ID: References: <87bosil4hi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPbwU-0001ET-QX for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 10:25:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPbwT-0005yT-NB for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 10:25:58 -0500 Received: from lo.gmane.org ([80.91.229.12]:60268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPbwT-0005yP-B0 for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 10:25:57 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RPbwS-0001Jl-Ge for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 16:25:56 +0100 Received: from 88-96-171-138.dsl.zen.co.uk ([88.96.171.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Nov 2011 16:25:56 +0100 Received: from martyn.jago by 88-96-171-138.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Nov 2011 16:25:56 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Martyn Jago writes: Hi Eric [...] Further to the problem of tests failing under sandboxed conditions unexpectedly, I've made a few observations which I want to pass on. * ID Currently the ID searching command `org-id-find' has global scope to find ID's all over the host system. Since developers frequently have > 1 Orgs on their system, this can lead to confusion. For instance, the test `ob-C/table' in in test-ob-C.el appears to contain an orphan ID, which fails, but may well pass on the devs system, since the ID probably exists somewhere (does this test also require to be called test-ob-C/table)?. Unfortunately `org-id-find' seems to be heavily dependent on org-mode.el forms, and I suspect it would require a lot of time for me to attempt to restrict it's scope to `the current Org system in use, so I will leave it to someone with more experience. Another by-product is that sandboxed test systems are not guaranteed to pick up the _correct_ file containing the search ID (this plagued me this-morning). * `org-test-load' attempts to load symlinks (Emacs interlocking files). Currently `org-test-load' will happily attempt to load an interlocking symbolic link (such as .#test-ob-exp.el -> martyn@88-96-171-138.59787). This results in a failure to run any tests, and is particularly annoying during test development. Below is a patch that fixes this problem for me. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Avoid-loading-and-failing-symbolic-links-interlockin.patch Content-Description: 0001-Avoid-loading-and-failing-symbolic-links-interlockin.patch >From 04dd7358295caef0d42a3fe93f4979ccd3b5c630 Mon Sep 17 00:00:00 2001 From: Martyn Jago Date: Sun, 13 Nov 2011 14:43:34 +0000 Subject: [PATCH] Avoid loading (and failing) symbolic links (interlocking files) * testing/org-test.el: During test development various interlocking files may be present in testing/lisp directory (since they are being edited by emacs). Currently org-test-load will attempt to load these and fail. --- testing/org-test.el | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/org-test.el b/testing/org-test.el index 57b7252..ea8cae4 100644 --- a/testing/org-test.el +++ b/testing/org-test.el @@ -274,9 +274,10 @@ otherwise place the point at the beginning of the inserted text." (mapc (lambda (path) (if (file-directory-p path) - (rld path) + (rld path) (catch 'missing-test-dependency - (load-file path)))) + (when (string-match "^[A-Za-z].*\\.el$" path) + load-file path)))) (directory-files base 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el$")))) (rld (expand-file-name "lisp" org-test-dir)) -- 1.7.3.4 --=-=-= Content-Type: text/plain I'm still looking at a potential variable passing problem during html export by inline calls, and will submit something as soon as I can. Best, Martyn --=-=-=--