source: git/Tst/README @ a19ac9

spielwiese
Last change on this file since a19ac9 was 863a27, checked in by Olaf Bachmann <obachman@…>, 26 years ago
* switched from gzipprd files to uuencoded files git-svn-id: file:///usr/local/Singular/svn/trunk@1428 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.5 KB
Line 
1README file for Singular test-suite
2===================================
3
4This is the test-suite for Singular. This directory contains
5
6regress.cmd     -- perl script which drives tests
7Short           -- directory containing "short" tests
8Long            -- directory containing "long" tests
9Old             -- directory containing "old" (TST) tests
10
11To run Singular test(s):
12------------------------
131.) Put the Singular binary in this directory
142.) cd to one of the directories above
153.) run
16     ../regress.cmd [*.tst] [*.lst]
17    with the desired tst (i.e., Singular test scripts) or lst (list
18    of tst files) file(s).
194.) For each file xx.tst,
20      ../Singular -tqr12345678 xx.tst > xx.new.tst
21      diff xx.res xx.new.res | tee xx.diff
22    is run.
235.) If no diffs were found, xx.diff and xx.new.res are rm'ed and
24    xx.res is gzip'ed and uuencoded. Otherwise (i.e., diffs were
25    found), xx.diff and xx.new.res are kept, diffs are printed to
26    stdout, and regress.cmd exits with exit status != 0.
27
28Do also
29   ../regress.cmd -h
30and see the source code of ../regress.cmd for some more details on
31regress.cmd.
32
33To add a new test for a library/commando to the test-suite:
34-----------------------------------------------------------
35* The following files need to be provided:
36        short/xx_s.tst : Singular code for short and basic tests
37        long/xx_l.tst : Singular code for long and extended tests
38        short/xx_s.res : Result output of xx_s.tst
39        long/xx_l.res : Result output of xx_l.tst
40  or, alternatively:
41        short/xx.tst: Singular code for short tests, only
42        short/xx.res : Result output of xx.tst
43
44* xx_s.tst should test the essential functionality of the
45  library/commando in a relatively short time (say, in no more than
46  30s).
47
48* xx_l.tst should test the functionality of the
49  library/commando in detail so that, if possible, all relevant
50  cases/results are tested. Nevertheless, such a test should not run
51  longer than, say, 10 minutes.
52
53* If useful test do generally execute in a short time, have xx.tst,
54  only.
55
56* Rules for providing tst files:
57  1.) tst files always start with the following three commandos as
58  preamble:
59         LIB "tst.lib";
60         tst_init();
61         tst_ignore("CVS ID $Id:$");
62  tst_init() writes some general info to stdout (like date,
63  uname, hostname, version, etc.). The library tst.lib (appended
64  below) provides, among others, the routines tst_init() and
65  tst_ignore().
66
67  2.) All system-dependent output (like run-times, memory usages,
68  pathnames, dates, etc.) must be output by means of the routine
69  tst_ignore(...):
70  tst_ignore(val [, keyword]): 'val' can have arbitrary type for which
71                               a string conversion exists;
72                               if present, keyword must be one of the
73                               following strings: "time", "memory"
74  tst_ignore() outputs 'val' by prepending the following prefix:
75  no keyword --       // ignore:
76  "time" keyword --   // ignore: time:
77  "memory" keyword -- // ignore: memory:
78  which causes automatic tests to ignore these lines when doing a diff
79  on result files.
80 
81  3.) Time and/or memory-intensive tests should be followed by
82  (tst_ignore'd) time (resp. memory) output, so that we can keep track
83  of the timing (resp. memory) behaviour of Singular. This could be
84  accomplished as shown below:
85  int mytime = timer;
86  /* time/memory intesive computations */
87  tst_ignore("time", timer - mytime);
88  tst_ignore("memory", memory(0));
89
90* Command for generating *.res files:
91  cd <directopry where xx.tst should reside>; ../regress.cmd -g xx.tst
92
93
Note: See TracBrowser for help on using the repository browser.