From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [patch] Add test-run capability to Makefile Date: Wed, 04 Jan 2012 13:51:27 -0700 Message-ID: <87aa63xkc0.fsf@gmx.com> References: <87ehvfw7fb.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiYHe-0003Mq-7m for emacs-orgmode@gnu.org; Wed, 04 Jan 2012 16:22:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RiYHc-00049N-N6 for emacs-orgmode@gnu.org; Wed, 04 Jan 2012 16:22:06 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:51042) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RiYHc-000497-GH for emacs-orgmode@gnu.org; Wed, 04 Jan 2012 16:22:04 -0500 In-Reply-To: <87ehvfw7fb.fsf@Rainer.invalid> (Achim Gratz's message of "Wed, 04 Jan 2012 21:15:36 +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: Achim Gratz Cc: emacs-orgmode@gnu.org Achim Gratz writes: > Martyn Jago 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/