Line 64... |
Line 64... |
############################################################################
|
############################################################################
|
Getopt::Long::config("require_order", "prefix=-");
|
Getopt::Long::config("require_order", "prefix=-");
|
GetOptions("h","help",
|
GetOptions("h","help",
|
"work_site=s" => \$work_site,
|
"work_site=s" => \$work_site,
|
"vendor=s" => \$vendor,
|
"vendor=s" => \$vendor,
|
"project=s" => \$project,
|
"library=s" => \$library,
|
"version=s" => \$version,
|
"version=s" => \$version,
|
"component=s" => \$component,
|
"component=s" => \$component,
|
) || die "(use '$program_name -h' for help)";
|
) || die "(use '$program_name -h' for help)";
|
|
|
|
|
Line 76... |
Line 76... |
|
|
##############################################################################
|
##############################################################################
|
## Help option
|
## Help option
|
##############################################################################
|
##############################################################################
|
if ( $opt_h or $opt_help )
|
if ( $opt_h or $opt_help )
|
{ print "\n build_coverage -work_site /work -vendor vendor_name -project project_name -component component_name -version version_name ";
|
{ print "\n build_coverage -work_site /work -vendor vendor_name -library library_name -component component_name -version version_name ";
|
print "\n";
|
print "\n";
|
exit 1;
|
exit 1;
|
}
|
}
|
|
|
|
|
Line 92... |
Line 92... |
#############################################################################
|
#############################################################################
|
|
|
|
|
|
|
my $home = cwd();
|
my $home = cwd();
|
my $prefix = "${work_site}/${vendor}__${project}";
|
my $prefix = "${work_site}/${vendor}__${library}";
|
|
|
print " Building Code Coverage and linting for $work_site $vendor $project $component $version \n" ;
|
print " Building Code Coverage and linting for $work_site $vendor $library $component $version \n" ;
|
|
|
|
|
my $parser = XML::LibXML->new();
|
my $parser = XML::LibXML->new();
|
|
|
|
|
my $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($vendor,$project,$component));
|
my $socgen_file = $parser->parse_file(yp::lib::find_componentConfiguration($vendor,$library,$component));
|
my $sim_library_path ;
|
my $sim_library_path ;
|
my $lib_comp_sep = yp::lib::find_lib_comp_sep($vendor,$project,$component);
|
my $lib_comp_sep = yp::lib::find_lib_comp_sep($vendor,$library,$component);
|
my $sim_comp_path = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:comp_path/text()")->to_literal;
|
my $sim_comp_path = $socgen_file->findnodes("//socgen:componentConfiguration/socgen:sim/socgen:comp_path/text()")->to_literal;
|
|
|
if ($sim_comp_path)
|
if ($sim_comp_path)
|
{
|
{
|
$sim_library_path ="${lib_comp_sep}${sim_comp_path}";
|
$sim_library_path ="${lib_comp_sep}${sim_comp_path}";
|
Line 143... |
Line 143... |
{
|
{
|
my($tool_name) = $i_name ->findnodes('./text()')->to_literal ;
|
my($tool_name) = $i_name ->findnodes('./text()')->to_literal ;
|
unless($tool_name eq "coverage") {$tool = $tool_name}
|
unless($tool_name eq "coverage") {$tool = $tool_name}
|
}
|
}
|
|
|
print "Code coverage directories for $tool $project - $component . ${version}. - $variant \n";
|
print "Code coverage directories for $tool $library - $component . ${version}. - $variant \n";
|
|
|
|
|
my $path = "${home}${work_site}/${vendor}__${project}${sim_library_path}/cov";
|
my $path = "${home}${work_site}/${vendor}__${library}${sim_library_path}/cov";
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
my $path = "${home}${work_site}/${vendor}__${project}${sim_library_path}/cov/${variant}";
|
my $path = "${home}${work_site}/${vendor}__${library}${sim_library_path}/cov/${variant}";
|
mkdir $path,0755 unless( -e $path );
|
mkdir $path,0755 unless( -e $path );
|
my $outfile ="${home}${work_site}/${vendor}__${project}${sim_library_path}/cov/${variant}/Makefile";
|
my $outfile ="${home}${work_site}/${vendor}__${library}${sim_library_path}/cov/${variant}/Makefile";
|
open MAKCOVFILE,">$outfile" or die "unable to open $outfile";
|
open MAKCOVFILE,">$outfile" or die "unable to open $outfile";
|
|
|
print MAKCOVFILE "SHELL=/bin/sh \n";
|
print MAKCOVFILE "SHELL=/bin/sh \n";
|
print MAKCOVFILE "MAKE=make \n";
|
print MAKCOVFILE "MAKE=make \n";
|
print MAKCOVFILE "comp=${variant} \n";
|
print MAKCOVFILE "comp=${variant} \n";
|