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