emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: Bastien <bzg@altern.org>
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: make test on Mac
Date: Wed, 01 Aug 2012 10:25:52 -0600	[thread overview]
Message-ID: <87vch260kv.fsf@gmx.com> (raw)
In-Reply-To: <871ujq1u1c.fsf@altern.org> (Bastien's message of "Wed, 01 Aug 2012 18:00:47 +0200")

Bastien <bzg@altern.org> writes:

> Eric Schulte <eric.schulte@gmx.com> 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

  reply	other threads:[~2012-08-01 16:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 14:10 make test on Mac Neuwirth Erich
2012-08-01 14:23 ` Bastien
2012-08-01 14:50   ` Eric Schulte
2012-08-01 14:54     ` Bastien
2012-08-01 15:09       ` Eric Schulte
2012-08-01 15:22         ` Bastien
2012-08-01 15:35           ` Eric Schulte
2012-08-01 16:00             ` Bastien
2012-08-01 16:25               ` Eric Schulte [this message]
2012-08-02 15:14                 ` Bastien
2012-08-01 21:02   ` Neuwirth Erich
2012-08-02  6:35     ` Achim Gratz
     [not found]       ` <01862F34-A919-41E0-965A-360C4836EB91@univie.ac.at>
     [not found]         ` <1353139.E680GS25m4@rainer>
2012-08-04  7:10           ` Neuwirth Erich
2012-08-04  8:05             ` Achim Gratz
2012-08-08 15:42       ` Neuwirth Erich
2012-08-01 14:46 ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vch260kv.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).