Changeset f5128b8 in git


Ignore:
Timestamp:
Feb 12, 2009, 4:42:38 PM (14 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
dfd21411a39a507a93f99303b72f21a2030348f4
Parents:
3735d1567b97cc35de0aeae181e4401fcb3a6178
Message:
*motsak: support for gprof and better $root-related name handling with quotes for system commands


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

Legend:

Unmodified
Added
Removed
  • Tst/regress.cmd

    r3735d1 rf5128b8  
    22
    33#################################################################
    4 # $Id: regress.cmd,v 1.39 2004-02-12 13:00:24 Singular Exp $
     4# $Id: regress.cmd,v 1.40 2009-02-12 15:42:38 motsak Exp $
    55# FILE:    regress.cmd
    66# PURPOSE: Script which runs regress test of Singular
     
    192192
    193193  # prepare the result files:
    194   &mysystem("$cat $root.res | $tr -d '\\013' | $sed $sed_scripts > $root.res.cleaned");
    195   &mysystem("$cat $root.new.res | $tr -d '\\013' | $sed $sed_scripts > $root.new.res.cleaned");
     194  &mysystem("$cat \"$root.res\" | $tr -d '\\013' | $sed $sed_scripts > \"$root.res.cleaned\"");
     195  &mysystem("$cat \"$root.new.res\" | $tr -d '\\013' | $sed $sed_scripts > \"$root.new.res.cleaned\"");
    196196
    197197  # doo the diff call
    198   $exit_status = &mysystem("$diff -w -b $root.res.cleaned $root.new.res.cleaned > $root.diff 2>&1");
     198  $exit_status = &mysystem("$diff -w -b \"$root.res.cleaned\" \"$root.new.res.cleaned\" > \"$root.diff\" 2>&1");
    199199
    200200  # clean up time
    201   &mysystem("$rm -f $root.res.cleaned $root.new.res.cleaned");
     201  &mysystem("$rm -f \"$root.res.cleaned\" \"$root.new.res.cleaned\"");
    202202
    203203  # there seems to be a bug here somewhere: even if diff reported
     
    334334      close(NEW_RES_FILE);
    335335      close(TEMP_FILE);
    336       &mysystem("$rm $root.tmp.stat");
     336      &mysystem("$rm \"$root.tmp.stat\"");
    337337      return (1, "Can not find '$prefix >> $crit' in $root.stat\n");
    338338    }
     
    354354  close(NEW_RES_FILE);
    355355  close(TEMP_FILE);
    356   &mysystem("$mv -f $root.tmp.stat $root.stat");
    357   &mysystem("$rm -f $root.new.stat $root.stat.sdiff") unless $keep eq "yes";
     356  &mysystem("$mv -f \"$root.tmp.stat\" \"$root.stat\"");
     357  &mysystem("$rm -f \"$root.new.stat\" \"$root.stat.sdiff\"") unless $keep eq "yes";
    358358  return ;
    359359}
     
    386386    if ((-r "$root.res.gz.uu") && ! ( -z "$root.res.gz.uu"))
    387387    {
    388       $exit_status = &mysystem("$uudecode $root.res.gz.uu > /dev/null 2>&1; $gunzip -f $root.res.gz");
     388      $exit_status = &mysystem("$uudecode \"$root.res.gz.uu\" > /dev/null 2>&1; $gunzip -f \"$root.res.gz\"");
    389389      if ($exit_status)
    390390      {
     
    400400  }
    401401
    402   my $resfile = "$root.new.res";
    403   $resfile = "$root.mtrack.res" if (defined($mtrack));
     402  my $resfile = "\"$root.new.res\"";
     403  $resfile = "\"$root.mtrack.res\"" if (defined($mtrack));
    404404  my $statfile = "$root.new.stat";
    405   &mysystem("$rm -f $statfile");
     405  &mysystem("$rm -f \"$statfile\"");
    406406  if (defined($mtrack))
    407407  {
    408     $system_call = "$cat $root.tst | sed -e 's/\\\\\$/LIB \"general.lib\"; killall(); killall(\"proc\");kill killall;system(\"mtrack\", \"$root.mtrack.unused\", $mtrack); \\\$/' | $singular $singularOptions ";
     408    $system_call = "$cat \"$root.tst\" | sed -e 's/\\\\\$/LIB \"general.lib\"; killall(); killall(\"proc\");kill killall;system(\"mtrack\", \"$root.mtrack.unused\", $mtrack); \\\$/' | $singular $singularOptions ";
    409409    $system_call .= ($verbosity > 3 ? " | $tee " : " > ");
    410     $system_call .= "$root.mtrack.res";
     410    $system_call .= "\"$root.mtrack.res\"";
    411411    $system_call .= " 2>&1 " if ($verbosity <= 3);
    412412  }
     
    417417    if ($verbosity > 3 && !$WINNT)
    418418    {
    419       $system_call = "$cat $root.tst | $singular --execute 'string tst_status_file=\"$statfile\";' $singularOptions | $tee $resfile";
     419      $system_call = "$cat \"$root.tst\" | $singular --execute 'string tst_status_file=\"$statfile\";' $singularOptions | $tee $resfile";
    420420    }
    421421    else
    422422    {
    423       $system_call = "$cat $root.tst | $singular --execute 'string tst_status_file=\"$statfile\";' $singularOptions > $resfile 2>&1";
     423      $system_call = "$cat \"$root.tst\" | $singular --execute 'string tst_status_file=\"$statfile\";' $singularOptions > $resfile 2>&1";
    424424    }
    425425  }
     
    446446    elsif (! defined($mtrack) && !defined($timings_only))
    447447    {
    448       &mysystem("$rm -f $root.diff");
     448      &mysystem("$rm -f \"$root.diff\"");
    449449      if ($generate eq "yes")
    450450      {
    451         &mysystem("$cp $resfile $root.res");
     451        &mysystem("$cp $resfile \"$root.res\"");
    452452      }
    453453      else
     
    460460          {
    461461            print "\n";
    462             mysystem("$cat $root.diff");
     462            mysystem("$cat \"$root.diff\"");
    463463          }
    464464          $error_cause = "Differences in res files";
     
    466466        else
    467467        {
    468           &mysystem("$rm -f $root.diff");
     468          &mysystem("$rm -f \"$root.diff\"");
    469469        }
    470470      }
     
    472472  }
    473473
    474   mysystem("mv tst_status.out $statfile")
     474
     475
     476  mysystem("mv tst_status.out \"$statfile\"")
    475477    if (! -e $statfile && -e "tst_status.out");
    476478
     
    507509      if ($generate eq "yes")
    508510      {
    509         mysystem("$rm -f $root.stat") unless %merge;
     511        mysystem("$rm -f \"$root.stat\"") unless %merge;
    510512        ($exit_status, $error_cause) = tst_status_merge($root);
    511513        if (! $WINNT)
    512514        {
    513           &mysystem("$gzip -cf $root.res | $uuencode $root.res.gz > $root.res.gz.uu");
     515          &mysystem("$gzip -cf \"$root.res\" | $uuencode \"$root.res.gz\" > \"$root.res.gz.uu\"");
    514516        }
    515517        else
     
    529531    if ($keep ne "yes")
    530532    {
    531       &mysystem("$rm -f tst_status.out $resfile $root.res $root.diff $root.new.stat");
     533      &mysystem("$rm -f tst_status.out $resfile \"$root.res\" \"$root.diff\" \"$root.new.stat\"");
    532534    }
    533535  }
     
    546548  }
    547549  $total_checks_pass++ unless $exit_status;
     550
     551  mysystem("mv gmon.out \"gmon.$root.out\"")
     552    if (-e "gmon.out");
     553
    548554  return ($exit_status);
    549555}
Note: See TracChangeset for help on using the changeset viewer.