Changeset 9a50a2 in git for Tst/regress.cmd


Ignore:
Timestamp:
Oct 22, 1999, 1:12:50 PM (25 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'b324714bf5073469800caef737deba1366fbd81f')
Children:
4779934d50b14b0a5161605c33419f8b20bf441d
Parents:
928efb07b9136e43d71d0fc54a77ded832a005be
Message:
* option -t which generates $root.matrack.unused and does not check
  correctness


git-svn-id: file:///usr/local/Singular/svn/trunk@3766 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Tst/regress.cmd

    r928efb r9a50a2  
    22
    33#################################################################
    4 # $Id: regress.cmd,v 1.27 1999-09-27 11:06:29 obachman Exp $
     4# $Id: regress.cmd,v 1.28 1999-10-22 11:12:50 obachman Exp $
    55# FILE:    regress.cmd
    66# PURPOSE: Script which runs regress test of Singular
     
    2525  [-e [crit%[val]]] -- throw error if status difference [of crit] > val (in %)
    2626  [-m [crit]]       -- merge status results [of crit] into result file
     27  [-t]              -- compute and call mtrack at the end, no diffs
    2728  [file.lst]        -- read tst files from file.lst
    2829  [file.tst]        -- test Singular script file.tst
     
    329330
    330331  # generate $root.res
    331   if ($generate ne "yes")
     332  if ($generate ne "yes" && ! $mtrack)
    332333  {
    333334    if ((-r "$root.res.gz.uu") && ! ( -z "$root.res.gz.uu"))
     
    347348  }
    348349
    349   # prepare Singular run
    350350  &mysystem("$rm -f tst_status.out");
    351   if ($verbosity > 2 && !$WINNT)
    352   {
    353     $system_call = "$cat $root.tst | $singular $singularOptions | $tee $root.new.res";
     351  my $resfile = "$root.new.res";
     352  $resfile = "$root.mtrack.res" if ($mtrack);
     353 
     354  if ($mtrack)
     355  {
     356    $system_call = "$cat $root.tst | sed -e 's/\\\\\$/LIB \"general.lib\"; killall(); killall(\"proc\");system(\"mtrack\", \"$root.mtrack.unused\"); \\\$/' | $singular $singularOptions ";
     357    $system_call .= ($verbosity > 2 ? " | $tee " : " > ");
     358    $system_call .= "$root.mtrack.res";
     359    $system_call .= " 2>&1 " if ($verbosity <= 2);
    354360  }
    355361  else
    356362  {
    357     $system_call = "$cat $root.tst | $singular $singularOptions > $root.new.res 2>&1";
     363    # prepare Singular run
     364    if ($verbosity > 2 && !$WINNT)
     365    {
     366      $system_call = "$cat $root.tst | $singular $singularOptions | $tee $resfile";
     367    }
     368    else
     369    {
     370      $system_call = "$cat $root.tst | $singular $singularOptions > $resfile 2>&1";
     371    }
    358372  }
    359373  # Go Singular, Go!
     
    367381  {
    368382    # check for Segment fault in res file
    369     $exit_status = ! (&mysystem("$grep \"Segment fault\" $root.new.res > /dev/null 2>&1"));
     383    $exit_status = ! (&mysystem("$grep \"Segment fault\" $resfile > /dev/null 2>&1"));
    370384
    371385    if ($exit_status)
     
    373387      $error_cause = "Segment fault";
    374388    }
    375     else
     389    elsif (! $mtrack)
    376390    {
    377391      &mysystem("$rm -f $root.diff");
    378392      if ($generate eq "yes")
    379393      {
    380         &mysystem("$cp $root.new.res $root.res");
     394        &mysystem("$cp $resfile $root.res");
    381395      }
    382396      else
     
    396410  }
    397411
    398   if (%checks && ! $exit_status && $generate ne "yes")
     412  if (%checks && ! $exit_status && $generate ne "yes" && ! $mtrack)
    399413  {
    400414    & mysystem("$cp tst_status.out $root.new.stat");
     
    411425  else
    412426  {
    413 
    414     #clean up
    415     if ($generate eq "yes")
    416     {
    417       & mysystem("$cp tst_status.out $root.stat");
    418       if (! $WINNT)
    419       {
    420         &mysystem("$gzip -cf $root.res | $uuencode $root.res.gz > $root.res.gz.uu");
    421       }
    422       else
    423       {
    424         # uuencode is broken under windows
    425         print "Warning: Can not generate $root.res.gz.uu under Windows\n";
    426       }
    427 
    428     }
    429     elsif (%merge)
    430     {
    431       if (! -r "$root.stat")
    432       {
    433         & mysystem("$cp tst_status.out $root.stat");
    434       }
    435       else
    436       {
    437         & mysystem("$cp tst_status.out $root.new.stat");
    438         ($exit_status, $error_cause) = & tst_status_merge($root);
    439 
    440         print (STDERR "Warning: Merge Problems: $error_cause\n")
    441           if ($verbosity > 0 && $exit_status);
    442       }
    443     }
    444 
     427    unless ($mtrack)
     428    {
     429      #clean up
     430      if ($generate eq "yes")
     431      {
     432        & mysystem("$cp tst_status.out $root.stat");
     433        if (! $WINNT)
     434        {
     435          &mysystem("$gzip -cf $root.res | $uuencode $root.res.gz > $root.res.gz.uu");
     436        }
     437        else
     438        {
     439          # uuencode is broken under windows
     440          print "Warning: Can not generate $root.res.gz.uu under Windows\n";
     441        }
     442       
     443      }
     444      elsif (%merge)
     445      {
     446        if (! -r "$root.stat")
     447        {
     448          & mysystem("$cp tst_status.out $root.stat");
     449        }
     450        else
     451        {
     452          & mysystem("$cp tst_status.out $root.new.stat");
     453          ($exit_status, $error_cause) = & tst_status_merge($root);
     454         
     455          print (STDERR "Warning: Merge Problems: $error_cause\n")
     456            if ($verbosity > 0 && $exit_status);
     457        }
     458      }
     459    }
    445460    if ($keep ne "yes")
    446461    {
    447       &mysystem("$rm -f tst_status.out $root.new.res $root.res $root.diff $root.new.stat");
    448     }
    449   }
    450 
     462      &mysystem("$rm -f tst_status.out $resfile $root.res $root.diff $root.new.stat");
     463    }
     464  }
    451465  # und tschuess
    452466  return ($exit_status);
     
    482496  {
    483497    $verbosity = shift;
     498  }
     499  elsif(/^-t$/)
     500  {
     501    $mtrack = 1;
    484502  }
    485503  elsif(/^-r$/)
     
    659677        $tst_base = $_;
    660678      }
    661 
     679      $tst_base =~ s/^\s*//;
     680      $tst_base =~ s/(.*?)\s+.*/$1/;
    662681      $exit_code = &tst_check($tst_base) || $exit_code;
    663682
Note: See TracChangeset for help on using the changeset viewer.