Changeset 28005

Show
Ignore:
Timestamp:
08.08.2013 16:20:31 (6 years ago)
Author:
ak19
Message:

1. task.pl summarise cmd now prints out whether the diffcol result is success or failure (previously it would only do this on the upload cmd) 2. Another gdb field had double windows backslashes that got turned into double forward slashes for the MARC-Exploded collection, which need to be single forward slashes when normalising for comparing with the linux version of the gdb file contents.

Location:
other-projects/nightly-tasks/diffcol/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm

    r27969 r28005  
    6060 
    6161#   my $savepath = &getcwd."/../"; # TASK_HOME env var does not exist at this stage, but it's one level up from current directory 
    62 #   print_string_to_file($test_text, $savepath.$dbname."_test.out");     
    63 #   print_string_to_file($model_text, $savepath.$dbname."_model.out"); 
     62#   print_string_to_file($test_text, $savepath.$dbname."_test.out1");    
     63#   print_string_to_file($model_text, $savepath.$dbname."_model.out1"); 
    6464 
    6565    # filter out the fields that can be ignored in the two database files 
     
    136136            my $tmp = ""; # rebuild windows file's set of lines after processing them one by one 
    137137            for my $line (split /^/, $$win_text) { # split the string into newlines 
    138                  
    139                 if($line =~ m@^<ex.File.Directory>(.*)@s) { # word-pdf collection contains double windows backslashes 
    140                     (my $escaped_path = $1) =~ s@\\\\@\\@g;              
    141                     $line = "<ex.File.Directory>$escaped_path"; 
     138             
     139                # In the following regex, add any .gdb fieldnames that represent a path and so would contain double backslashes  
     140                # on Windows (to escape the single backlash of win filepaths). They will be turned into single-backslashes here,  
     141                # and converted into single forward slashes futher below when the txt version of the win gdb file is normalised  
     142                # to compare it with the linux version.  
     143                # E.g. On windows, the Word-PDF collection(s) contains double backslashes in the ex.File.Directory field 
     144                # the MARC-Exploded collection contains double backslashes in the null_file entry field of the .gdb file                 
     145                if($line =~ m@^<(ex.File.Directory|null_file)>(.*)@s) { 
     146                    my ($fieldname, $escaped_path) = ($1, $2); 
     147                    $escaped_path =~ s@\\\\@\\@g; #(my $escaped_path = $2) =~ s@\\\\@\\@g; 
     148                    $line = "<$fieldname>$escaped_path"; 
    142149                }  
    143150                elsif($line =~ m@^<Title>(.*)@s) { 
  • other-projects/nightly-tasks/diffcol/trunk/task.pl

    r27994 r28005  
    285285        } 
    286286 
    287         # need to set imagemagick and ghostscript binaries to executable 
     287        # the imagemagick and ghostscript binaries have been set to executable on svn trac now 
    288288#       system("chmod -R u+x $ENV{'DATA_DIR'}/$gsdl/bin/darwin/imagemagick/bin/*"); 
    289289#       system("chmod -R u+x $ENV{'DATA_DIR'}/$gsdl/bin/darwin/ghostscript/bin/*"); 
     
    474474    next if ($collection eq "." || $collection eq ".."); 
    475475    next if ($collection eq "modelcol"); 
    476 #   next if ($collection ne "Enhanced-PDF"); ## TEMPORARY, FOR TESTING THIS SCRIPT 
     476#   next if ($collection ne "Section-Tagging"); ## TEMPORARY, FOR TESTING THIS SCRIPT 
     477#   next if ($collection !~ m/MARC/); ## TEMPORARY, FOR TESTING THIS SCRIPT 
    477478 
    478479    #escape the filename (in case of space) 
     
    646647    $status = system($cmd); 
    647648    print STDERR "done\n"; 
     649     
     650    # Print whether the tests passed or failed                                                       
     651    print STDERR "*******************************************\n"; 
     652    print STDERR "Checking if successful... \n"; 
     653    $cmd = "java org.apache.xalan.xslt.Process -IN $xmlout -XSL $ENV{'TASK_HOME'}/xsl/passed-or-not.xsl";     
     654    $status = `$cmd`; #$status = system($cmd); 
     655    print STDERR "result: $status\n"; 
     656    print STDERR "*******************************************\n"; 
    648657} 
    649658