Re: Speeding up long-running test suites

2007-11-25 Thread Ovid
--- A. Pagaltzis [EMAIL PROTECTED] wrote:

 * Ovid [EMAIL PROTECTED] [2007-11-23 18:30]:
  Test::Class can speed up your your tests by ensuring that perl
  and related modules are loaded only once. I was thinking about
  how this could be done with normal .t files
 
 http://search.cpan.org/dist/PPerl/ ?

That often fails to install and internally it forks, giving up much of
the performance benefit I want.

In the meantime, I've just uploaded a proof of concept named
Test::Aggregate because it attempts to take a bunch of tests and
aggregate them together.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/


test suite as CPAN module

2007-11-25 Thread Chris Dolan
I've been working on Test::Virtual::Filesystem for a couple of  
weeks.  It's a growing collection of interoperability tests that  
should pass for any typical filesystem.  I've been pondering its  
place in the CPANiverse and am interested in any insights others may  
have.


* Unlike most of the Test::* modules, this is not a tool for writing  
tests.  Instead, it is a suite of complete tests that should be  
applied to a filesystem.
* It tests conformance to an API instead of an implementation.  In  
this case, the API is the collection of core Perl filesystem functions.
* The distro tests itself against a known, stable filesystem (/tmp or  
the equivalent) but is intended to be  used to test less stable  
filesystems (like Fuse filesystems -- I use it for Fuse::PDF)


I searched CPAN (admittedly lightly) for any similar suites and  
didn't find anything else expressly designed for such a purpose.


Questions:
* Are there other CPAN-hosted, generic test suites that I overlooked?
* What other stable, popular APIs would benefit from a reusable test  
suite?
* Is it worth pushing others to write and use test suites like this,  
possibly replacing existing ad hoc tests (see, for example, the  
Fuse.pm .t files)


I came across some non-Perl generic test suites (filesystem and  
otherwise), but many were optimized for benchmarking rather than API  
completeness.  I've read about a few others, like the Neon webdav  
test suite, but again saw little to nothing in the Perl world quite  
like that.


A notable exception is the PUGS test suite, which fits in this  
category in that it's intended to work against any Perl 6  
implementation.  The controversial Java TCK lives in this space too.   
In fact, the strong separation of Interface from Class in the Java  
world pushes towards this style of testing more naturally than in Perl.


In general, it has occurred to me many times that writing good tests  
can be as hard as writing good code, but that we rarely reuse them,  
unlike our code itself.


Thoughts?

Chris


Re: UNIVERSAL::isa 1.00_00

2007-11-25 Thread David Cantrell
On Sat, Nov 24, 2007 at 05:38:13PM -0800, chromatic wrote:
 On Saturday 24 November 2007 17:31:04 Michael G Schwern wrote:
   I've just uploaded a new development version of UNIVERSAL::isa to the
   CPAN (1.00_00).
  Got a link which search.cpan catches up?
 http://wgz.org/chromatic/perl/UNIVERSAL-isa.tar.gz
 That's always a symlink to the latest released version, by the way.  (It works
 for all of my modules appropriately.)

Don't forget that to make CPAN.pm install a dev release (ie one with a _
in its name) then you need to tell it to install the distribution name
(CHROMATIC/UNIVERSAL-isa-1.00_00.tar.gz), because if you give it just a
module name it installs the latest *release* version.

Yeah, I know, you know this Schwern, but I'm sure some people here
don't.

-- 
David Cantrell | top google result for topless karaoke murders

Godliness is next to Englishness


Re: test suite as CPAN module

2007-11-25 Thread Andy Armstrong

On 25 Nov 2007, at 19:47, Chris Dolan wrote:

Questions:
* Are there other CPAN-hosted, generic test suites that I overlooked?



I believe Apache::Test[1] is a suite of tests for an Apache server. I  
guess that's conceptually pretty similar to what you're doing?


[1] http://search.cpan.org/dist/Apache-Test/

--
Andy Armstrong, Hexten






Re: test suite as CPAN module

2007-11-25 Thread Andy Armstrong

On 25 Nov 2007, at 20:02, Andy Armstrong wrote:
I believe Apache::Test[1] is a suite of tests for an Apache server.  
I guess that's conceptually pretty similar to what you're doing?


[1] http://search.cpan.org/dist/Apache-Test/



Actually it does something slightly different from what I thought it  
did. It lets you build a test suite to verify a particular Apache  
based application I believe. Thanks to Paul Johnson for the correction.


--
Andy Armstrong, Hexten






Re: test suite as CPAN module

2007-11-25 Thread David Cantrell
On Sun, Nov 25, 2007 at 01:47:58PM -0600, Chris Dolan wrote:

 I've been working on Test::Virtual::Filesystem for a couple of  
 weeks.  It's a growing collection of interoperability tests that  
 should pass for any typical filesystem.

Could it also be used for detecting what features a mounted filesystem
supports?

eg, does this filesystem support hard links and does this filesystem
support Unix-style permissions?  The hard bit is doing that while
taking into account mount options.  eg, on Mac OS X, you can mount a UFS
filesystem (which supports Unix-style perms) but tell the system to
ignore permissions altogether.  The *really* hard bit is to do that as
an unpriveleged user and without making any changes to the fs.

If so, then I can see immediate uses for it in a couple of my projects.

-- 
David Cantrell | A machine for turning tea into grumpiness

  You know you're getting old when you fancy the
  teenager's parent and ignore the teenager
-- Paul M in uknot