#1189: t/steps/*/*.t: Replace reliance on init::defaults
-----------------------+----------------------------------------------------
Reporter: jkeenan | Owner: jkeenan
Type: todo | Status: assigned
Priority: normal | Milestone:
Component: configure | Version: 1.7.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
-----------------------+----------------------------------------------------
Comment(by jkeenan):
Replying to [comment:2 jkeenan]:
> Created ''https://svn.parrot.org/parrot/branches/configtests'' to work
on this ticket.
I plan to merge the ''configtests'' branch into trunk right after the
20091117 release.
This branch accomplishes the following:
* Calling `perl Configure.pl --test` (or with `test=configure`) will now
run the tests in ''t/steps/*.t'' '''after''' ''Configure.pl'' itself has
completed.
* Instead of running configuration step `init::defaults` (and others, as
needed) to provide reasonable defaults to a test file's Parrot::Configure
object, each test file will consult the results of Parrot's configuration:
`%Parrot::Config::Pconfig`. In many step test files, this will have the
effect of reducing the total number of tests run by five per config step
eliminated.
* Calls to the Perl 5 `%Config` in configuration step classes falling
later than `init::defaults` have been eliminated, as have calls to
`%Config` in the corresponding step tests. This includes both direct
calls (e.g., `use Config;`) as well as indirect calls using
`Parrot::Configure::Data::get_p5()`. Setting aside a few usages of
`Parrot::Configure::Data::keys_p5()`, we have now quarantined calls to the
Perl 5 `%Config` to `init::defaults` and its corresponding test file.
* That quarantining, however, came at a price. Up until now, in cases
where we knew we needed values from `%Config` during later configuration
steps or step tests, we stored them in a special part of the
Parrot::Configure object -- special in the sense that its contents were
'''not''' transferred to `%Parrot::Config::Config` in the final
configuration step. We want to have these values available as needed --
but we also don't want them used during `make` or `make test` because
there ultimate source is something we ultimately want to replace. So
these values will now be added to the main part of the Parrot::Configure
object and will therefore be transferred into `%Parrot::Config::Config` --
but they will have `_provisional` appended to their names. The
`_provisional` designation will be a signal: Don't rely on this for
'''building''' Parrot or '''testing''' Parrot; it's only a (medium- to
long-term) crutch used in '''configuring''' Parrot.
* In the course of working on this ticket, I created and resolved other
tickets which (a) removed some attribute-determining logic from
`gen::platform` and placed it in `auto::arch` (TT #1263); (b) eliminated
calls to `%Config` in test files run under `make test` (TT #1234 and TT
#1235); cleared up other locations with an improper dependence on
`%Config` (TT #1194 and TT #1236).
I will be attaching a gzipped file of a recent diff between this branch
and trunk at the branching point.
Thank you very much.
kid51
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1189#comment:4>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets