|
|
Choosing A Webhost: |
Re: making v6 test suite its own distro: msg#00023lang.perl.perl6.compiler
At 6:53 PM +0300 7/10/06, Gaal Yahas wrote: On Sat, Jul 08, 2006 at 12:47:17AM -0700, Darren Duncan wrote: As further discussed there ... Perhaps we need a baby-Perl Test::Simple for new implementations, and I believe that the current Test.pm already qualifies as a baby-Perl implementation, as overall its functionality is quite simple, and it uses very little of the language (especially since its use of junctions was removed a few weeks ago). Have a look at 01-sanity again. Since I moved 08-test out of that folder (and into 02-test-pm) none of those 01-sanity tests use Test.pm at all. My impression of 01-sanity is that it checks that the Perl 6 implementation has the basic language functions that Test.pm has as a prerequisite, such as being able to print, knowing basic conditionals, supporting basic subroutines and modules. If 01-sanity runs, then the normal Test.pm should be useable, and 02-test-pm checks that Test.pm itself actually works. When that runs, then the other tests can be performed as usual. The first obvious question that this enumeration presents is: where to I would say for starters that anything which is written in Perl 6 will be shared by all implementations, and that includes Test.pm. Considering its few needs, any Perl that can't run the current Test.pm is hardly useful, so they would be getting up to the level of supporting Test.pm very quickly. And in the process of getting to that level, the 01-sanity tests can be tried without Test.pm. The other question that comes to mind is how to manage SKIP and TODO All unconditional skips/todos in the test suite should be eliminated entirely, and be allowed to fail. If hangs are a concern, then the test harness (presumably not written in Perl 6) can just have a timeout function and kill any tests that run for too long (the time threshold can be changed per user in config.yml). The proper way to have skips/todos is for them to be conditional. Ideally, one of the first things that any Perl 6 implementation would provide is something akin to a %FEATURES (or some other named) global or environmental or config variable, which a Perl 6 script can query at runtime to see whether that implementation CLAIMS to support certain features. Only features that are claimed to be supported are tested, to yield a ok/not ok, and only those features claimed to be unsupported, either explicitly, or implicity by not being mentioned at all, will be skipped. A brand new Perl 6 implementation will declare an empty %FEATURES, meaning that everything is unsupported, and so everything conditional skips (which would be most tests, ideally). As the implementation matures, it starts adding items to %FEATURES, and so skips are replaced by passes or fails. Of course, certain sanity items will have to work before %FEATURES does, such as the ability to print, basic conditionals and boolean expressions, the ability to read from a variable, etc. But no support for subroutines or external modules will be needed in order to do this, so the threshold is lower than for any type of Test.pm. The %FEATURES variable would be populated in the logical fashion, derived partly or entirely from explicit declarations in the implementation code itself, and partly or not at all from user configuration or environment as is applicable. Entirely from code may be better so that this doesn't make the CONFIG or ENV or whatever vars redundant, or they could possibly overlap as makes sense, but my emphasis is on the code. If we are going to go with this idea, and I give it my highest level of recommendation, it would stand to reason that the possible features to be tested for will be standardized and documented such as in a Synopsis. I could start enumerating such a list if no one else wants to, but it would be long and would stand for a thought out design, like the tests themselves. More broadly speaking, I think that a revisiting of the test hierarchy with a goal to it being able to scale better (see TASKS of Pugs), and a capabilities/features list could be done somewhat hand in hand. Features that tend to be implemented together can also be grouped together for testing, and tests could be grouped generally in dependency order, such that if feature A needs to be implemented before feature B can be implemented, feature A will be tested first. A trivial case of such organizing has started with 01-sanity and 02-test-pm being checked first, but that's as far as it goes so far. As a Pugs hacker I can say that the immediacy of access to t/ is a From the point of view of a *user* of Perl 6, one that gets it from CPAN, getting this to work is just a matter of packing the tests in such a way that they can be "installed" some how and be visible to the packages for Pugs or v6 or whatever. This may require something unusual, because afaik, only "modules" typically get installed and become visible to other packages, while test scripts don't. (I get around this perceived limitation with Rosetta by implementing all the backend-shared tests as Rosetta::Validator::* modules, which install with the framework and can be invoked like a module. But I don't know if something like that is feasible for a general Perl 6 test, so something else may be required.) As for hackers working from version control, where immediacy of access to and seamless integration of updates of otherwise separately distributed components is important, I don't know exactly what to suggest as a solution but perhaps something that lets you checkout multiple SVN into a shared space where the pieces can see each other as if they were one big distro, and you can just test how the parts work together naturally. I don't know how to implement this, though. As you can see, there are possibly wider and wider scopes of problems to I think it is very important to share whatever resources can be shared, for easier development and better quality results. If this causes a few hiccups short term, like test fails rather than skips, or all tests temporarily skipping, I think it is still worth it. -- Darren Duncan
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [ANNOUNCE] Pugs 6.2.12 and v6.pm released! (reformatted), Audery Tang |
|---|---|
| Next by Date: | Re: I'm pre-hackathoning at OSCON, not post-hackathoning, Darren Duncan |
| Previous by Thread: | Re: making v6 test suite its own distro, Gaal Yahas |
| Next by Thread: | Re: making v6 test suite its own distro, Gaal Yahas |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |