Created
November 25, 2009 16:27
-
-
Save dams/242842 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub do_tests { | |
my $self = shift; | |
my $tests = $self->find_test_files; | |
if(@$tests) { | |
my $args = $self->tap_harness_args; | |
if($self->use_tap_harness or ($args and %$args)) { | |
$self->run_tap_harness($tests); | |
} | |
else { | |
$self->run_test_harness($tests); | |
} | |
} | |
else { | |
$self->log_info("No tests defined.\n"); | |
} | |
$self->run_visual_script; | |
} | |
sub run_tap_harness { | |
my ($self, $tests) = @_; | |
require TAP::Harness; | |
# TODO allow the test @INC to be set via our API? | |
TAP::Harness->new({ | |
lib => [@INC], | |
verbosity => $self->{properties}{verbose}, | |
switches => [ $self->harness_switches ], | |
%{ $self->tap_harness_args }, | |
})->runtests(@$tests); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment