Changeset 29495


Ignore:
Timestamp:
11/28/14 21:01:27 (6 years ago)
Author:
ak19
Message:

Related to previous commit 29494 accidentally committed under sjs49 and which was prematurely committed. That commit and this one adds a debug flag to the run_test action of the diffcol task, that will store the intermediate debug files in the top level diffcol folder for inspection.

Location:
other-projects/nightly-tasks/diffcol/trunk
Files:
3 edited

Legend:

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

    r29448 r29495  
    5858}
    5959
     60$gv_blnDebugging = 0;
    6061$gv_blnErrorStop = "false";
    6162$gv_blnErrorShow = "false";
     
    334335    {
    335336    #my $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb);
    336     $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb, $strColName,$gv_test_os, $gv_model_os,$strTestCol,$strModelCol);
     337    $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb, $strColName,$gv_test_os, $gv_model_os,$strTestCol,$strModelCol, $gv_blnDebugging);
    337338    if($strGdbError ne "")
    338339    {
     
    435436        print "<error>usage incorrect</error>\n";
    436437    } else {
    437         print STDERR "Usage: $strProgName test-col [more-col] [-verbosity d] [-mode modes] [-eshow] [-estop]\n";
     438        print STDERR "Usage: $strProgName test-col [more-col] [-verbosity d] [-mode modes] [-eshow] [-estop] [-debug]\n";
    438439    }
    439440    Help("Error: used incorrect parameters");
     
    455456        'type' => "flag",
    456457        'argu' => "NULL" ,
    457         'descrip' => "Set then system will stop once it meet an error"},
     458        'descrip' => "Set then system will stop once it meets an error"},
    458459      { 'name' => "eshow",
    459460        'type' => "flag",
    460461        'argu' => "NULL" ,
    461         'descrip' => "Set then system will show the error summary"}
     462        'descrip' => "Set then system will show the error summary"},
     463      { 'name' => "debug",
     464        'type' => "flag",
     465        'argu' => "NULL" ,
     466        'descrip' => "If set, stores intermediate diff files in toplevel diffcol folder"}
    462467      ];
    463468   
     
    749754        } # finished special processing of doc.xml files
    750755       
    751         my $savepath = &getcwd."/../"; # TASK_HOME env var does not exist at this stage, but it's one level up from current directory       
    752 #       &gdbdiff::print_string_to_file($model_contents, $savepath."model_docmets.xml");
    753 #       &gdbdiff::print_string_to_file($test_contents, $savepath."test_docmets.xml");
    754 #       if($strModel =~ m/(HASH0164.dir)/) { # list the HASH dirs for which you want the doc.xml file generated, to inspect specific doc.xml files
    755 #       &gdbdiff::print_string_to_file($model_contents, $savepath."$1_model_doc.xml");
    756 #       &gdbdiff::print_string_to_file($test_contents, $savepath."$1_test_doc.xml");
    757 #       }
    758        
     756
     757        if($gv_blnDebugging) {# && $gv_intVerbosity > 0) {
     758            my $savepath = &getcwd."/../"; # TASK_HOME env var does not exist at this stage, but it's one level up from current directory       
     759            &gdbdiff::print_string_to_file($model_contents, $savepath."model_docmets.xml");
     760            &gdbdiff::print_string_to_file($test_contents, $savepath."test_docmets.xml");
     761#           if($strModel =~ m/(HASH0164.dir)/) { # list the HASH dirs for which you want the doc.xml file generated, to inspect specific doc.xml files
     762#           &gdbdiff::print_string_to_file($model_contents, $savepath."$1_model_doc.xml");
     763#           &gdbdiff::print_string_to_file($test_contents, $savepath."$1_test_doc.xml");
     764#           }
     765        }       
    759766
    760767       
     
    950957sub main
    951958{
    952     my ($intVerbosity,$strErrorStop,$strErrorShow,$strMode,$test_os,$model_os);
     959    my ($intVerbosity,$strErrorStop,$strErrorShow,$strMode,$test_os,$model_os,$debugging);
    953960    my $strProgName = $0;
    954961    my $intArgc = scalar(@ARGV);
     
    958965        'estop//off', \$strErrorStop,
    959966        'eshow//off', \$strErrorShow,
     967        'debug', \$debugging,
    960968        'verbosity/\d+/1', \$intVerbosity,
    961969        'mode/[\w\-]+/all', \$strMode,
     
    976984    $gv_model_os = $model_os; # tends to be linux
    977985
     986    $gv_blnDebugging = $debugging;
    978987    $gv_blnErrorStop = $strErrorStop;
    979988    $gv_blnErrorShow = $strErrorShow;
  • other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm

    r28661 r29495  
    7373sub test_gdb
    7474{
    75     my ($full_modeldb, $full_testdb, $strColName, $test_os, $model_os, $strTestCol, $strModelCol) = @_;
     75    my ($full_modeldb, $full_testdb, $strColName, $test_os, $model_os, $strTestCol, $strModelCol, $debugging) = @_;
    7676
    7777   # print "Now is testing database\n";
     
    8181    my $test_text = read_db($full_testdb);
    8282
    83 #   my $savepath = &getcwd."/../"; # TASK_HOME env var does not exist at this stage, but it's one level up from current directory
    84 #   print_string_to_file($test_text, $savepath.$dbname."_test.out1");   
    85 #   print_string_to_file($model_text, $savepath.$dbname."_model.out1");
     83    my $savepath = &getcwd."/../"; # TASK_HOME env var does not exist at this stage, but it's one level up from current directory
     84    if($debugging) {
     85    print_string_to_file($test_text, $savepath.$dbname."_test.out1");   
     86    print_string_to_file($model_text, $savepath.$dbname."_model.out1");
     87    }
    8688
    8789    # filter out the fields that can be ignored in the two database files
     
    270272    }   
    271273
    272     # now can go back to using $model_text and $test_text
    273 #   print_string_to_file($test_text, $savepath.$dbname."_test.out");   
    274 #   print_string_to_file($model_text, $savepath.$dbname."_model.out");
     274    # now can go back to using $model_text and $test_text
     275
     276    if($debugging) {
     277    print_string_to_file($test_text, $savepath.$dbname."_test.out");   
     278    print_string_to_file($model_text, $savepath.$dbname."_model.out");
     279    }
    275280   
    276281    my $report_type = "OldStyle"; # Can not change this type.
  • other-projects/nightly-tasks/diffcol/trunk/task.pl

    r29494 r29495  
    864864    my $debug_state = $debugging ? "-debug" : "";
    865865    $cmd = "diffcol.pl -testos $test_os -modelos $model_os -output xml -verbosity 10 $debug_state $collection"; # need to run with ./diffcol.pl if bash script
    866    
     866
     867    #print STDERR "Running diffcol cmd: $cmd\n";
    867868    &run_diff_script($cmd, $xml_fh, $diffcol_dir);
    868869
Note: See TracChangeset for help on using the changeset viewer.