Changeset cb13f0 in git


Ignore:
Timestamp:
Jun 30, 1998, 4:48:21 PM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b240fff7d1e54539abddf713f54ac34ffa1ec1fa
Parents:
e960fdfc67b70f59abfe61acd935550f509a386c
Message:
* bug fix


git-svn-id: file:///usr/local/Singular/svn/trunk@2263 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/tst.lib

    re960fdf rcb13f0  
    1 // $Id: tst.lib,v 1.8 1998-06-12 17:41:42 obachman Exp $
    2 //(obachman, last modified 2/13/98)
     1// $Id: tst.lib,v 1.9 1998-06-30 14:48:21 obachman Exp $
     2//(obachman, last modified 6/30/98)
    33/////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: tst.lib,v 1.8 1998-06-12 17:41:42 obachman Exp $";
     5version="$Id: tst.lib,v 1.9 1998-06-30 14:48:21 obachman Exp $";
    66info="
    77LIBRARY:  tst.lib      PROCEDURES FOR RUNNING AUTOMATIC TST TESTS
     
    1313 tst_init()             writes some identification data to stdout
    1414                        with tst_ignore
     15 tst_status([any])      writes status info to stdout with tst_ignore()
    1516 tst_groebnerTest(ideal i) 
    1617                        tests groebner command
     
    3233  errno = system("sh", s);
    3334  s = read(tmpfile);
    34   errno = system("sh", "rm " + tmpfile);
     35  errno = system("sh", "rm -f " + tmpfile);
    3536  return (s);
    3637}
     
    4647"USAGE:    tst_ignore(any,[keyword], [link])
    4748            any     -- valid argument to string()
    48             keyword -- one of \"time\" or \"memory\"
     49            keyword -- an arbitrary string
    4950            link    -- a link which can be written to
    5051RETURN:   none; writes string(any) to link (or stdout, if no link given),
    51           prepending prefix \"// ignore:\", or \"// ignore: time:\",
    52           \"//ignore: memory:\"  if called with the respective keywords;
    53           should be used in tst files to output system dependent data
    54           (like date, pathnames) { and timings With the keyword \"time\",
    55           resp. memory usage with the keyword \"memory\"
     52          prepending prefix \"// ignore:\", or
     53                            \"// ignore:keyword hostname:\",
     54                            if keyword was given.
     55          Should be used in tst files to output system dependent data
     56          (like date, pathnames).
    5657EXAMPLE:  example tst_ignore; shows examples
    5758"
     
    9596    return();
    9697  }
    97   if (keyword == "time" || keyword == "memory")
    98   {
    99     keyword = keyword + ": ";
    100   }
    101   else
    102   {
    103     if (keyword != "")
    104     {
    105       "Warning tst_ignore: keyword should be \"time\" or \"memory\"";
    106     }
    107   }
    10898
    10999  if (status(outlink, "open", "no"))
     
    111101    open(outlink);
    112102  }
     103
    113104  if (status(outlink, "write", "not ready"))
    114105  {
     
    120111
    121112  // ready -- do the actual work
    122   write(outlink, "// ignore: " + keyword + s);
     113  if (keyword != "")
     114  {
     115    if (! defined(tst_hostname))
     116    {
     117      string tst_hostname = tst_system("hostname");
     118      tst_hostname = tst_hostname[1..size(tst_hostname)-1];
     119      export tst_hostname;
     120    }
     121
     122    write(outlink, "// ignore:" + keyword + " " + tst_hostname + ":" + s);
     123  }
     124  else
     125  {
     126    write(outlink, "// ignore: " + s);
     127  }
    123128}
    124129example
     
    135140}
    136141
     142proc tst_status (list #)
     143"USAGE:   tst_status([any])
     144RETURN:   none; writes to stdout the current memory usage and used time
     145          since last call to tst_status(), if no argument is given, or,
     146          since start-up of Singular, if an argument is given.
     147NOTE:     Should be used regularly within tst files to enable automatic
     148          tracking of memory and time performance.
     149EXAMPLE: example tst_status; shows example
     150"
     151{
     152  tst_ignore(memory(0), "tst_memory_0");
     153  tst_ignore(memory(1), "tst_memory_1");
     154  tst_ignore(memory(2), "tst_memory_2");
     155  if (size(#) > 0)
     156  {
     157    tst_ignore(timer, "tst_timer_1");
     158  }
     159  else
     160  {
     161    if (! defined(tst_timer))
     162    {
     163      int tst_timer = 0;
     164      export tst_timer;
     165    }
     166    tst_ignore(timer - tst_timer, "tst_timer");
     167    tst_timer = timer;
     168  }
     169}
     170example
     171{
     172  "EXAMPLE";  echo = 2;
     173  tst_status();
     174  ring r;
     175  poly p = (x+y+z)^40;
     176  tst_status();
     177  tst_status(1);
     178}
     179
     180 
    137181proc tst_init
    138182"USAGE:   tst_init()
     
    142186"
    143187{
     188  if (! defined(tst_hostname))
     189  {
     190    string tst_hostname = tst_system("hostname");
     191    tst_hostname = tst_hostname[1..size(tst_hostname)-1];
     192    export tst_hostname;
     193  }
    144194  tst_ignore("USER    : " + system("getenv", "USER"));
    145   tst_ignore("HOSTNAME: " + system("getenv", "HOST"));
     195  tst_ignore("HOSTNAME: " + tst_hostname);
    146196  tst_ignore("uname -a: " + tst_system("uname -a"));
    147197  tst_ignore("date    : " + tst_system("date"));
    148198  tst_ignore("version : " + string(system("version")));
     199  tst_ignore("ticks   : " + system("--ticks-per-sec"));
     200  if (! defined(tst_timer))
     201  {
     202    int tst_timer;
     203    export tst_timer;
     204  }
     205 
     206  tst_status();
    149207}
    150208example
  • Singular/syz1.cc

    re960fdf rcb13f0  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: syz1.cc,v 1.29 1998-06-29 13:16:37 pohl Exp $ */
     4/* $Id: syz1.cc,v 1.30 1998-06-30 14:48:20 obachman Exp $ */
    55/*
    66* ABSTRACT: resolutions
     
    504504  else
    505505  {
    506     poly p,result=p=pNew();
     506    poly p,result=p=pInit();
    507507    number n;
    508508    loop
Note: See TracChangeset for help on using the changeset viewer.