Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

test suite refactoring

0 views
Skip to first unread message

Jerry Gay

unread,
Nov 18, 2005, 2:43:53 PM11/18/05
to p6i
i've been thinking about ways to reorganize parrot's test files, which
are currently spread throughout the source tree. so, here's my
proposal for refactoring them, for your consideration.

all parrot core tests should live under t/. notably, this includes
imcc, and other compilers like pge and tge. i propose t/compilers/
which would contain imcc, pge, tge, et al. following this trend,
t/p6rules/ would be moved to t/compilers/pge/p6rules. glob, p5regexp,
and any other pge test subdirs would live here. displayed graphically,
it looks something like this:

t/
compilers/
imcc/ <--- formerly imcc/t/
reg/
syn/
...
pge/ <--- formerly t/library/pge.t
p6rules/ <--- formerly t/p6rules/
glob/ <--- formerly t/library/pge-glob.t
...
tge/
...
...

this probably requires modification of the test tool chain, but that
shouldn't be a reason to prevent implementation, imho. of course, the
manifest, makefiles, etc are affected, too. does anybody have any
questions or concerns with this strategy?

your feedback is most welcome.
~jerry

Bernhard Schmalhofer

unread,
Nov 19, 2005, 1:31:11 PM11/19/05
to jerry gay, perl6-i...@perl.org
jerry gay schrieb:

Sound good to me. 'imcc/t' is more confusing than helpful.
I also suggest to do away with t/imcc/reg and move it's test perhaps
t/reg, as no PIR specific functionality is tested.

t/compilers/imcc could also be t/compilers/pir.

Also Punie.pm Python.pm Tcl.pm should be moved from lib/Parrot/Test
to their respective dir in 'languages'.

For t/libraries it might make sense to move the libraries tests next to
the libraries source.

CU, Bernhard

Chromatic

unread,
Nov 19, 2005, 2:34:15 PM11/19/05
to Bernhard Schmalhofer, p6i
On Sat, 2005-11-19 at 19:31 +0100, Bernhard Schmalhofer wrote:

> Also Punie.pm Python.pm Tcl.pm should be moved from lib/Parrot/Test
> to their respective dir in 'languages'.

How would the library loads in the test files look if this were the
case?

-- c

Bernhard Schmalhofer

unread,
Nov 19, 2005, 3:05:48 PM11/19/05
to chromatic, p6i
chromatic schrieb:

Setting the Perl5 search path can be handled with FindBin. See for
example languages/m4/t/basic/001_comletely_empty.t:

use FindBin;
use lib "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../../lib";

CU, Bernhard

Jerry Gay

unread,
Nov 20, 2005, 3:47:13 PM11/20/05
to Bernhard Schmalhofer, perl6-i...@perl.org
On 11/19/05, Bernhard Schmalhofer <Bernhard.S...@gmx.de> wrote:
> Sound good to me. 'imcc/t' is more confusing than helpful.
> I also suggest to do away with t/imcc/reg and move it's test perhaps
> t/reg, as no PIR specific functionality is tested.
>
> t/compilers/imcc could also be t/compilers/pir.
>
thanks for the feedback. i'll take a closer look at the imcc tests,
and post my observations on that soon.

for now, i've reorganized the pge tests, moving them into the
t/compilers/pge/ directory and subdirs, in revision 10112. smoke tests
and bug reports are welcome for all platforms. in testing, i've come
across that may affect msvc6 on win32 (no problem with msvc7.) i'm
hunting this down, and once fixed, i'll move on to tge, imcc, etc.

> Also Punie.pm Python.pm Tcl.pm should be moved from lib/Parrot/Test
> to their respective dir in 'languages'.
>
> For t/libraries it might make sense to move the libraries tests next to
> the libraries source.
>

i haven't made up my mind as to what the ideal locations are for
languages files. therefore, i'll leave those until a bit later.
whatever those locations are, there should be clear documentation for
HLL implementors to follow as to how to integrate their files into the
parrot source tree. therefore, i'll write up a design document with a
how-to section, and post it for review before making any changes to
the source tree.

~jerry

Jerry Gay

unread,
Nov 21, 2005, 12:10:28 PM11/21/05
to perl6-i...@perl.org
On 11/20/05, jerry gay <jerr...@gmail.com> wrote:
> for now, i've reorganized the pge tests, moving them into the
> t/compilers/pge/ directory and subdirs, in revision 10112. smoke tests
> and bug reports are welcome for all platforms. in testing, i've come
> across that may affect msvc6 on win32 (no problem with msvc7.) i'm
> hunting this down, and once fixed, i'll move on to tge, imcc, etc.
>
test suite reorganization is ongoing, now that i've fixed the makefile
bug causing msvc6 to fail on win32. as of revision 10123, TGE's tests
have been moved to t/compilers/tge/. in addition, tge has been added
to the root makefile, causing it to be built and tested by default.

while i continue to investigate imcc's tests, i'll also be looking at
test file order in the main makefile, and standardization of test file
headers (use warnings; use Test::More; etc.)
~jerry

Chromatic

unread,
Nov 21, 2005, 2:10:39 PM11/21/05
to Bernhard Schmalhofer, p6i
On Sat, 2005-11-19 at 21:05 +0100, Bernhard Schmalhofer wrote:

> Setting the Perl5 search path can be handled with FindBin. See for
> example languages/m4/t/basic/001_comletely_empty.t:
>
> use FindBin;
> use lib "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../../lib";

That's fairly ugly to put in the header of every test file. It would be
nice to avoid such repeated, typo-prone, scary black magic.

-- c

0 new messages