##// END OF EJS Templates
Add a script for running tests
Add a script for running tests

File last commit:

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