On Nov 4, 2007, at 3:13 AM, Cosimo Streppone via RT wrote:
However, just out of curiosity...
Would the attached test work as well?
I replaced all the code that does the "hand-testing" of auto::gcc
with the automated `test_step_thru_runstep()' function.
IIUC, that function does exactly what the replaced code
is supposed to do.
That is correct, at least up to a point.
1. The tests in t/configure/1??-*.t were originally designed to
simulate the structure of Configure.pl. So they had to have a
certain amount of code to get to the same point that Configure.pl
arrives at just before it calls Parrot::Configure::runsteps() (which,
internally, calls each step's own runstep() method).
2. The tests in t/configure/1??-*.t had to test other aspects of the
way the config steps were specified, e.g., the presence of
'description'.
3. On the other hand, later configuration steps depend, to a greater
or less extent, on earlier steps. I didn't want each test in t/
configure/1??-*.t to have to replicate what Configure.pl does by
running *all* earlier configuration steps in order to test one aspect
of a given step. The challenge was to determine how much information
a given step needed in order to be testable, i.e., how many and which
earlier config steps need to be run via test_step_thru_runstep() in
order to be able to write more detailed tests for a given step. (In
retrospect, test_step_thru_runstep() might better have been named
something like: test_prerequisite_step().)
In the case at hand, it turned out that 111-auto_gcc-01.t needed more
information in order to test auto::gcc::runstep().
kid51