Ignore:
Timestamp:
2013-08-27T21:03:55+12:00 (11 years ago)
Author:
ak19
Message:

task.pl now takes a model_os param as argument to the run_test command and passes in the test_OS and model_OS variables to diffcol.pl. These specify on what Operating System the model collections were built and what the current OS is, on which the test collections will be built when the tests are run and diffed. This will provide a more foolproof way for diffcol to work out on what OS the model collection was generated and what the current OS is (or what OS task.pl chooses to specify as the current OS for test collections).

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

Legend:

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

    r28107 r28172  
    4848
    4949#--Global Variables Declaration-----------
     50my ($gv_test_os, $gv_model_os); # still just file globals
     51
    5052$gv_strModelColRoot = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'},"/model-collect");
    5153$gv_strTestColRoot = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'},"/collect");
     
    327329    {
    328330    #my $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb);
    329     $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb,$strColName);
     331    $strGdbError = gdbdiff::test_gdb($strModelGdb, $strTestGdb, $strColName,$gv_test_os, $gv_model_os);
    330332    if($strGdbError ne "")
    331333    {
     
    656658        # equalise/normalise the two doc.xml/docmets.xml files for OS differences, if there are any
    657659        # before comparing a windows test with a linux model or vice-versa
    658         my $testIsWin = &isDocOrMETSXMLFileWindows($test_contents);
    659         my $modelIsWin = &isDocOrMETSXMLFileWindows($model_contents);
     660        my $testIsWin = ($gv_test_os ne "compute") ? ($gv_test_os eq "windows") : &isDocOrMETSXMLFileWindows($test_contents);
     661        my $modelIsWin = ($gv_model_os ne "compute") ? ($gv_model_os eq "windows") : &isDocOrMETSXMLFileWindows($model_contents);
    660662       
    661663        if($testIsWin != $modelIsWin) { # one of the 2 collections is built on windows, the other on linux, so need to make newlines constant
     
    943945sub main
    944946{
    945     my ($intVerbosity,$strErrorStop,$strErrorShow,$strMode);
     947    my ($intVerbosity,$strErrorStop,$strErrorShow,$strMode,$test_os,$model_os);
    946948    my $strProgName = $0;
    947949    my $intArgc = scalar(@ARGV);
     
    953955        'verbosity/\d+/1', \$intVerbosity,
    954956        'mode/[\w\-]+/all', \$strMode,
    955         'output/[\w\-]+/text', \$strOutputFormat
     957        'output/[\w\-]+/text', \$strOutputFormat,
     958        'testos/(windows|linux|darwin|compute)/compute', \$test_os, # param-name,regex,default
     959        'modelos/(windows|linux|darwin|compute)/compute', \$model_os # actually defaults to linux in task.pl
    956960        )) {
    957961        PrintUsage($strProgName);
     
    963967        die "\n";
    964968    }
     969
     970    $gv_test_os = $test_os; # if not specified, defaults to "compute"
     971    $gv_model_os = $model_os; # tends to be linux
    965972
    966973    $gv_blnErrorStop = $strErrorStop;
  • other-projects/nightly-tasks/diffcol/trunk/diffcol/gdbdiff.pm

    r28086 r28172  
    4646sub test_gdb
    4747{
    48     my ($full_modeldb, $full_testdb,$strColName) = @_;
     48    my ($full_modeldb, $full_testdb, $strColName, $test_os, $model_os) = @_;
    4949
    5050   # print "Now is testing database\n";
     
    7878    # in test and model collection to an even base for comparison
    7979   
    80     my $testIsWin = &isDBWindowsSensitive($dbname, $test_text);
    81     my $modelIsWin = &isDBWindowsSensitive($dbname, $model_text);
     80    my $testIsWin = ($test_os ne "compute") ? ($test_os eq "windows") : &isDBWindowsSensitive($dbname, $test_text);
     81    my $modelIsWin = ($model_os ne "compute") ? ($model_os eq "windows") : &isDBWindowsSensitive($dbname, $model_text);
    8282   
    8383    if($testIsWin == $modelIsWin) {     
Note: See TracChangeset for help on using the changeset viewer.