summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-12-02 16:29:52 +0100
committerKurt Zenker <kz@openoffice.org>2009-12-02 16:29:52 +0100
commit42a011084f59940484f0e2f58ec17bbc95625d76 (patch)
tree410a88ee5a887d93302bfe668208ce09a435760c
parentd8e19c2ae73999eb3cbb6e9d32e5b12fb0e524a3 (diff)
parent93c2ee07a4d3481bccb4203f7adb763b2497fd4e (diff)
CWS-TOOLING: integrate CWS rtspare01ooo/DEV300_m67
-rw-r--r--postprocess/checkdeliver/checkdeliver.pl64
-rw-r--r--postprocess/prj/build.lst1
2 files changed, 36 insertions, 29 deletions
diff --git a/postprocess/checkdeliver/checkdeliver.pl b/postprocess/checkdeliver/checkdeliver.pl
index f8c4561..2baec9d 100644
--- a/postprocess/checkdeliver/checkdeliver.pl
+++ b/postprocess/checkdeliver/checkdeliver.pl
@@ -41,15 +41,23 @@ use Getopt::Long;
use File::stat;
use IO::Handle;
+use lib ("$ENV{SOLARENV}/bin/modules");
+use SourceConfig;
+
#### globals #####
-my $err = 0;
-my $srcdir = '';
-my $solverdir = '';
-my $platform = '';
-my $milestoneext = '';
-my $local_env = 0;
-my @exceptionmodlist = ("postprocess", "instset.*native"); # modules not yet delivered
+my $err = 0;
+my $srcrootdir = '';
+my $solverdir = '';
+my $platform = '';
+my $milestoneext = '';
+my $local_env = 0;
+my $source_config = SourceConfig -> new();
+my @exceptionmodlist = (
+ "postprocess",
+ "instset.*native",
+ "smoketest.*native"
+ ); # modules not yet delivered
#### main #####
@@ -72,7 +80,7 @@ sub get_globals
# set global variables according to environnment
$platform = $ENV{INPATH};
- $srcdir = $ENV{SOLARSRC};
+ $srcrootdir = $ENV{SOURCE_ROOT_DIR};
$solverdir = $ENV{SOLARVERSION};
$milestoneext = $ENV{UPDMINOREXT};
@@ -86,11 +94,11 @@ sub get_globals
}
#do some sanity checks
- if ( ! ( $platform && $srcdir && $solverdir ) ) {
+ if ( ! ( $platform && $srcrootdir && $solverdir ) ) {
die "Error: please set environment\n";
}
- if ( ! -d $srcdir ) {
- die "Error: cannot find source directory '$srcdir'\n";
+ if ( ! -d $srcrootdir ) {
+ die "Error: cannot find source directory '$srcrootdir'\n";
}
if ( ! -d $solverdir ) {
die "Error: cannot find solver directory '$solverdir'\n";
@@ -144,7 +152,6 @@ sub check
my $error = 0;
my %delivered;
my $module;
- my $islinked = 0;
STDOUT->autoflush(1);
# which module are we checking?
if ( $listname =~ /\/([\w-]+?)\/deliver\.log$/o) {
@@ -153,27 +160,29 @@ sub check
print "Error: cannot determine module name from \'$listname\'\n";
return 1;
}
+ # where do we have to look for modules?
+ my $repository = $source_config->get_module_repository($module);
+ my $path = $source_config->get_module_path($module);
# is module physically accessible?
- my $canread = is_moduledirectory( $srcdir . '/' . $module );
+ # there are valid use cases where we build against a prebuild solver whithout having
+ # all modules at disk
+ my $canread = is_moduledirectory( $path );
if ( ! $canread ) {
# do not bother about non existing modules in local environment
- if ( $local_env ) {
- # print STDERR "Warning: local environment, module '$module' not found. Skipping.\n";
- return $error;
- }
- # on CWS modules not added can exist as links. For windows it may happen that these
- # links cannot be resolved (when working with nfs mounts). This prevents checking,
- # but is not an error.
- if ( $ENV{CWS_WORK_STAMP} ) {
+ # or on childworkspaces
+ if (( $local_env ) || ( $ENV{CWS_WORK_STAMP} )) {
# print STDERR "Warning: module '$module' not found. Skipping.\n";
return $error;
}
+ # in a master build it is considered an error to have deliver leftovers
+ # from non exising (removed) modules
print "Error: module '$module' not found.\n";
$error++;
return $error;
}
if ( $canread == 2 ) {
# module is linked and not built, no need for checking
+ # should not happen any more nowadays ...
return $error;
}
@@ -197,12 +206,8 @@ sub check
# compare all delivered files with their origin
# no strict 'diff' allowed here, as deliver may alter files (hedabu, strip, ...)
foreach my $file ( sort keys %delivered ) {
- my $ofile = "$srcdir/$file";
+ my $ofile = "$srcrootdir/$repository/$file";
my $sfile = "$solverdir/$delivered{$file}";
- # on CWS modules may exist as link only, named <module>.lnk
- if ( $islinked ) {
- $ofile =~ s/\/$module\//\/$module.lnk\//;
- }
if ( $milestoneext ) {
# deliver log files do not contain milestone extension on solver
$sfile =~ s/\/$platform\/(...)\//\/$platform\/$1$milestoneext\//;
@@ -210,6 +215,7 @@ sub check
my $orgfile_stats = stat($ofile);
next if ( -d _ ); # compare files, not directories
my $delivered_stats = lstat($sfile);
+ next if ( -d _ ); # compare files, not directories
if ( $^O !~ /^MSWin/ ) {
# windows does not know about links.
# Therefore lstat() is not a lstat, and the following check would break
@@ -263,13 +269,13 @@ sub check
sub is_moduledirectory
# Test whether we find a module having a d.lst file at a given path.
# Return value: 1: path is valid directory
-# 2: path.lnk is a valid link
+# 2: path.link is a valid link
# 0: module not found
{
my $dirname = shift;
if ( -e "$dirname/prj/d.lst" ) {
return 1;
- } elsif ( -e "$dirname.lnk/prj/d.lst" ) {
+ } elsif ( -e "$dirname.link/prj/d.lst" ) {
return 2
} else {
return 0;
@@ -281,7 +287,7 @@ sub usage
{
my $retval = shift;
print STDERR "Usage: checkdeliver.pl [-h] [-p <platform>]\n";
- print STDERR "Compares delivered files on solver with original ones on SRC_ROOT\n";
+ print STDERR "Compares delivered files on solver with original ones in build tree\n";
print STDERR "Options:\n";
print STDERR " -h print this usage message\n";
print STDERR " -p platform specify platform\n";
diff --git a/postprocess/prj/build.lst b/postprocess/prj/build.lst
index 4064e4b..c1ea332 100644
--- a/postprocess/prj/build.lst
+++ b/postprocess/prj/build.lst
@@ -1,6 +1,7 @@
po postprocess :: accessibility automation basctl bean fondu BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins sccomp scp2 scripting sd setup_native slideshow starmath sw sysui testshl2 testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity BITSTREAM_VERA_FONTS:bitstream_vera_fonts DICTIONARIES:dictionaries OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign SDEXT:sdext SWEXT:swext writerfilter oox NULL
po postprocess usr1 - all po_mkout NULL
po postprocess\checkxml nmake - all po_checkxml NULL
+po postprocess\checkdeliver nmake - all po_checkdlv NULL
po postprocess\packconfig nmake - all po_packconfig po_checkxml NULL
po postprocess\rebase nmake - w po_rebase NULL
po postprocess\signing nmake - w,sign po_signing po_rebase.w NULL