##// END OF EJS Templates
Fine tuning the auto test scripts
Fine tuning the auto test scripts

File last commit:

r1134:c7e20df73286
r1138:9ac9f1032801
Show More
build.pl
38 lines | 1.0 KiB | text/plain | PerlLexer
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 use File::Basename;
use feature "switch";
Jani Honkonen
Add a script for running tests
r1134 use lib 'test/scripts';
use Jobs;
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132
# read command line params
my $jobname = shift;
Jani Honkonen
Add a script for running tests
r1134 # get script directory
my $scriptdir = File::Basename::dirname($0);
Jani Honkonen
build.pl: remove prefix from from job name
r1133
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 # read ini file
my $inifile = $scriptdir . "/jobs.ini";
Jani Honkonen
Add a script for running tests
r1134 my %job = Jobs::get($inifile, $jobname);
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132
# examine the platform
Jani Honkonen
Add a script for running tests
r1134 given ($job{'Platform'}) {
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 when ("Win7") {
# construct a build command
my @cmd;
Jani Honkonen
Add a script for running tests
r1134 if ($job{'ToolChain'} eq "mingw") {
@cmd = ($scriptdir . "\\build_win_mingw.bat", $job{'QtDir'}, $job{'Config'}, $job{'MinGWDir'});
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
Jani Honkonen
Add a script for running tests
r1134 if ($job{'ToolChain'} eq "vs2005") {
@cmd = ($scriptdir . "\\build_win_vs2005.bat", $job{'QtDir'}, $job{'Config'});
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
Jani Honkonen
Add a script for running tests
r1134 if ($job{'ToolChain'} eq "vs2008") {
@cmd = ($scriptdir . "\\build_win_vs2008.bat", $job{'QtDir'}, $job{'Config'});
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
Jani Honkonen
Add a script for running tests
r1134 if ($job{'ToolChain'} eq "vs2010") {
@cmd = ($scriptdir . "\\build_win_vs2010.bat", $job{'QtDir'}, $job{'Config'});
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
# run the build command
system (@cmd) == 0 or die "system @cmd failed: $?";
}
default {
Jani Honkonen
Add a script for running tests
r1134 die "Unknown platform " . $job{'Platform'};
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
}