emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] Add test-run capability to Makefile
Date: Wed, 04 Jan 2012 13:51:27 -0700	[thread overview]
Message-ID: <87aa63xkc0.fsf@gmx.com> (raw)
In-Reply-To: <87ehvfw7fb.fsf@Rainer.invalid> (Achim Gratz's message of "Wed, 04 Jan 2012 21:15:36 +0100")

Achim Gratz <Stromeko@nexgo.de> writes:

> Martyn Jago <martyn.jago@btinternet.com> writes:
>> Since the Makefile is currently getting a refresh I thought it would be
>> very useful to allow running of the regression test suite directly from
>> make using `make test'.
>
> Good idea, I just added it to my Makefile fork as well.
>

Very cool, I anticipate using this feature with great frequency.

>
>> The following patch achieves this and allows a user to run the
>> regression test suite on the their system following installation. This
>> makes it super-easy for a user to validate their latest org-mode
>> installation.
>
> Four tests require htmlize, which is a non-standard package (and can't
> be found on my system in batch mode unless I direct Emacs to load my
> .emacs anyway).  It would be nice if the tests would expectedly fail if
> htmlize can't be found, maybe with an additional message in the summary
> that full coverage hasn't been reached due to missing libraries.
>

If the following simple macro is added to org-test.el,

#+begin_src emacs-lisp
  (defmacro depends-upon (feature deftest)
    (declare (indent 1))
    (if (featurep feature)
        `,deftest
      `(ert-deftest ,(cadr deftest) () :expected-result :failed (should nil))))
#+end_src

Then the offending tests can be wrapped in `depends-upon' forms, e.g.

(depends-upon htmlize
  (ert-deftest should-have-htmlize ()
    (should (featurep 'htmlize))))

If you have the names of the offending tests this should be a simple
fix.  I'm happy to apply this to the test suite, but I don't know which
four tests rely upon htmlize.

Cheers,

>
>
> Achim.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

  reply	other threads:[~2012-01-04 21:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 14:35 [patch] Add test-run capability to Makefile Martyn Jago
2012-01-04 20:15 ` Achim Gratz
2012-01-04 20:51   ` Eric Schulte [this message]
2012-01-04 22:01     ` Achim Gratz
2012-01-05  9:58 ` Bastien
2012-01-05 10:27   ` Martyn Jago
2012-01-05 18:43     ` [patch][babel] test fix - was: " Martyn Jago
2012-01-06  7:29       ` Eric Schulte

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=87aa63xkc0.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=Stromeko@nexgo.de \
    --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).