As part of my work on this ticket in the 'parallel' branch, I have
finally begun writing some basic tests for the 'gen' configuration
steps: config/gen/*.pm.  These steps -- which are the final
configuration steps -- primarily look data up in source files, files
generated earlier in the configuration process and/or the
Parrot::Configure object and then print that data in files used by 'make'.

Since what actually gets printed to file is very
system/platform/C-compiler-dependent, there's not much point in testing
that.  So the tests primarily ask questions like:  Can we locate the
source files named in the step?  Can we locate data in the
Parrot::Configure object as needed?

As we've done in refactoring some of the other config step classes, in
many places I'm moving hard-coded lists of source files from deep inside
a particular step's runstep() method into its _init() method.  For two
reasons:  (1) Since _init() is defined at the top of each class's file,
the hard-coded stuff is now more visible.  (2) If data is in the _init()
subroutine, it's more easily mockable during tests.

Since I'm not done with this testing/refactoring, I'm not submitting a
patch yet.  But anyone can see what's happening by doing a checkout of
the 'parallel' branch from the repository.

Thank you very much.
kid51

Reply via email to