##// END OF EJS Templates
run_tests.pl: return an error code if a test fails
run_tests.pl: return an error code if a test fails

File last commit:

r1134:c7e20df73286
r1136:f30cd375bd54
Show More
Jobs.pm
32 lines | 653 B | text/x-perl | PerlLexer
package Jobs;
use File::Basename;
use IniFiles;
sub get {
my $inifile = shift;
my $jobname = shift;
# Strip the prefix from job name when using ${bamboo.buildPlanName}
my $prefix = "Digia Qt Commercial - Chart component - ";
$jobname =~ s/$prefix//;
# read ini file
my %cfg;
tie %cfg, 'Config::IniFiles', ( -file => $inifile );
# get section from ini by jobname
my %job = %{$cfg{$jobname}};
if (!%job) {
die ("Unknown jobname! Check $inifile and bamboo job name.");
}
# print out the ini settings
print "\n\n$jobname\n";
print "**********\n";
foreach (keys %job) {
print $_ . " : " . $job{$_} . "\n";
}
return %job;
}
1;