SmokeRunner::Multi::TestSet - Represents a set of tests
my $set = SmokeRunner::Multi::TestSet->new( set_dir => 'path/to/set' );
This class provides methods for getting information about a test set.
A test set is simple any directory that contains a subdirectory named "t", which in turn should contain one or more test files ending in ".t". It can also contain various other directories or files. In typical usage, this would be a checkout of an application or module.
This class provides the following methods:
This method creates a new test set object. It requires one parameter:
This should be a directory containing a subdirectory named "t".
Instead of simply returning an object of this class, the constructor looks at each test set subclass and tries to construct an object of the subclass's class. Subclasses will simply return if they cannot create an object. If no subclasses return an object, then the constructor will simply use this class (
SmokeRunner::Multi::TestSet) as the object's class.
This is the name of the directory containing the test set, without the full path. So if you create a set with the path /home/checkouts/branches/trunk, the name of the set would be "trunk".
This returns the path to the set directory, as passed to the constructor.
This returns the path to the "t" subdirectory in the set directory.
Returns the time of the last test run for this set. If it has never been run, the time will be 0.
Returns a boolean indicating whether the set has been prioritized.
Returns a sorted list of all the files in the set's
Returns the last modification time for the set. By default, this is simply the most recent last mod time for one of the test files, but subclasses may override this.
A convenience method which returns true if the last mod time of the set is greater than its last run time.
This returns the number of seconds by which the set is out of date. This number can be zero negative, in which case the set is not out of date, as the last run time is equal to or greater than the last mod time.
Updates the last run time of the set in the database.
This methods flip the
is_prioritized() flag for the set in the database.
By default, this method is a no-op, but subclasses can override it.
This method deletes the set from the database and from the filesystem.
This returns a sorted list of all the test sets under the root directory specified in the config file.
Sets are sorted first by whether or not they are prioritized, then by how out of date they are, and finally by name.
Dave Rolsky, <firstname.lastname@example.org>
Please report any bugs or feature requests to
email@example.com, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Copyright 2007 LiveText, Inc., All Rights Reserved.
This program is free software; you can redistribute it and /or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
This software is copyright (c) 2007 by LiveText, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.