diff options
Diffstat (limited to 'postprocess/checkdeliver/checkdeliver.pl')
-rw-r--r-- | postprocess/checkdeliver/checkdeliver.pl | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/postprocess/checkdeliver/checkdeliver.pl b/postprocess/checkdeliver/checkdeliver.pl index e840da33b7cf..2baec9d0ef36 100644 --- a/postprocess/checkdeliver/checkdeliver.pl +++ b/postprocess/checkdeliver/checkdeliver.pl @@ -46,13 +46,18 @@ use SourceConfig; #### globals ##### -my $err = 0; -my $srcrootdir = ''; -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 ##### @@ -147,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) { @@ -156,31 +160,29 @@ sub check print "Error: cannot determine module name from \'$listname\'\n"; return 1; } - # where do we have to loog for modules? - my $source_config = SourceConfig -> new(); + # 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? + # 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; } @@ -206,10 +208,6 @@ sub check foreach my $file ( sort keys %delivered ) { my $ofile = "$srcrootdir/$repository/$file"; my $sfile = "$solverdir/$delivered{$file}"; - # on CWS modules may exist as link only, named <module>.link - if ( $islinked ) { - $ofile =~ s/\/$module\//\/$module.link\//; - } if ( $milestoneext ) { # deliver log files do not contain milestone extension on solver $sfile =~ s/\/$platform\/(...)\//\/$platform\/$1$milestoneext\//; @@ -217,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 @@ -288,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"; |