##// END OF EJS Templates
Remove extra "test" folder. Put all binaries in the bin.
Jani Honkonen -
r1137:696303b9edc0
parent child
Show More
@@ -14,16 +14,15 my %job = Jobs::get($inifile, $jobname);
14
14
15 # set/get paths
15 # set/get paths
16 my $root_path = abs_path();
16 my $root_path = abs_path();
17 my $test_path = "$root_path/bin/test/";
17 my $bin_path = "$root_path/bin/";
18 my $reports_path = "test-reports";
18 my $reports_path = "test-reports";
19
19
20 # create reports path
20 # create reports path
21 mkdir dirname($reports_path);
21 mkdir $reports_path;
22
22
23 # Windows specific magic
23 # Windows specific magic
24 if ($job{'Platform'} eq "Win7") {
24 if ($job{'Platform'} eq "Win7") {
25 $ENV{'PATH'} .= ";" . $job{'QtDir'} . "\\bin"; # Add qtdir to path
25 $ENV{'PATH'} .= ";" . $job{'QtDir'} . "\\bin"; # Add qtdir to path
26 $ENV{'PATH'} .= ";" . $root_path . "\\bin"; # Add charts bin to path
27 $ENV{'PATH'} =~ s/\//\\/g; # replace / -> \
26 $ENV{'PATH'} =~ s/\//\\/g; # replace / -> \
28 }
27 }
29
28
@@ -31,11 +30,11 my $script_exit_status = 0;
31
30
32 # Go through all the files in the test folder
31 # Go through all the files in the test folder
33 # autotest is an executable beginning with "tst_"
32 # autotest is an executable beginning with "tst_"
34 opendir (TESTAPPDIR, "$test_path") or die "Couldn't open test app dir";
33 opendir (TESTAPPDIR, "$bin_path") or die "Couldn't open test app dir";
35 @files = <TESTAPPDIR>;
34 @files = <TESTAPPDIR>;
36 while ($testapp = readdir TESTAPPDIR) {
35 while ($testapp = readdir TESTAPPDIR) {
37 if (index($testapp, "tst_") == 0) {
36 if (index($testapp, "tst_") == 0) {
38 if (-x "$test_path$testapp") {
37 if (-x "$bin_path$testapp") {
39 my $status = executeTestApp($testapp);
38 my $status = executeTestApp($testapp);
40 if ($status != 0) {
39 if ($status != 0) {
41 $script_exit_status = $status;
40 $script_exit_status = $status;
@@ -47,7 +46,7 while ($testapp = readdir TESTAPPDIR) {
47 }
46 }
48 closedir TESTAPPDIR;
47 closedir TESTAPPDIR;
49
48
50 print "\nscript exit status : $script_exit_status\n";
49 print "\n*** script exit status : $script_exit_status ***\n\n";
51 exit($script_exit_status);
50 exit($script_exit_status);
52
51
53 sub executeTestApp($) {
52 sub executeTestApp($) {
@@ -60,11 +59,17 sub executeTestApp($) {
60 $cmd_postfix = substr($cmd_postfix, 0, rindex($cmd_postfix, ".app"));
59 $cmd_postfix = substr($cmd_postfix, 0, rindex($cmd_postfix, ".app"));
61 }
60 }
62
61
63 my $cmd = "$test_path$testapp$cmd_postfix -xunitxml -o $reports_path/$testapp.xml";
62 my $cmd = "$bin_path$testapp$cmd_postfix -xunitxml -o $reports_path/$testapp.xml";
64 print "executing: $cmd\n";
63 print "executing: $cmd\n";
65 my $file_handle = system($cmd);
64 system($cmd);
65
66 # From http://perldoc.perl.org/perlvar.html about $?:
67 # The upper eight bits reflect specific error conditions encountered by the
68 # program (the program's exit() value). The lower eight bits reflect
69 # mode of failure, like signal death and core dump information.
70 # See wait(2) for details.
66 my $exit_status = $? >> 8;
71 my $exit_status = $? >> 8;
67 print "\texit status: $exit_status handle: $file_handle\n";
72 print "\texit status: $exit_status\n";
68
73
69 return $exit_status;
74 return $exit_status;
70 }
75 }
@@ -4,8 +4,8
4
4
5 TEMPLATE = app
5 TEMPLATE = app
6
6
7 DESTDIR = $$CHART_BUILD_BIN_DIR/test
7 DESTDIR = $$CHART_BUILD_BIN_DIR
8 OBJECTS_DIR = $$CHART_BUILD_DIR/test/$$TARGET
8 OBJECTS_DIR = $$CHART_BUILD_DIR/$$TARGET
9 MOC_DIR = $$CHART_BUILD_DIR/test/$$TARGET
9 MOC_DIR = $$CHART_BUILD_DIR/$$TARGET
10 UI_DIR = $$CHART_BUILD_DIR/test/$$TARGET
10 UI_DIR = $$CHART_BUILD_DIR/$$TARGET
11 RCC_DIR = $$CHART_BUILD_DIR/test/$$TARGET
11 RCC_DIR = $$CHART_BUILD_DIR/$$TARGET
General Comments 0
You need to be logged in to leave comments. Login now