Commit 8c3df0ce authored by Kevin Tew's avatar Kevin Tew

Jonathan fixes

parent 923f40a4
......@@ -108,6 +108,11 @@ sub checkexclude {
return grep { $_ eq $stage } @{ $TBConfig::exclude_steps };
}
sub failReason {
my $s = shift;
sprintf("FAILURE %s: %s", $s->e->eid, shift->error_type);
}
sub execute {
my $s = shift;
my $e = $s->e;
......@@ -194,6 +199,10 @@ and build the appropriate error_strategy object
builds a naked TestBed::ParallelRunner::Executor for testing purposes
=item C<< $prt->failReason($reason) >>
prints $eid and fail reason
=back
=cut
......
......@@ -82,7 +82,7 @@ sub echo { shift->augment_output( 'str' => shift ); }
sub getlist_brief { shift->augment( 'format' => 'brief'); }
sub getlist_full { shift->augment( 'format' => 'full' ); }
sub batchexp_ns { shift->augment_code( 'nsfilestr' => shift, 'noswapin' =>1, noemail, 'extrainfo' => 1, @_ ); }
sub modify_ns { shift->augment_code( 'nsfilestr' => shift, 'noswapin' =>1, noemail, 'extrainfo' => 1, @_ ); }
sub modify_ns { my ($e, $ns) = (shift, shift); my @args = @_; succeed_on_TIMEOUT { $e->augment_func_code( 'modify', 'nsfilestr' => $ns, 'noswapin' =>1, noemail, 'extrainfo' => 1, @args ); } $e->mkerrmsg('modify_ns'); }
sub swapin { my $e = shift; my @args = @_; retry_on_TIMEOUT { $e->augment_func_code( 'swapexp', noemail, 'direction' => 'in', 'extrainfo' => 1, @args ) } $e->mkerrmsg('swapin'); }
sub swapout { shift->augment_func_code( 'swapexp', noemail, 'direction' => 'out','extrainfo' => 1, @_ ); }
sub end { shift->augment_func_code( 'endexp', noemail); }
......@@ -100,7 +100,13 @@ sub create_and_get_metadata {
$self->metadata;
}
sub modify_ns_wait { shift->modify_ns(@_,'wait' => 1); }
sub modify_ns_wait { shift->modify_ns(@_, 'wait' => 1); }
sub modify_ns_swapin_wait {
my $s = shift;
$s->modify_ns(@_, 'wait' => 1);
$s->swapin_wait;
}
sub batchexp_ns_wait { shift->batchexp_ns(@_,'wait' => 1); }
use constant EXPERIMENT_NAME_ALREADY_TAKEN => 2;
......
#!/usr/bin/perl
BEGIN {
#add localcpan path to library search path
if (-f glob("~/lib/perl5/Test/Harness.pm")) {
my $localcpan_path = glob('~/lib/perl5');
my $p5l = $ENV{PERL5LIB};
unless ( (defined $p5l) && ($p5l =~ /$localcpan_path/)) {
my $sep = (defined $p5l) ? ":" : "";
$ENV { PERL5LIB} .= "$sep" . " $localcpan_path";
push @INC, $localcpan_path;
}
push @INC, $localcpan_path;
}
$ENV{PERL5LIB} .= ":tests";
}
use lib qw(lib tests);
use SemiModern::Perl;
use Data::Dumper;
use TBConfig;
use TestBed::Harness;
my $testfile = shift @ARGV;
runharness($testfile);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment