[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [patch] Add test-run capability to Makefile
From: |
Eric Schulte |
Subject: |
Re: [O] [patch] Add test-run capability to Makefile |
Date: |
Wed, 04 Jan 2012 13:51:27 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Achim Gratz <address@hidden> writes:
> Martyn Jago <address@hidden> 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/