[perl #41786] [PATCH]: tools/build/ops2c.pl refactored

1 view
Skip to first unread message

James Keenan

Mar 11, 2007, 8:44:03 AM3/11/07
to bugs-bi...@rt.perl.org
# New Ticket Created by James Keenan
# Please include the string: [perl #41786]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41786 >

This is a re-submission of the new files and patches originally
submitted in http://rt.perl.org/rt3/Ticket/Display.html?id=41608.
(Yesterday I twice tried submitting mail with individual file
attachments, but it never showed up. So I'm trying again with just
a single patch ops2c.pl.refactored.svn.diff.txt.)

New files:
lib/Parrot/IO/Capture/Mini.pm [devel]
lib/Parrot/Ops2c/Auxiliary.pm [devel]
lib/Parrot/Ops2c/Utils.pm [devel]
t/tools/ops2cutils/01-new.t []
t/tools/ops2cutils/02-usage.t []
t/tools/ops2cutils/03-print_c_header_file.t []
t/tools/ops2cutils/04-print_c_source_top.t []
t/tools/ops2cutils/05-print_c_source_bottom.t []
t/tools/ops2cutils/06-dynamic.t []
t/tools/ops2cutils/07-make_incdir.t []
t/tools/ops2cutils/08-nolines.t []
t/tools/ops2cutils/09-dynamic_nolines.t []
t/tools/ops2cutils/testlib/GenerateCore.pm []

Patches to:

These files constitute a refactoring of Parrot build tool tools/build/
ops2c.pl. The refactoring was conducted along the same lines as my
recent refactoring of tools/build/ops2pm.pl and tools/build/
pmc2c.pl. In each case, the interface to the build tool (i.e., what
is invoked by make) was left untouched, but the code within the
script was refactored into two Perl packages: one dubbed Utils.pm,
holding most of the functionality in methods; and another one dubbed
Auxiliary.pm, holding miscellaneous subroutines.

This refactoring was suggested by particle for the purpose of more
thoroughly testing Parrot's build tools, being able to demonstrate
the soundness of that refactoring and the thoroughness of the testing
via coverage analysis, and thereby setting a firm foundation for any
refactorings needed in the future.

The test suite in t/tools/ops2cutils/ is component-focused. It is
intended to be run after you have run Configure.pl but before you
have invoked make. Some of the tests are designed to fail if run
after make. Hence, these tests are not meant to be part of make
test's targets. Instead, once you have run Configure.pl you can run
them via: make buildtools_tests

This refactoring has been conducted largely in the 'buildtools'
branch of the repository, but has passed 'make' and 'make test' in
a fresh checkout of HEAD from trunk.

You can see the coverage analysis here: http://thenceforward.net/

I have tested this on Darwin ('make' and 'make test') and on Debian
Linux ('make' and 'make test'); particle has tested then on Win32.

So I will apply these files to trunk after the March release unless I
hear of test failures on other OSes.

Thank you very much.


Reply all
Reply to author
0 new messages