[ 
https://issues.apache.org/jira/browse/LUCY-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marvin Humphrey updated LUCY-34:
--------------------------------

    Attachment: test_files.diff

A little while back, I changed over our C test files to generate "TAP" output,
which conforms to the [Test Anything 
Protocol|http://en.wikipedia.org/wiki/Test_Anything_Protocol].  Perl's build 
tools are set up
to parse TAP, and it doesn't matter whether the program that generates them is
a Perl script, a compiled executable, a Python script, or what have you.
(Writing a TAP producer is actually pretty easy.)

Up till now, we've been running the charmonizer tests by wrapping the
executable compiled from charm_test.c.  With the integration of Boilerplater
and the addition of Lucy::Test, we can start accessing these tests via the
Lucy shared object.  We eliminate the previous wrapper, and break out the
Charmonizer tests into individual files, each of which invokes a
TestCharmonizer's run_test():

{code:none}
use strict;
use warnings;

use Lucy::Test;
Lucy::Test::TestCharmonizer::run_tests("variadic_macros");
{code}

Here's a sample run:

{code:none}
mar...@smokie:~/projects/lucy/perl $ perl -Mblib 
t/charmonizer/006-variadic_macros.t 
1..4
ok 1 - #defines agree
ok 2 - ISO variadic macros work
ok 3 - GNUC variadic macros work
ok 4 - either ISO or GNUC
mar...@smokie:~/projects/lucy/perl $
{code}

Eventually, we'll have a couple hundred of those small test files.  FWIW, it's
actually possible to avoid all the little files and run tests via commands
from within our Module::Build subclass, Lucy::Build.  However, to do that we
need to pull in TAP::Parser as a dependency, and invoke the commands via an
opaque, custom API which would confuse anyone who just wanted to run a test
file or two.

> Update Perl binding build tools to use Boilerplater
> ---------------------------------------------------
>
>                 Key: LUCY-34
>                 URL: https://issues.apache.org/jira/browse/LUCY-34
>             Project: Lucy
>          Issue Type: Sub-task
>          Components: Boilerplater, Perl bindings
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>         Attachments: Test.pm, test_files.diff
>
>
> Up till now, Boilerplater has existed in isolation, running its own test suite
> but not integrated with other parts of Lucy.  We'll address that by changing
> over the Charmonizer tests to run via the Boilerplater framework within the
> Perl bindings.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to