]> git.koha-community.org Git - koha.git/commit
test suite: allow skipping of expensive tests
authorGalen Charlton <galen.charlton@liblime.com>
Mon, 19 May 2008 14:59:02 +0000 (09:59 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 19 May 2008 18:25:57 +0000 (13:25 -0500)
commit8645d38f41b11ff4c35c51bf967fa2d83a4c850e
tree47ad31100c9f17690a8ef738476bf558c797943d
parenta53aa294f7f1fd32ff5937f4f04fdcbc862d1c21
test suite: allow skipping of expensive tests

Defined a function attribute for KohaTest and subclasses
called 'Expensive'.  When a test method has that attribute,
it is skipped unless the RUN_EXPENSIVE_TESTS environment
variable is true.

To mark a test method, expensive, do this:

sub test_foo : Tests(4) Expensive { ... }

To mark a whole class and its subclasses expensive,
define a SKIP_CLASS sub (with empty body) with the
Expensive attribute:

sub SKIP_CLASS : Expensive { }

Updated the t/Makefile so that 'make test' runs
nonexpensive tests, while 'make fulltest' runs both
cheap and expensive tests.

Marked KohaTest::Installer test class expensive.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
t/Makefile
t/lib/KohaTest.pm
t/lib/KohaTest/Installer.pm