From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: make test on Mac Date: Wed, 01 Aug 2012 10:25:52 -0600 Message-ID: <87vch260kv.fsf@gmx.com> References: <873946ofmt.fsf@gnu.org> <87wr1i8y5d.fsf@gmx.com> <87txwmll1d.fsf@gnu.org> <87r4rq8x9j.fsf@gmx.com> <87lihyljqu.fsf@gnu.org> <87k3xi8w13.fsf@gmx.com> <871ujq1u1c.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwblY-0008Cf-Pd for emacs-orgmode@gnu.org; Wed, 01 Aug 2012 12:27:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwblS-0000A5-P2 for emacs-orgmode@gnu.org; Wed, 01 Aug 2012 12:27:20 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:56549 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SwblS-00009y-Ic for emacs-orgmode@gnu.org; Wed, 01 Aug 2012 12:27:14 -0400 In-Reply-To: <871ujq1u1c.fsf@altern.org> (Bastien's message of "Wed, 01 Aug 2012 18:00:47 +0200") 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: Bastien Cc: Org Mode Mailing List Bastien writes: > Eric Schulte writes: > >> `org-test-for-executable' signals it's own error, but if we >> changed `org-test-for-executable' to return a boolean and then used your >> example above it would be more readable. > > Perhaps -- what I mean is that if (org-test-for-executable "python") > signal a missing dependancy, then test-ob-python.el should not be part > of the testing suite. > > Do you see what I mean? Yes, I think we are already doing exactly what you are suggesting. Specifically, as each file of tests with external dependencies is loaded (e.g. test-ob-python.el) the first forms evaluated in that file are ;; -*- emacs-lisp -*- (org-test-for-executable "python") (unless (featurep 'ob-python) (signal 'missing-test-dependency "Support for Python code blocks")) Thus, if the required executable (in this case python) is not available on the user's system, or if the user has not loaded ob-python, then a missing-test-dependency signal will be thrown and none of the tests in the remainder of the file will be loaded. This ensures that only tests for which the required executable and Babel code are available will ever be included in the test suite. The `org-test-load' function, which loads of all of the test files, catches these missing-test-dependency signals and for each one it creates a dummy test that fails but is expected to fail. These tests serve to indicate to the user that there are tests which are not being run. Does this all make sense? Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte