Inca::Reporter::GlobusUnit - Convenience module for creating simple unit reporters that submit a test via globus
use Inca::Reporter::GlobusUnit;
my $reporter = new Inca::Reporter::GlobusUnit(
name => 'Reporter Name',
version => 0.1,
description => 'A really helpful reporter description',
url => 'http://url.to.more.reporter.info'
unit_name => 'What this reporter tests'
);
This module is a subclass of Inca::Reporter::SimpleUnit which provides convenience methods for submitting a unit test via globus.
Class constructor which returns a new GlobusUnit object. See Inca::Reporter::SimpleUnit for parameters.
Submit a small C program to execute via a local GRAM. In addition to the parameters recognized by submitJob, the required $attrs{code} specifies the source to compile.
Submit a job to execute a command via Globus. Recognized parameters:
arguments to pass to executable; default ''
poll job for completion every this many seconds; default 30
remove temporary files after run; default true
number of hosts to use; default 1
log the submision command and the result with -dumprsl; default false
add (resourceManagerContact=xx) to rsl; default false
the program to run; required
environment variable to set; default ''
host where run takes place; default localhost
execute as an MPI program; default false
name of batch queue to submit job to; default none
executable is already on the jobmanager resource; default 1
the Globus service to invoke; default to Globus default
kill the job and report an error after this many seconds; default 3600 (1 hr)
my $reporter = new Inca::Reporter::GlobusUnit(
name => 'Globus hello',
version => 1,
description => 'Verifies local Globus exec of hello world',
url => 'http://www.globus.org',
unit_name => 'Globus hello'
);
my ($output, $err) = $reporter->submitCSource(
code =>
"#include <stdio.h>
int main() {
printf(\"Hello world\\n\");
return 0;
}
"
);
if(!defined($output) || $output !~ /Hello/) {
$reporter->unitFailure
("test failed" . (defined($err) ? ": $err" : ''));
} else {
$reporter->unitSuccess();
}
$reporter->print();
Shava Smallen <ssmallen@sdsc.edu>