ooo-build r13402 - in trunk: . patches/dev300 patches/unittesting



Author: szalaik
Date: Sun Jul 27 08:37:46 2008
New Revision: 13402
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13402&view=rev

Log:
2008-07-29  Kalman Szalai - KAMI <kamihir freemail hu>

	* patches/dev300/apply
	* patches/unittesting/unittesting-build-pl.diff
	* patches/unittesting/unittesting-build-pl-m26.diff
	unittesting-build-pl.diff does not apply on dev300-m27 - fixed.



Added:
   trunk/patches/unittesting/unittesting-build-pl-m26.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/unittesting/unittesting-build-pl.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Sun Jul 27 08:37:46 2008
@@ -218,7 +218,7 @@
 
 # temporary hack to avoid the warning about missing return values in gcc4
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20624
-warning-return-values-stlport.diff, jholesov
+#warning-return-values-stlport.diff, jholesov
 
 # Fix linkoo, the ultimate hacker tool
 fix-linkoo.diff, i#83548, jholesov
@@ -2199,6 +2199,10 @@
 # FIXME: file more issuses when ready
 
 # teach build.pl what to do with prj/tests.lst's
+[ Store <= dev300-m26 ]
+unittesting-build-pl-m26.diff
+
+[ Store > dev300-m26 ]
 unittesting-build-pl.diff
 
 # the tests

Added: trunk/patches/unittesting/unittesting-build-pl-m26.diff
==============================================================================
--- (empty file)
+++ trunk/patches/unittesting/unittesting-build-pl-m26.diff	Sun Jul 27 08:37:46 2008
@@ -0,0 +1,101 @@
+--- solenv/bin/build.pl	2007-09-05 14:43:32.000000000 +0200
++++ solenv/bin/build.pl	2007-09-06 17:27:42.000000000 +0200
+@@ -194,6 +194,9 @@
+                             # the server considered as an error/client crash 
+     my %lost_client_jobs = (); # hash containing lost jobs
+     my %job_jobdir = (); # hash containing job-dir pairs
++
++    $unit_tests = 0;  # use tests.lst in addition to build.lst & build with 'dmake check' there - for unit testing
++    %unit_tests_dirs; # directories that should be built with 'dmake check'
+     
+ ### main ###
+ 
+@@ -494,21 +497,25 @@ sub dmake_dir {
+         };
+         RemoveFromDependencies($BuildDir, \%LocalDepsHash) if (!$child);
+         return if ($cmd_file || $show);
+-        $error_code = run_job($dmake, $BuildDir);
++        my $dmake_command = $dmake;
++        if ($unit_tests && exists $unit_tests_dirs{$BuildDir} && $unit_tests_dirs{$BuildDir}) {
++            $dmake_command .= " check";
++        }
++        $error_code = run_job($dmake_command, $BuildDir);
+ #        chdir $BuildDir;
+ #        getcwd();
+ #        if ($html) {
+ #            my $log_file = $jobs_hash{$BuildDir}->{LONG_LOG_PATH};
+ #            my $log_dir = File::Basename::dirname($log_file);
+ #            if (!-d $log_dir) {
+ #                 system("$perl $mkout");
+ #            };
+-#            $error_code = system ("$dmake > $log_file 2>&1");
++#            $error_code = system ("$dmake $dmake_check > $log_file 2>&1");
+ #            if (!$grab_output && -f $log_file) {
+ #                system("cat $log_file");
+ #            };
+ #        } else {
+-#            $error_code = system ("$dmake");
++#            $error_code = system ("$dmake $dmake_check");
+ #        };
+ 
+         html_store_job_info(\%LocalDepsHash, $BuildDir, $error_code) if (!$child);
+@@ -545,8 +552,27 @@ sub store_build_list_content {
+     } else {
+         if (open (BUILD_LST, $build_list_path)) {
+             my @build_lst = <BUILD_LST>;
+-            $build_lists_hash{$module} = \ build_lst;
+             close BUILD_LST;
++
++            # add the content of tests.lst to @build_lst if we are issued
++            # with 'check'
++            if ($unit_tests) {
++                (my $tests_path = $build_list_path ) =~ s/build\.lst$/tests.lst/;
++                if ($tests_path ne $build_list_path && open (TESTS_LST, $tests_path)) {
++                    while (<TESTS_LST>) {
++                        s/#.*//;
++                        next if (!/\snmake\s/);
++
++                        push @build_lst, $_;
++                        if (/^\s*\S+\s+(\S+)/ ) {
++                            $unit_tests_dirs{CorrectPath($StandDir . $1)} = 1;
++                        }
++                    }
++                    close TESTS_LST;
++                }
++            }
++
++            $build_lists_hash{$module} = \ build_lst;
+             return;
+         }
+         $dead_parents{$module}++;
+@@ -1236,6 +1262,7 @@ sub get_options {
+             push (@dmake_args, get_job_args()) if (!$custom_job);
+             next;
+         };
++        $arg =~ /^check$/       and $unit_tests = 1 and next; # it's a dmake target, but we strip it here to add it later
+         push (@dmake_args, $arg);
+     };
+     if (!$html) {
+@@ -1290,6 +1317,10 @@ sub get_job_args {
+     my @job_args = (); 
+     while ($arg = shift @ARGV) {
+         next if ($arg =~ /^--$/);
++        if ($arg =~ /^check$/) {
++            $unit_tests = 1;
++            next; # it's a dmake target, but we strip it here to add it later
++        }
+         push (@job_args, $arg);
+     };
+     return @job_args;
+--- solenv/inc/target.mk	18 Jul 2007 08:01:14 -0000	1.201
++++ solenv/inc/target.mk	6 Sep 2007 20:44:31 -0000
+@@ -2076,3 +2076,9 @@ $(SUBDIRS) .PHONY :
+ # as an escaped "#". if it was an assignment, escaping works...
+ some_unique_variable_name:=1
+ 
++# ---------
++# - CHECK -
++# ---------
++# can be redefined in the makefiles to issue the real tests
++
++check: ALLTAR

Modified: trunk/patches/unittesting/unittesting-build-pl.diff
==============================================================================
--- trunk/patches/unittesting/unittesting-build-pl.diff	(original)
+++ trunk/patches/unittesting/unittesting-build-pl.diff	Sun Jul 27 08:37:46 2008
@@ -89,10 +89,11 @@
      return @job_args;
 --- solenv/inc/target.mk	18 Jul 2007 08:01:14 -0000	1.201
 +++ solenv/inc/target.mk	6 Sep 2007 20:44:31 -0000
-@@ -2076,3 +2076,9 @@ $(SUBDIRS) .PHONY :
+@@ -2076,3 +2076,10 @@ $(SUBDIRS) .PHONY :
+ # if the previous block was a rule or a target, "\#" isn't recognized
  # as an escaped "#". if it was an assignment, escaping works...
  some_unique_variable_name:=1
- 
++
 +# ---------
 +# - CHECK -
 +# ---------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]