##// END OF EJS Templates
Update babmoo tools
Jani Honkonen -
r1979:1a95f90e0eef
parent child
Show More
@@ -1,119 +1,119
1
1
2 ; How to use
2 ; How to use
3 ; ----------
3 ; ----------
4 ; - Section name must match to "Job Name" in Bamboo.
4 ; - Section name must match to "Job Name" in Bamboo.
5 ; * See ${bamboo.buildPlanName} in bamboo.
5 ; * See ${bamboo.buildPlanName} in bamboo.
6 ; * Case sensitive.
6 ; * Case sensitive.
7 ; - The parameters given can be anything you need for that particular build.
7 ; - The parameters given can be anything you need for that particular build.
8 ; * Implement your special parameter handling in the perl scripts.
8 ; * Implement your special parameter handling in the perl scripts.
9
9
10
10
11 [Win7 MinGW debug QtC v4.8.0 (Jani's machine)]
11 [Win7 MinGW debug QtC v4.8.0 (Jani's machine)]
12 Platform=Win7
12 Platform=Win7
13 QtDir=D:\Qt\4.8.0-MinGW-Commercial
13 QtDir=D:\Qt\4.8.0-MinGW-Commercial
14 ToolChain=mingw
14 ToolChain=mingw
15 Config=debug
15 Config=debug
16 MinGWDir=D:\Qt\mingw
16 MinGWDir=D:\Qt\mingw
17
17
18 [Win7 MinGW release QtC v4.8.0 (Jani's machine)]
18 [Win7 MinGW release QtC v4.8.0 (Jani's machine)]
19 Platform=Win7
19 Platform=Win7
20 QtDir=D:\Qt\4.8.0-MinGW-Commercial
20 QtDir=D:\Qt\4.8.0-MinGW-Commercial
21 ToolChain=mingw
21 ToolChain=mingw
22 Config=release
22 Config=release
23 MinGWDir=D:\Qt\mingw
23 MinGWDir=D:\Qt\mingw
24
24
25 [Win7 vs2005 debug QtC v4.7.5 (Jani's machine)]
25 [Win7 vs2005 debug QtC v4.7.5 (Jani's machine)]
26 Platform=Win7
26 Platform=Win7
27 QtDir=D:\Qt\qt-win-commercial-4.7.5-vs2005
27 QtDir=D:\Qt\qt-win-commercial-4.7.5-vs2005
28 ToolChain=vs2005
28 ToolChain=vs2005
29 Config=debug
29 Config=debug
30
30
31 [Win7 vs2005 release QtC v4.7.5 (Jani's machine)]
31 [Win7 vs2005 release QtC v4.7.5 (Jani's machine)]
32 Platform=Win7
32 Platform=Win7
33 QtDir=D:\Qt\qt-win-commercial-4.7.5-vs2005
33 QtDir=D:\Qt\qt-win-commercial-4.7.5-vs2005
34 ToolChain=vs2005
34 ToolChain=vs2005
35 Config=release
35 Config=release
36
36
37 [Win7 vs2008 debug QtC v4.8.2 (Jani's machine)]
37 [Win7 vs2008 debug QtC v4.8.2 (Jani's machine)]
38 Platform=Win7
38 Platform=Win7
39 QtDir=D:\Qt\qt-win-commercial-4.8.2-vs2008-15-Apr-2012
39 QtDir=D:\Qt\qt-win-commercial-4.8.2
40 ToolChain=vs2008
40 ToolChain=vs2008
41 Config=debug
41 Config=debug
42
42
43 [Win7 vs2008 release QtC v4.8.2 (Jani's machine)]
43 [Win7 vs2008 release QtC v4.8.2 (Jani's machine)]
44 Platform=Win7
44 Platform=Win7
45 QtDir=D:\Qt\qt-win-commercial-4.8.2-vs2008-15-Apr-2012
45 QtDir=D:\Qt\qt-win-commercial-4.8.2
46 ToolChain=vs2008
46 ToolChain=vs2008
47 Config=release
47 Config=release
48
48
49 [Win7 vs2010 debug QtC v4.8.0 (Jani's machine)]
49 [Win7 vs2010 debug QtC v4.8.0 (Jani's machine)]
50 Platform=Win7
50 Platform=Win7
51 QtDir=D:\Qt\qt-win-commercial-4.8.0-vs2010
51 QtDir=D:\Qt\qt-win-commercial-4.8.0-vs2010
52 ToolChain=vs2010
52 ToolChain=vs2010
53 Config=debug
53 Config=debug
54
54
55 [Win7 vs2010 release QtC v4.8.0 (Jani's machine)]
55 [Win7 vs2010 release QtC v4.8.0 (Jani's machine)]
56 Platform=Win7
56 Platform=Win7
57 QtDir=D:\Qt\qt-win-commercial-4.8.0-vs2010
57 QtDir=D:\Qt\qt-win-commercial-4.8.0-vs2010
58 ToolChain=vs2010
58 ToolChain=vs2010
59 Config=release
59 Config=release
60
60
61 [Win7 vs2010-64bit debug QtC v4.8.1]
61 [Win7 vs2010-64bit debug QtC v4.8.1]
62 Platform=Win7
62 Platform=Win7
63 QtDir=C:\Qt\4.8.1
63 QtDir=C:\Qt\4.8.1
64 ToolChain=vs2010-64bit
64 ToolChain=vs2010-64bit
65 Config=debug
65 Config=debug
66
66
67 [Win7 vs2010-64bit release QtC v4.8.1]
67 [Win7 vs2010-64bit release QtC v4.8.1]
68 Platform=Win7
68 Platform=Win7
69 QtDir=C:\Qt\4.8.1
69 QtDir=C:\Qt\4.8.1
70 ToolChain=vs2010-64bit
70 ToolChain=vs2010-64bit
71 Config=release
71 Config=release
72
72
73 [Mac 10.7 Cocoa clang debug QtC v4.8.0 (Tero's iMac)]
73 [Mac 10.7 Cocoa clang debug QtC v4.8.0 (Tero's iMac)]
74 Platform=Mac
74 Platform=Mac
75 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc
75 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc
76 ToolChain=clang
76 ToolChain=clang
77 Config=debug
77 Config=debug
78
78
79 [Mac 10.7 Cocoa clang release QtC v4.8.0 (Tero's iMac)]
79 [Mac 10.7 Cocoa clang release QtC v4.8.0 (Tero's iMac)]
80 Platform=Mac
80 Platform=Mac
81 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc
81 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc
82 ToolChain=clang
82 ToolChain=clang
83 Config=release
83 Config=release
84
84
85 [Mac 10.7 Cocoa gcc debug QtC v4.8.0 (Tero's iMac)]
85 [Mac 10.7 Cocoa gcc debug QtC v4.8.0 (Tero's iMac)]
86 Platform=Mac
86 Platform=Mac
87 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc
87 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc
88 ToolChain=gcc
88 ToolChain=gcc
89 Config=debug
89 Config=debug
90
90
91 [Mac 10.7 Cocoa gcc release QtC v4.8.0 (Tero's iMac)]
91 [Mac 10.7 Cocoa gcc release QtC v4.8.0 (Tero's iMac)]
92 Platform=Mac
92 Platform=Mac
93 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc
93 QtDir=/Users/teahola/QtCommercialSdk/Desktop/480/cocoa_gcc
94 ToolChain=gcc
94 ToolChain=gcc
95 Config=release
95 Config=release
96
96
97 [Ubuntu 10.10 x86 debug QtC v4.8.1]
97 [Ubuntu 10.10 x86 debug QtC v4.8.1]
98 Platform=Linux
98 Platform=Linux
99 QtDir=/usr/local/Trolltech/Qt-4.8.1
99 QtDir=/usr/local/Trolltech/Qt-4.8.1
100 ToolChain=gcc
100 ToolChain=gcc
101 Config=debug
101 Config=debug
102
102
103 [Ubuntu 10.10 x86 release QtC v4.8.1]
103 [Ubuntu 10.10 x86 release QtC v4.8.1]
104 Platform=Linux
104 Platform=Linux
105 QtDir=/usr/local/Trolltech/Qt-4.8.1
105 QtDir=/usr/local/Trolltech/Qt-4.8.1
106 ToolChain=gcc
106 ToolChain=gcc
107 Config=release
107 Config=release
108
108
109 [Ubuntu 10.10 x86_64 debug QtC v4.8.1]
109 [Ubuntu 10.10 x86_64 debug QtC v4.8.1]
110 Platform=Linux
110 Platform=Linux
111 QtDir=/usr/local/Trolltech/Qt-4.8.1
111 QtDir=/usr/local/Trolltech/Qt-4.8.1
112 ToolChain=gcc
112 ToolChain=gcc
113 Config=debug
113 Config=debug
114
114
115 [Ubuntu 10.10 x86_64 release QtC v4.8.1]
115 [Ubuntu 10.10 x86_64 release QtC v4.8.1]
116 Platform=Linux
116 Platform=Linux
117 QtDir=/usr/local/Trolltech/Qt-4.8.1
117 QtDir=/usr/local/Trolltech/Qt-4.8.1
118 ToolChain=gcc
118 ToolChain=gcc
119 Config=release
119 Config=release
@@ -1,90 +1,90
1 use Cwd;
1 use Cwd;
2 use Cwd 'abs_path';
2 use Cwd 'abs_path';
3 use File::Basename;
3 use File::Basename;
4 use File::Copy;
4 use File::Copy;
5 use feature "switch";
5 use feature "switch";
6 use lib 'tools';
6 use lib 'tools';
7 use Jobs;
7 use Jobs;
8
8
9 # read command line params
9 # read command line params
10 my $jobname = shift;
10 my $jobname = shift;
11
11
12 # read ini file
12 # read ini file
13 my $inifile = File::Basename::dirname($0) . "/jobs.ini";
13 my $inifile = File::Basename::dirname($0) . "/jobs.ini";
14 my %job = Jobs::get($inifile, $jobname);
14 my %job = Jobs::get($inifile, $jobname);
15
15
16 # set/get paths
16 # set/get paths
17 my $root_path = abs_path();
17 my $root_path = abs_path();
18 my $bin_path = "$root_path/bin/";
18 my $bin_path = "$root_path/bin/" . $job{'Config'} . "/";
19 my $reports_path = "test-reports";
19 my $reports_path = "test-reports";
20
20
21 # create reports path
21 # create reports path
22 mkdir $reports_path;
22 mkdir $reports_path;
23
23
24 # setup environment for running tests
24 # setup environment for running tests
25 given ($job{'Platform'}) {
25 given ($job{'Platform'}) {
26
26
27 when ("Win7") {
27 when ("Win7") {
28 # Add qtdir to path
28 # Add qtdir to path
29 $ENV{'PATH'} .= ";" . $job{'QtDir'} . "\\bin";
29 $ENV{'PATH'} .= ";" . $job{'QtDir'} . "\\bin";
30
30
31 # replace / -> \
31 # replace / -> \
32 $ENV{'PATH'} =~ s/\//\\/g;
32 $ENV{'PATH'} =~ s/\//\\/g;
33 }
33 }
34
34
35 when ("Linux") {
35 when ("Linux") {
36 # Add qtdir to path
36 # Add qtdir to path
37 $ENV{'PATH'} = $job{'QtDir'} . "/bin:" . $ENV{'PATH'};
37 $ENV{'PATH'} = $job{'QtDir'} . "/bin:" . $ENV{'PATH'};
38
38
39 # If this is not set we get "cannot connect to X server" errors
39 # If this is not set we get "cannot connect to X server" errors
40 $ENV{'DISPLAY'} = ":0.0";
40 $ENV{'DISPLAY'} = ":0.0";
41 }
41 }
42 }
42 }
43
43
44 # Go through all the files in the test folder
44 # Go through all the files in the test folder
45 # autotest is an executable beginning with "tst_"
45 # autotest is an executable beginning with "tst_"
46 my $script_exit_status = 0;
46 my $script_exit_status = 0;
47 opendir (TESTAPPDIR, "$bin_path") or die "Couldn't open test app dir";
47 opendir (TESTAPPDIR, "$bin_path") or die "Couldn't open test app dir";
48 @files = <TESTAPPDIR>;
48 @files = <TESTAPPDIR>;
49 while ($testapp = readdir TESTAPPDIR) {
49 while ($testapp = readdir TESTAPPDIR) {
50 if (index($testapp, "tst_") == 0) {
50 if (index($testapp, "tst_") == 0) {
51 if (-x "$bin_path$testapp") {
51 if (-x "$bin_path$testapp") {
52 my $status = executeTestApp($testapp);
52 my $status = executeTestApp($testapp);
53 if ($status != 0) {
53 if ($status != 0) {
54 $script_exit_status = $status;
54 $script_exit_status = $status;
55 }
55 }
56 } else {
56 } else {
57 #print "file $testapp not executable\n";
57 #print "file $testapp not executable\n";
58 }
58 }
59 }
59 }
60 }
60 }
61 closedir TESTAPPDIR;
61 closedir TESTAPPDIR;
62
62
63 print "\n*** script exit status : $script_exit_status ***\n\n";
63 print "\n*** script exit status : $script_exit_status ***\n\n";
64 exit($script_exit_status);
64 exit($script_exit_status);
65
65
66
66
67 sub executeTestApp($) {
67 sub executeTestApp($) {
68 my $testapp = $_[0];
68 my $testapp = $_[0];
69
69
70 # On OSX the actual test binary is in a sub folder
70 # On OSX the actual test binary is in a sub folder
71 my $cmd_postfix = "";
71 my $cmd_postfix = "";
72 if ($^O eq "darwin") {
72 if ($^O eq "darwin") {
73 $cmd_postfix = "/Contents/MacOS/$testapp";
73 $cmd_postfix = "/Contents/MacOS/$testapp";
74 $cmd_postfix = substr($cmd_postfix, 0, rindex($cmd_postfix, ".app"));
74 $cmd_postfix = substr($cmd_postfix, 0, rindex($cmd_postfix, ".app"));
75 }
75 }
76
76
77 my $cmd = "$bin_path$testapp$cmd_postfix -xunitxml -o $reports_path/$testapp.xml";
77 my $cmd = "$bin_path$testapp$cmd_postfix -xunitxml -o $reports_path/$testapp.xml";
78 print "executing: $cmd\n";
78 print "executing: $cmd\n";
79 system($cmd);
79 system($cmd);
80
80
81 # From http://perldoc.perl.org/perlvar.html about $?:
81 # From http://perldoc.perl.org/perlvar.html about $?:
82 # The upper eight bits reflect specific error conditions encountered by the
82 # The upper eight bits reflect specific error conditions encountered by the
83 # program (the program's exit() value). The lower eight bits reflect
83 # program (the program's exit() value). The lower eight bits reflect
84 # mode of failure, like signal death and core dump information.
84 # mode of failure, like signal death and core dump information.
85 # See wait(2) for details.
85 # See wait(2) for details.
86 my $exit_status = $? >> 8;
86 my $exit_status = $? >> 8;
87 print "\texit status: $exit_status\n";
87 print "\texit status: $exit_status\n";
88
88
89 return $exit_status;
89 return $exit_status;
90 }
90 }
General Comments 0
You need to be logged in to leave comments. Login now