Ignore:
Timestamp:
2022-10-16T18:51:49+13:00 (20 months ago)
Author:
anupama
Message:

We used to run diffcol as a nightly task only for GS2. Commit 36655 was the first stage of getting diffcol to work for GS3, but skipped a lot of important code branches (like comparing the index\text\j/gdb files) in order to fix up the easier parts of the code. Now that I think the remainder of the diffcol scripts have been got to work with diffcol for GS3, where the index\text\flatdb files are compared and diffcol works for them, I can commit the important changes as well as commented out debugging statements made to the diffcol scripts that get the full diffcol code to work for GS3 diffcol. I will recommit again after removing the debugging statements. And I still need to do a full local diffcol run again, as well as testing if diffcol still works after locally undoing my sort field changes to some GS3 model cols (the recent commits to Tudor, Word-PDF, Images-GPS and Multimedia collections) to see if Dr Bainbridge's PERL_HASH_SEED env var addition fixes all of those collections diffcol failures, making the extra sorting redundant. In that case, I will recommit those model collections after updating their col configurations to not do the extra sorting.

File:
1 edited

Legend:

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

    r36655 r36807  
    196196    ## where the model-col needs to be built & committed from a Win machine),
    197197    ## need to comment out the following 3 newly added lines and fix any remaining issues
    198     if($ENV{'GSVERSION'} eq "3") {
    199         return @Errors;
    200     }
    201    
     198#   if($ENV{'GSVERSION'} eq "3") {
     199#       return @Errors;
     200#   }
     201  if($ENV{'GSVERSION'} eq "3") {
    202202    # Testing the build.cfg
    203203    my $strModelBcfg =  &FileUtils::filenameConcatenate($strModelCol,"index","build.cfg");
     
    310310
    311311    VobPrint ("\n",$intLevel);
    312    
     312  }
    313313    # Testing databases
    314314
    315315    # index
    316     my $strModelGdb =  &FileUtils::filenameConcatenate($strModelCol,"index","text","$strColName.gdb");
    317     my $strTestGdb =  &FileUtils::filenameConcatenate($strTestCol,"index","text","$strColName.gdb");   
     316    my $flat_db_ext = ".gdb";
     317   
     318    my $strModelGdb =  &FileUtils::filenameConcatenate($strModelCol,"index","text","$strColName$flat_db_ext");
     319    if(!(-e $strModelGdb)){ # try jdb
     320        $flat_db_ext = ".jdb";
     321        $strModelGdb =  &FileUtils::filenameConcatenate($strModelCol,"index","text","$strColName$flat_db_ext");
     322    }
     323   
     324    #print STDERR "*********** USING DB EXTENSION: $flat_db_ext\n";
     325    #print STDERR "@@@ PERL_PERTURB_KEYS: ".$ENV{'PERL_PERTURB_KEYS'}."\n";
     326   
     327    my $strTestGdb =  &FileUtils::filenameConcatenate($strTestCol,"index","text","$strColName$flat_db_ext");   
    318328    my $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName,$strTestCol,$strModelCol); # returns 0 if no error
    319329    if($strGdbError) {
     
    322332   
    323333    # archives
    324     $strModelGdb =  &FileUtils::filenameConcatenate($strModelCol,"archives","archiveinf-doc.gdb");
    325     $strTestGdb =  &FileUtils::filenameConcatenate($strTestCol,"archives","archiveinf-doc.gdb");   
     334    $strModelGdb =  &FileUtils::filenameConcatenate($strModelCol,"archives","archiveinf-doc$flat_db_ext");
     335    $strTestGdb =  &FileUtils::filenameConcatenate($strTestCol,"archives","archiveinf-doc$flat_db_ext");   
    326336    $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName,$strTestCol,$strModelCol);
    327337    if($strGdbError) {
     
    329339    }
    330340   
    331     $strModelGdb =  &FileUtils::filenameConcatenate($strModelCol,"archives","archiveinf-src.gdb");
    332         $strTestGdb =  &FileUtils::filenameConcatenate($strTestCol,"archives","archiveinf-src.gdb");
     341    $strModelGdb =  &FileUtils::filenameConcatenate($strModelCol,"archives","archiveinf-src$flat_db_ext");
     342        $strTestGdb =  &FileUtils::filenameConcatenate($strTestCol,"archives","archiveinf-src$flat_db_ext");
    333343        $strGdbError = &GdbDiff($strModelGdb,$strTestGdb,$strOutputFormat,$intLevel,$strColName,$strTestCol,$strModelCol);
    334344        if($strGdbError) {
     
    352362    {
    353363    #my $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb);
     364   
     365#   $gv_blnDebugging = 1;
     366   
    354367    $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb, $strColName,$gv_test_os, $gv_model_os,$strTestCol,$strModelCol, $gv_blnDebugging);
     368#   $gv_blnDebugging = 0;
     369   
    355370    if($strGdbError ne "")
    356371    {
     
    607622        # Files to be skipped because they get generated on one OS but not the other
    608623        # On windows, files of the form col.invf.state.\d\d\d\d get generated (e.g. Small-HTML.invf.state.1228) that aren't there on linux
    609         my $skipfiles_re = qr/(\.invf\.state\.\d+$)|~$|earliestDatestamp|fail\.log|-inf-tmp\.(gdb|jdb|lg)$/; # Create a regex of all files to be skipped, see http://perldoc.perl.org/perlop.html
     624        my $skipfiles_re = qr/(\.invf\.state\.\d+$)|~$|earliestDatestamp|fail\.log|oai-inf-tmp\.(gdb|jdb|lg)$/; # Create a regex of all files to be skipped, see http://perldoc.perl.org/perlop.html
    610625        @aryInModel = grep { $_ !~ m/$skipfiles_re/ } @aryInModel; # http://stackoverflow.com/questions/174292/what-is-the-best-way-to-delete-a-value-from-an-array-in-perl
    611626        @aryInTest = grep { $_ !~ m/$skipfiles_re/ } @aryInTest;
     
    10061021    $gv_test_os = $test_os; # if not specified, defaults to "compute"
    10071022    $gv_model_os = $model_os; # tends to be linux
     1023   
     1024    #print STDERR "@@@@@ test_os: $test_os\n";
     1025    #print STDERR "@@@@@ model_os: $model_os\n";
    10081026
    10091027    $gv_blnDebugging = $debugging;
Note: See TracChangeset for help on using the changeset viewer.