Changeset 6b8aae5 in git
- Timestamp:
- Jul 1, 1998, 12:39:10 PM (25 years ago)
- Branches:
- (u'spielwiese', '6e12f9861a9fbafef8cfe9d754bf74a7d483a67b')
- Children:
- 6d7a86a59473bc99949cb0e2ec4f38d7e3eec49c
- Parents:
- 46976a68b5b1ef847ae27a04683148c9e8acb851
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/tst.lib
r46976a6 r6b8aae5 1 // $Id: tst.lib,v 1. 9 1998-06-30 14:48:21obachman Exp $1 // $Id: tst.lib,v 1.10 1998-07-01 10:39:10 obachman Exp $ 2 2 //(obachman, last modified 6/30/98) 3 3 ///////////////////////////////////////////////////////////////////////////// 4 4 5 version="$Id: tst.lib,v 1. 9 1998-06-30 14:48:21obachman Exp $";5 version="$Id: tst.lib,v 1.10 1998-07-01 10:39:10 obachman Exp $"; 6 6 info=" 7 7 LIBRARY: tst.lib PROCEDURES FOR RUNNING AUTOMATIC TST TESTS … … 10 10 tst_system(s) returns string which is stdout of system(\"sh\", s) 11 11 tst_ignore(any,[keyword], [link]) writes string(any) to link (or stdout), 12 prepending prefix \"// ignore:\"12 prepending prefix \"// tst_ignore:\" 13 13 tst_init() writes some identification data to stdout 14 14 with tst_ignore … … 43 43 } 44 44 45 proc GetHostName 46 { 47 string tst_hostname = tst_system("hostname"); 48 tst_hostname = tst_hostname[1..size(tst_hostname)-1]; 49 return (tst_hostname); 50 } 45 51 46 52 proc tst_ignore … … 50 56 link -- a link which can be written to 51 57 RETURN: none; writes string(any) to link (or stdout, if no link given), 52 prepending prefix \"// ignore:\", or53 \"// ignore:keyword hostname:\",58 prepending prefix \"// tst_ignore:\", or 59 \"// tst_ignore:keyword hostname:\", 54 60 if keyword was given. 55 61 Should be used in tst files to output system dependent data … … 113 119 if (keyword != "") 114 120 { 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); 121 write(outlink,"// tst_ignore:" + keyword + " " + GetHostName() + ":" + s); 123 122 } 124 123 else 125 124 { 126 write(outlink, "// ignore: " + s);125 write(outlink, "// tst_ignore: " + s); 127 126 } 128 127 } … … 140 139 } 141 140 141 static proc Get_tst_timer 142 { 143 if (! defined (tst_timer)) 144 { 145 string tst_timer = "// tst_ignore:0"; 146 export tst_timer; 147 return (0); 148 } 149 else 150 { 151 execute "int tst_int_timer = " + tst_timer[15,size(tst_timer)] + ";"; 152 return (tst_int_timer); 153 } 154 } 155 156 static proc Set_tst_timer (int this_time) 157 { 158 tst_timer = tst_timer[1,14] + string(this_time); 159 } 160 142 161 proc tst_status (list #) 143 162 "USAGE: tst_status([any]) … … 159 178 else 160 179 { 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; 180 tst_ignore(timer - Get_tst_timer(), "tst_timer"); 181 Set_tst_timer(timer); 168 182 } 169 183 }
Note: See TracChangeset
for help on using the changeset viewer.