home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / FUNNEL_S / SCRIPTS / MASTER.FWS < prev    next >
Text File  |  1992-05-27  |  8KB  |  293 lines

  1. !============================<Start of Master Script>===========================
  2. !
  3. ! FUNNELWEB MASTER TEST SCRIPT
  4. ! ============================
  5. ! This is the master FunnelWeb test script.
  6. ! To test FunnelWeb:
  7. !    1. Create the following directory tree:
  8. !       <anyname>
  9. !          scripts - A directory containing .fws scripts.
  10. !          tests   - A directory containing .fw test files.
  11. !          results - An empty directory to receive results of testing.
  12. !          answers - A directory containing the correct answers.
  13. !    2. Modify the "root test directory" section of this script as described.
  14. !    3. Ensure that all of the directories and files are on Read/Write access.
  15. !    4. Set default to the "scripts" directory.
  16. !    5. Invoke FunnelWeb with the "+k" option.
  17. !    6. Give the command "execute master.fws".
  18. !    7. The test should last for a few minutes.
  19. !    8. Read the test summary on the console at the end of the test.
  20. !
  21. ! Notes on Script Mechanics
  22. ! -------------------------
  23. ! * FunnelWeb predefines "$/" to be the character that separates
  24. !   directory specifications from file names on whatever machine it is
  25. !   running on. (e.g. Mac=":", Sun="/", Vax="]", PC="\").
  26.  
  27. write ""
  28. write "FUNNELWEB TEST SCRIPT"
  29. write "====================="
  30. write "This FunnelWeb shellscript applies FunnelWeb to a suite of test files."
  31. write "The result is a differences report comparing the result files of this"
  32. write "run with a predefined set of correct "answer" files."
  33. write ""
  34. write "Do not be alarmed by errors occurring during the testing as these"
  35. write "are a consequence of tests of FunnelWeb's detection of various errors."
  36. write ""
  37. write "This script cleans up files lying around before testing, so if"
  38. write "it fails for some reason, you can run it again without having."
  39. write "to worry about cleaning up after the results of the previous run."
  40. write ""
  41. write "This script takes about 10 minutes to run on a 1 MIP machine."
  42. write "Here we go!"
  43. write ""
  44. !
  45. ! Define Symbol For The Root Test Directory
  46. ! -----------------------------------------
  47. ! IMPORTANT: THIS DEFINITION IS ALL YOU HAVE TO CHANGE TO GET THIS
  48. !            SCRIPT WORKING ON YOUR MACHINE.
  49. ! The script substitution variable <dollar>R must point to the root
  50. ! directory <anyname> (see above). Here are some examples of definitions
  51. ! of <dollar>R on various machines onto which FunnelWeb has been ported.
  52.  
  53. !SUN: define R "/usr2/users/ross/fwdir/"
  54. !VMS: define R "$$USERS:[ROSS.FWDIR."
  55. !PC : define R "\fwdir\"
  56. !Mac: define R "fatdisk:fwdir:"
  57.  
  58. ! Place your definition here.
  59. define R "/usr2/users/ross/fwdir/"
  60.  
  61. ! Define Symbols for Test Directories
  62. ! -----------------------------------
  63. !      S - The directory containing the .fws FunnelWeb test scripts.
  64. !      I - The directory containing the .fw input files.
  65. !      O - The directory where all the test output goes.
  66. !      A - The directory containing all the correct answers.
  67. !      D - The differences file.
  68. define S "$Rscripts$/"
  69. define I "$Rtests$/"
  70. define O "$Rresults$/"
  71. define A "$Ranswers$/"
  72. define D "$Rresults$/0testres.dif"
  73.  
  74. ! Set FunnelWeb Options Default
  75. ! -----------------------------
  76. ! The following options remain as default for all the runs.
  77. ! The only two options turned on are +c100 and +b7.
  78. ! The sub-scripts turn on the options they need explicitly.
  79. !    -f  No input file specified.
  80. !    -j  No journal file.
  81. !    =i..Include files come from the input directory.
  82. !    -o  No product file(s).
  83. !    -t  No typeset file.
  84. !    -l  No Listing file.
  85. !    -d  No deletion of output files.
  86. !    +c100 No suppression of listing in listing file.
  87. !    -q  Messages to screen.
  88. !    -x  No default script file to execute.
  89. !    -w  No limit on product file line length imposed by command line.
  90. !    -k  No interactive mode.
  91. !    -b1 No dump of input file map.
  92. !    -b2 No dump of line list.
  93. !    -b3 No dump of token list.
  94. !    -b4 No dump of macro table.
  95. !    -b5 No dump of document list.
  96. !    -b6 No dump of timing results.
  97. !    +b7 DONT write anything non-deterministic.
  98. set -f -j =i$I -o -t -l -d +c100 -q -x -w -k -b123456 +b7
  99.  
  100. ! Delete any Old Differences File
  101. ! -------------------------------
  102. eneo $D
  103.  
  104. ! Zero the Difference Summary Counters
  105. ! ------------------------------------
  106. ! This is necessary in case the user runs this script twice in one session.
  107. diffzero
  108.  
  109. ! Clean Test Scripts
  110. ! ------------------
  111. ! When text files are copied from one machine to another, they can sometimes
  112. ! end up with end-of-line characters that are incorrect for the target machine.
  113. ! The following commands clean up the sub-scripts that we are about to invoke.
  114. fixeols $Stest_ld.fws
  115. fixeols $Stest_l.fws
  116. fixeols $Stest_lo.fws
  117. fixeols $Stest_lt.fws
  118. fixeols $Stest_lot.fws
  119. fixeols $Stest_lo2.fws
  120.  
  121. ! Generate Tricky Test Files
  122. ! --------------------------
  123. ! This process is a bit messy and requires operations similar to those in the
  124. ! other sub-scripts (test_ld.fws...), and so I have placed it all in
  125. ! test_gen.fws.
  126. execute $Stest_gen.fws
  127.  
  128. ! Clean up the Include Files
  129. ! --------------------------
  130. ! The test scripts all "purify" their file arguments by running them through
  131. ! the "fixeols" command. However, the include files aren't automated in this
  132. ! way, so we have to do them here explicitly.
  133. fixeols $Isc13a.fwi
  134. fixeols $Isc13b.fwi
  135. fixeols $Isc13c.fwi
  136. fixeols $Isc13d.fwi
  137. fixeols $Isc13e.fwi
  138. fixeols $Isc13f.fwi
  139. fixeols $Isc15a.fwi
  140. fixeols $Itg08a.fwi
  141. fixeols $Iex09a.fwi
  142. fixeols $Iex10a.fwi
  143.  
  144. ! Skip Some Tests
  145. ! ---------------
  146. ! If you are debugging some tests, you may wish to move the "here" command
  147. ! further down in the testing so as to skip to the desired tests.
  148. ! X must be defined because FunnelWeb expands command lines even while skipping
  149. ! and generates a "leading spaces" error if X is not defined to be non-blank.
  150. define X "!"
  151. skipto
  152. here
  153.  
  154. ! Test Scanner and Parser
  155. ! -----------------------
  156. define X "execute $Stest_ld.fws"
  157. ! Special cases:
  158. !    sc01 does not exist (test of non-existence input file).
  159. !    sc09 contains control characters that we don't want FIXEOLS to frob.
  160. $X sc01 !
  161. $X sc02
  162. $X sc03
  163. $X sc04
  164. $X sc05
  165. $X sc06
  166. $X sc07
  167. $X sc08
  168. $X sc09 !
  169. $X sc10
  170. $X sc11
  171. $X sc12
  172. $X sc13
  173. $X sc14
  174. $X sc15
  175. $X sc16
  176. $X sc17
  177. $X sc18
  178. $X sc19
  179. $X sc20
  180. $X sc21
  181. $X sc22
  182. $X sc23
  183. $X sc24
  184. $X sc25
  185. $X sc26
  186. $X sc27
  187. $X sc28
  188. $X sc29
  189.  
  190. $X pr01
  191. $X pr02
  192. $X pr03
  193. $X pr04
  194. $X pr05
  195. $X pr06
  196. $X pr07
  197. $X pr08
  198. $X pr09
  199. $X pr10
  200.  
  201. ! Test Analyser
  202. ! -------------
  203. define X "execute $Stest_l.fws"
  204. $X an01
  205. $X an02
  206. $X an03
  207. $X an04
  208.  
  209. ! Test Tangle
  210. ! -----------
  211. define X "execute $Stest_lo.fws"
  212. $X tg01
  213. $X tg02
  214. $X tg03
  215. $X tg04
  216. $X tg05
  217. $X tg06
  218. $X tg07
  219. $X tg08
  220. $X tg09
  221.  
  222. ! Test Weave
  223. ! ----------
  224. define X "execute $Stest_lt.fws"
  225. $X wv01
  226. $X wv02
  227. $X wv03
  228. $X wv04
  229. $X wv05
  230. $X wv06
  231.  
  232. ! Examples in User Manual Tutorial
  233. ! --------------------------------
  234. define X "execute $Stest_lo.fws"
  235. $X ex01
  236. $X ex02
  237. define X "execute $Stest_l.fws"
  238. $X ex03
  239. define X "execute $Stest_lo.fws"
  240. $X ex04
  241. $X ex05
  242. $X ex06
  243. $X ex07
  244. $X ex08
  245. $X ex09
  246. $X ex10
  247.  
  248. define X "execute $Stest_lt.fws"
  249. $X ex11
  250. $X ex12
  251. $X ex13
  252. $X ex14
  253. $X ex15
  254.  
  255. define X "execute $Stest_lot.fws"
  256. $X ex16
  257.  
  258. ! Examples in Hints Chapter
  259. ! -------------------------
  260. define X "execute $Stest_lo.fws"
  261. $X hi01
  262. $X hi02
  263. $X hi03
  264. $X hi04
  265. $X hi05
  266. define X "execute $Stest_lo2.fws"
  267. $X hi06
  268. $X hi07
  269. define X "execute $Stest_lo.fws"
  270. $X hi08
  271. $X hi09
  272. $X hi10
  273.  
  274. ! Final Test Summary
  275. ! ------------------
  276. write ""
  277. write ""
  278. write "The FunnelWeb test suite script has successfully completed."
  279. write ""
  280. diffsummary
  281. write ""
  282. write "If the differences summary above gives Different=0, then FunnelWeb"
  283. write "has passed the test suite and is ready for use."
  284. write ""
  285. write "If not, you should examine the file"
  286. write "   "$D""
  287. write "to see what went wrong."
  288. write ""
  289. write "By the way, there should be 1 Severe, 277 Errors, and 12 Warnings."
  290. write ""
  291. !=============================<End of Master Script>============================
  292.  
  293.