NAME
Tapper::Cmd::Testplan
SYNOPSIS
This project offers functions to add, delete or update testplan instances in the database.
use Tapper::Cmd::Testplan;
my $cmd = Tapper::Cmd::Testplan->new();
my $plan_id = $cmd->add($plan);
$cmd->update($plan_id, $new_plan);
$cmd->del($plan_id);
...
NAME
Tapper::Cmd::Testplan - Backend functions for manipluation of testplan instances in the database
FUNCTIONS
get_module_for_type
Get the name of the Tapper::Cmd module that is reponsible for a given type. The name of the module is optimized for the Tapper developer but the type given in the testplan should be telling for the testplan user.
@param string - type
@return string - name of the responsible module
add
Add a new testplan instance to database and create the associated testruns. The function expects a string containing the evaluated test plan content and a path.
@param string - plan content @param string - path @optparam string - name
@return int - testplan instance id
@throws die()
del
Delete testrun with given id from database. Please not that this does not remove the associated testruns.
@param int - testplan instance id
@return success - 0 @return error - exception
@throws die()
rerun
Reapply the evaluated testplan of the given testplan instance.
@param int - testplan instance id
@return success - new testplan id @return error - exception
@throws die()
parse_path
Get the test plan path from the filename. This is a little more tricky since we do not simply want the dirname but kind of an "un-prefix".
@param string - file name
@return string - test plan path
get_shortname
Get the shortname for this testplan. The shortname is either given as command line option or inside the plan text.
@param string - plan text @param string - value of $opt->{name}
@return string - shortname
testplannew
Create a testplan instance from a file.
apply_macro
Process macros and substitute using Template::Toolkit.
@param string - contains macros @param hashref - containing substitutions @optparam string - path to more include files
@return success - text with applied macros @return error - die with error string
AUTHOR
AMD OSRC Tapper Team <tapper@amd64.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Advanced Micro Devices, Inc..
This is free software, licensed under:
The (two-clause) FreeBSD License