Megatest

Hex Artifact Content
Login

Artifact c6a2ab2853ff58663c66bb79f5b30e25399422a6:


0000: 3b 3b 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ;;==============
0010: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0020: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0030: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0040: 3d 3d 3d 3d 3d 3d 3d 3d 0a 3b 3b 20 43 6f 70 79  ========.;; Copy
0050: 72 69 67 68 74 20 32 30 30 36 2d 32 30 31 32 2c  right 2006-2012,
0060: 20 4d 61 74 74 68 65 77 20 57 65 6c 6c 61 6e 64   Matthew Welland
0070: 2e 0a 3b 3b 20 0a 3b 3b 20 54 68 69 73 20 66 69  ..;; .;; This fi
0080: 6c 65 20 69 73 20 70 61 72 74 20 6f 66 20 4d 65  le is part of Me
0090: 67 61 74 65 73 74 2e 0a 3b 3b 20 0a 3b 3b 20 20  gatest..;; .;;  
00a0: 20 20 20 4d 65 67 61 74 65 73 74 20 69 73 20 66     Megatest is f
00b0: 72 65 65 20 73 6f 66 74 77 61 72 65 3a 20 79 6f  ree software: yo
00c0: 75 20 63 61 6e 20 72 65 64 69 73 74 72 69 62 75  u can redistribu
00d0: 74 65 20 69 74 20 61 6e 64 2f 6f 72 20 6d 6f 64  te it and/or mod
00e0: 69 66 79 0a 3b 3b 20 20 20 20 20 69 74 20 75 6e  ify.;;     it un
00f0: 64 65 72 20 74 68 65 20 74 65 72 6d 73 20 6f 66  der the terms of
0100: 20 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 6c   the GNU General
0110: 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20   Public License 
0120: 61 73 20 70 75 62 6c 69 73 68 65 64 20 62 79 0a  as published by.
0130: 3b 3b 20 20 20 20 20 74 68 65 20 46 72 65 65 20  ;;     the Free 
0140: 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 61 74  Software Foundat
0150: 69 6f 6e 2c 20 65 69 74 68 65 72 20 76 65 72 73  ion, either vers
0160: 69 6f 6e 20 33 20 6f 66 20 74 68 65 20 4c 69 63  ion 3 of the Lic
0170: 65 6e 73 65 2c 20 6f 72 0a 3b 3b 20 20 20 20 20  ense, or.;;     
0180: 28 61 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 29  (at your option)
0190: 20 61 6e 79 20 6c 61 74 65 72 20 76 65 72 73 69   any later versi
01a0: 6f 6e 2e 0a 3b 3b 20 0a 3b 3b 20 20 20 20 20 4d  on..;; .;;     M
01b0: 65 67 61 74 65 73 74 20 69 73 20 64 69 73 74 72  egatest is distr
01c0: 69 62 75 74 65 64 20 69 6e 20 74 68 65 20 68 6f  ibuted in the ho
01d0: 70 65 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20  pe that it will 
01e0: 62 65 20 75 73 65 66 75 6c 2c 0a 3b 3b 20 20 20  be useful,.;;   
01f0: 20 20 62 75 74 20 57 49 54 48 4f 55 54 20 41 4e    but WITHOUT AN
0200: 59 20 57 41 52 52 41 4e 54 59 3b 20 77 69 74 68  Y WARRANTY; with
0210: 6f 75 74 20 65 76 65 6e 20 74 68 65 20 69 6d 70  out even the imp
0220: 6c 69 65 64 20 77 61 72 72 61 6e 74 79 20 6f 66  lied warranty of
0230: 0a 3b 3b 20 20 20 20 20 4d 45 52 43 48 41 4e 54  .;;     MERCHANT
0240: 41 42 49 4c 49 54 59 20 6f 72 20 46 49 54 4e 45  ABILITY or FITNE
0250: 53 53 20 46 4f 52 20 41 20 50 41 52 54 49 43 55  SS FOR A PARTICU
0260: 4c 41 52 20 50 55 52 50 4f 53 45 2e 20 20 53 65  LAR PURPOSE.  Se
0270: 65 20 74 68 65 0a 3b 3b 20 20 20 20 20 47 4e 55  e the.;;     GNU
0280: 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20   General Public 
0290: 4c 69 63 65 6e 73 65 20 66 6f 72 20 6d 6f 72 65  License for more
02a0: 20 64 65 74 61 69 6c 73 2e 0a 3b 3b 20 0a 3b 3b   details..;; .;;
02b0: 20 20 20 20 20 59 6f 75 20 73 68 6f 75 6c 64 20       You should 
02c0: 68 61 76 65 20 72 65 63 65 69 76 65 64 20 61 20  have received a 
02d0: 63 6f 70 79 20 6f 66 20 74 68 65 20 47 4e 55 20  copy of the GNU 
02e0: 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 4c  General Public L
02f0: 69 63 65 6e 73 65 0a 3b 3b 20 20 20 20 20 61 6c  icense.;;     al
0300: 6f 6e 67 20 77 69 74 68 20 4d 65 67 61 74 65 73  ong with Megates
0310: 74 2e 20 20 49 66 20 6e 6f 74 2c 20 73 65 65 20  t.  If not, see 
0320: 3c 68 74 74 70 3a 2f 2f 77 77 77 2e 67 6e 75 2e  <http://www.gnu.
0330: 6f 72 67 2f 6c 69 63 65 6e 73 65 73 2f 3e 2e 0a  org/licenses/>..
0340: 0a 3b 3b 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  .;;=============
0350: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0360: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0370: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0380: 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 28 64 65 63 6c  =========..(decl
0390: 61 72 65 20 28 75 6e 69 74 20 67 65 6e 65 78 61  are (unit genexa
03a0: 6d 70 6c 65 29 29 0a 28 75 73 65 20 70 6f 73 69  mple)).(use posi
03b0: 78 20 72 65 67 65 78 20 6d 61 74 63 68 61 62 6c  x regex matchabl
03c0: 65 29 0a 0a 28 69 6e 63 6c 75 64 65 20 22 64 62  e)..(include "db
03d0: 5f 72 65 63 6f 72 64 73 2e 73 63 6d 22 29 0a 0a  _records.scm")..
03e0: 28 64 65 66 69 6e 65 20 67 65 6e 65 78 61 6d 70  (define genexamp
03f0: 6c 65 3a 65 78 61 6d 70 6c 65 2d 6c 6f 67 70 72  le:example-logpr
0400: 6f 0a 23 3c 3c 45 4f 46 0a 20 20 3b 3b 20 59 6f  o.#<<EOF.  ;; Yo
0410: 75 20 73 68 6f 75 6c 64 20 68 61 76 65 20 61 74  u should have at
0420: 20 6c 65 61 73 74 20 6f 6e 65 20 65 78 70 65 63   least one expec
0430: 74 3a 72 65 71 75 69 72 65 64 2e 20 54 68 69 73  t:required. This
0440: 20 65 6e 73 75 72 65 73 20 74 68 61 74 20 79 6f   ensures that yo
0450: 75 72 20 70 72 6f 63 65 73 73 20 72 61 6e 0a 20  ur process ran. 
0460: 20 3b 3b 20 63 6f 6d 6d 65 6e 74 20 6f 75 74 20   ;; comment out 
0470: 74 68 65 20 6c 69 6e 65 20 62 65 6c 6f 77 20 61  the line below a
0480: 6e 64 20 72 65 70 6c 61 63 65 20 22 70 75 74 20  nd replace "put 
0490: 70 61 74 74 65 72 6e 20 68 65 72 65 22 20 77 69  pattern here" wi
04a0: 74 68 20 61 20 70 61 74 74 65 72 6e 20 74 68 61  th a pattern tha
04b0: 74 20 77 69 6c 6c 0a 20 20 3b 3b 20 61 6c 77 61  t will.  ;; alwa
04c0: 79 73 20 62 65 20 73 65 65 6e 20 69 6e 20 79 6f  ys be seen in yo
04d0: 75 72 20 6c 6f 67 20 66 69 6c 65 20 69 66 20 74  ur log file if t
04e0: 68 65 20 73 74 65 70 20 72 75 6e 73 20 73 75 63  he step runs suc
04f0: 63 65 73 73 66 75 6c 6c 79 2e 0a 20 20 3b 3b 0a  cessfully..  ;;.
0500: 20 20 3b 3b 20 28 65 78 70 65 63 74 3a 72 65 71    ;; (expect:req
0510: 75 69 72 65 64 20 69 6e 20 22 4c 6f 67 46 69 6c  uired in "LogFil
0520: 65 42 6f 64 79 22 20 3e 20 30 20 22 50 75 74 20  eBody" > 0 "Put 
0530: 64 65 73 63 72 69 70 74 69 6f 6e 20 68 65 72 65  description here
0540: 22 20 23 2f 70 75 74 20 70 61 74 74 65 72 6e 20  " #/put pattern 
0550: 68 65 72 65 2f 29 0a 20 20 3b 3b 0a 20 20 3b 3b  here/).  ;;.  ;;
0560: 20 59 6f 75 20 6d 61 79 20 6e 65 65 64 20 69 67   You may need ig
0570: 6e 6f 72 65 73 20 74 6f 20 73 75 70 70 72 65 73  nores to suppres
0580: 73 20 66 61 6c 73 65 20 65 72 72 6f 72 20 6f 72  s false error or
0590: 20 77 61 72 6e 69 6e 67 20 68 69 74 73 20 66 72   warning hits fr
05a0: 6f 6d 20 74 68 65 20 6c 61 74 65 72 20 65 78 70  om the later exp
05b0: 65 63 74 73 0a 20 20 3b 3b 20 4e 4f 54 45 3a 20  ects.  ;; NOTE: 
05c0: 4f 72 64 65 72 20 69 73 20 69 6d 70 6f 72 74 61  Order is importa
05d0: 6e 74 20 68 65 72 65 21 0a 20 20 28 65 78 70 65  nt here!.  (expe
05e0: 63 74 3a 69 67 6e 6f 72 65 20 20 20 69 6e 20 22  ct:ignore   in "
05f0: 4c 6f 67 46 69 6c 65 42 6f 64 79 22 20 20 3c 20  LogFileBody"  < 
0600: 39 39 20 22 49 67 6e 6f 72 65 20 74 68 65 20 77  99 "Ignore the w
0610: 6f 72 64 20 65 72 72 6f 72 20 69 6e 20 63 6f 6d  ord error in com
0620: 6d 65 6e 74 73 22 20 23 2f 5e 5c 2f 5c 2f 2e 2a  ments" #/^\/\/.*
0630: 65 72 72 6f 72 2f 29 0a 20 20 28 65 78 70 65 63  error/).  (expec
0640: 74 3a 77 61 72 6e 69 6e 67 20 20 69 6e 20 22 4c  t:warning  in "L
0650: 6f 67 46 69 6c 65 42 6f 64 79 22 20 20 3d 20 30  ogFileBody"  = 0
0660: 20 22 41 6e 79 20 77 61 72 6e 69 6e 67 22 20 23   "Any warning" #
0670: 2f 77 61 72 6e 2f 29 0a 20 20 28 65 78 70 65 63  /warn/).  (expec
0680: 74 3a 65 72 72 6f 72 20 20 20 20 69 6e 20 22 4c  t:error    in "L
0690: 6f 67 46 69 6c 65 42 6f 64 79 22 20 20 3d 20 30  ogFileBody"  = 0
06a0: 20 22 41 6e 79 20 65 72 72 6f 72 22 20 20 28 6c   "Any error"  (l
06b0: 69 73 74 20 23 2f 45 52 52 4f 52 2f 20 23 2f 65  ist #/ERROR/ #/e
06c0: 72 72 6f 72 2f 29 29 20 3b 3b 20 62 75 74 20 64  rror/)) ;; but d
06d0: 69 73 61 6c 6c 6f 77 20 61 6e 79 20 6f 74 68 65  isallow any othe
06e0: 72 20 65 72 72 6f 72 73 0a 45 4f 46 0a 29 0a 0a  r errors.EOF.)..
06f0: 28 64 65 66 69 6e 65 20 67 65 6e 65 78 61 6d 70  (define genexamp
0700: 6c 65 3a 65 78 61 6d 70 6c 65 2d 73 63 72 69 70  le:example-scrip
0710: 74 0a 23 3c 3c 45 4f 46 0a 23 21 2f 75 73 72 2f  t.#<<EOF.#!/usr/
0720: 62 69 6e 2f 65 6e 76 20 62 61 73 68 0a 0a 23 20  bin/env bash..# 
0730: 52 75 6e 20 79 6f 75 72 20 73 74 65 70 20 68 65  Run your step he
0740: 72 65 0a 45 4f 46 0a 29 0a 0a 28 64 65 66 69 6e  re.EOF.)..(defin
0750: 65 20 28 67 65 6e 65 78 61 6d 70 6c 65 3a 6d 6b  e (genexample:mk
0760: 2d 6d 65 67 61 74 65 73 74 2e 63 6f 6e 66 69 67  -megatest.config
0770: 29 0a 20 20 28 6c 65 74 20 28 28 6b 65 79 73 74  ).  (let ((keyst
0780: 72 20 23 66 29 0a 09 28 6b 65 79 73 20 20 20 23  r #f)..(keys   #
0790: 66 29 0a 09 28 6c 6e 74 72 65 65 20 23 66 29 0a  f)..(lntree #f).
07a0: 09 28 70 61 74 68 20 20 20 23 66 29 0a 09 28 66  .(path   #f)..(f
07b0: 69 72 73 74 64 20 23 66 29 29 0a 20 20 20 20 28  irstd #f)).    (
07c0: 70 72 69 6e 74 20 22 4e 6f 74 65 3a 20 64 6f 6e  print "Note: don
07d0: 27 74 20 77 6f 72 72 79 20 74 6f 6f 20 6d 75 63  't worry too muc
07e0: 68 20 61 62 6f 75 74 20 74 79 70 6f 73 20 69 6e  h about typos in
07f0: 20 74 68 69 73 20 70 72 6f 63 65 73 73 2c 20 79   this process, y
0800: 6f 75 20 77 69 6c 6c 20 62 65 20 61 62 6c 65 20  ou will be able 
0810: 74 6f 20 65 64 69 74 0a 74 68 65 20 67 65 6e 65  to edit.the gene
0820: 72 61 74 65 64 20 66 69 6c 65 73 20 62 65 66 6f  rated files befo
0830: 72 65 20 73 74 61 72 74 69 6e 67 20 79 6f 75 72  re starting your
0840: 20 66 69 72 73 74 20 72 75 6e 73 22 29 0a 0a 20   first runs").. 
0850: 20 20 20 3b 3b 20 63 72 65 61 74 65 20 74 68 65     ;; create the
0860: 20 6e 65 65 64 65 64 20 61 72 65 61 0a 20 20 20   needed area.   
0870: 20 28 70 72 69 6e 74 20 22 3d 3d 3d 3d 3d 3d 3d   (print "=======
0880: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 5c 6e 57 68 65  ===========\nWhe
0890: 72 65 20 63 61 6e 20 49 20 63 72 65 61 74 65 20  re can I create 
08a0: 79 6f 75 72 20 4d 65 67 61 74 65 73 74 20 72 65  your Megatest re
08b0: 67 72 65 73 73 73 69 6f 6e 2f 63 6f 6e 74 69 6e  gresssion/contin
08c0: 75 6f 75 73 20 62 75 69 6c 64 20 61 72 65 61 3f  uous build area?
08d0: 20 4e 6f 74 65 2c 20 79 6f 75 72 20 5c 6e 22 0a   Note, your \n".
08e0: 09 20 20 20 22 74 65 73 74 73 20 77 69 6c 6c 20  .   "tests will 
08f0: 6e 6f 74 20 6e 65 63 65 73 73 61 72 69 6c 79 20  not necessarily 
0900: 62 65 20 72 75 6e 20 69 6e 20 74 68 69 73 20 61  be run in this a
0910: 72 65 61 2c 20 64 69 73 6b 20 73 70 61 63 65 20  rea, disk space 
0920: 6e 65 65 64 73 20 61 72 65 20 6d 6f 64 65 73 74  needs are modest
0930: 2e 20 43 75 72 72 65 6e 74 20 64 69 72 65 63 74  . Current direct
0940: 6f 72 79 20 69 73 3a 5c 6e 5c 6e 22 0a 09 20 20  ory is:\n\n"..  
0950: 20 28 63 75 72 72 65 6e 74 2d 64 69 72 65 63 74   (current-direct
0960: 6f 72 79 29 20 22 5c 6e 22 29 0a 20 20 20 20 28  ory) "\n").    (
0970: 64 69 73 70 6c 61 79 20 22 45 6e 74 65 72 20 79  display "Enter y
0980: 6f 75 72 20 6d 65 67 61 74 65 73 74 20 64 69 72  our megatest dir
0990: 65 63 74 6f 72 79 3a 20 22 29 0a 20 20 20 20 28  ectory: ").    (
09a0: 73 65 74 21 20 70 61 74 68 20 28 72 65 61 64 2d  set! path (read-
09b0: 6c 69 6e 65 29 29 0a 0a 20 20 20 20 28 69 66 20  line))..    (if 
09c0: 28 6e 6f 74 20 28 64 69 72 65 63 74 6f 72 79 3f  (not (directory?
09d0: 20 70 61 74 68 29 29 0a 09 28 62 65 67 69 6e 0a   path))..(begin.
09e0: 09 20 20 28 70 72 69 6e 74 20 22 54 68 65 20 70  .  (print "The p
09f0: 61 74 68 20 22 20 70 61 74 68 20 22 20 64 6f 65  ath " path " doe
0a00: 73 20 6e 6f 74 20 65 78 69 73 74 20 6f 72 20 69  s not exist or i
0a10: 73 20 6e 6f 74 20 61 20 64 69 72 65 63 74 6f 72  s not a director
0a20: 79 2e 20 41 74 74 65 6d 70 74 69 6e 67 20 74 6f  y. Attempting to
0a30: 20 63 72 65 61 74 65 20 69 74 20 6e 6f 77 22 29   create it now")
0a40: 0a 09 20 20 28 63 72 65 61 74 65 2d 64 69 72 65  ..  (create-dire
0a50: 63 74 6f 72 79 20 70 61 74 68 20 23 74 29 29 29  ctory path #t)))
0a60: 0a 0a 20 20 20 20 3b 3b 20 46 69 72 73 74 20 63  ..    ;; First c
0a70: 68 65 63 6b 20 74 68 61 74 20 74 68 65 20 64 69  heck that the di
0a80: 72 65 63 74 6f 72 79 20 69 73 20 65 6d 70 74 79  rectory is empty
0a90: 21 0a 20 20 20 20 28 69 66 20 28 61 6e 64 20 28  !.    (if (and (
0aa0: 63 6f 6d 6d 6f 6e 3a 66 69 6c 65 2d 65 78 69 73  common:file-exis
0ab0: 74 73 3f 20 70 61 74 68 29 0a 09 20 20 20 20 20  ts? path)..     
0ac0: 28 6e 6f 74 20 28 6e 75 6c 6c 3f 20 28 67 6c 6f  (not (null? (glo
0ad0: 62 20 28 63 6f 6e 63 20 70 61 74 68 20 22 2f 2a  b (conc path "/*
0ae0: 22 29 29 29 29 29 0a 09 28 62 65 67 69 6e 0a 09  ")))))..(begin..
0af0: 20 20 28 70 72 69 6e 74 20 22 57 41 52 4e 49 4e    (print "WARNIN
0b00: 47 3a 20 64 69 72 65 63 74 6f 72 79 20 22 20 70  G: directory " p
0b10: 61 74 68 20 22 20 69 73 20 6e 6f 74 20 65 6d 70  ath " is not emp
0b20: 74 79 2c 20 61 72 65 20 79 6f 75 20 73 75 72 65  ty, are you sure
0b30: 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 6f 6e   you want to con
0b40: 74 69 6e 75 65 3f 22 29 0a 09 20 20 28 64 69 73  tinue?")..  (dis
0b50: 70 6c 61 79 20 22 45 6e 74 65 72 20 79 2f 6e 3a  play "Enter y/n:
0b60: 20 22 29 0a 09 20 20 28 69 66 20 28 65 71 75 61   ")..  (if (equa
0b70: 6c 3f 20 22 79 22 20 28 72 65 61 64 2d 6c 69 6e  l? "y" (read-lin
0b80: 65 29 29 0a 09 20 20 20 20 20 20 28 70 72 69 6e  e))..      (prin
0b90: 74 20 22 55 73 69 6e 67 20 64 69 72 65 63 74 6f  t "Using directo
0ba0: 72 79 20 22 20 70 61 74 68 20 22 20 66 6f 72 20  ry " path " for 
0bb0: 79 6f 75 72 20 4d 65 67 61 74 65 73 74 20 61 72  your Megatest ar
0bc0: 65 61 2e 22 29 0a 09 20 20 20 20 20 20 28 62 65  ea.")..      (be
0bd0: 67 69 6e 0a 09 09 28 70 72 69 6e 74 20 22 49 4e  gin...(print "IN
0be0: 46 4f 3a 20 43 72 65 61 74 69 6f 6e 20 6f 66 20  FO: Creation of 
0bf0: 6d 65 67 61 74 65 73 74 20 66 69 6c 65 73 20 69  megatest files i
0c00: 6e 20 22 20 70 61 74 68 20 22 20 61 62 6f 72 74  n " path " abort
0c10: 65 64 22 29 0a 09 09 28 65 78 69 74 20 31 29 29  ed")...(exit 1))
0c20: 29 29 29 0a 0a 20 20 20 20 3b 3b 20 66 69 72 73  )))..    ;; firs
0c30: 74 20 70 72 6f 6d 70 74 20 75 73 65 72 20 66 6f  t prompt user fo
0c40: 72 20 66 69 65 6c 64 73 0a 20 20 20 20 3b 3b 0a  r fields.    ;;.
0c50: 20 20 20 20 28 70 72 69 6e 74 0a 20 20 20 20 20      (print.     
0c60: 22 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  "===============
0c70: 3d 3d 3d 0a 0a 4e 65 78 74 20 79 6f 75 20 6d 75  ===..Next you mu
0c80: 73 74 20 73 70 65 63 69 66 79 20 66 69 65 6c 64  st specify field
0c90: 73 20 6f 72 20 6b 65 79 73 20 66 6f 72 20 79 6f  s or keys for yo
0ca0: 75 72 20 6d 65 67 61 74 65 73 74 20 61 72 65 61  ur megatest area
0cb0: 2e 20 54 68 65 73 65 0a 77 69 6c 6c 20 62 65 20  . These.will be 
0cc0: 75 73 65 64 20 74 6f 20 6f 72 67 61 6e 69 73 65  used to organise
0cd0: 20 79 6f 75 72 20 72 75 6e 73 2e 20 4f 6e 65 20   your runs. One 
0ce0: 66 69 65 6c 64 20 73 68 6f 75 6c 64 20 70 72 6f  field should pro
0cf0: 62 61 62 6c 79 20 62 65 0a 5c 22 52 45 4c 45 41  bably be.\"RELEA
0d00: 53 45 5c 22 2e 20 20 4f 74 68 65 72 20 65 78 61  SE\".  Other exa
0d10: 6d 70 6c 65 73 20 6f 66 20 75 73 65 66 75 6c 20  mples of useful 
0d20: 66 69 65 6c 64 73 20 6d 69 67 68 74 20 62 65 20  fields might be 
0d30: 5c 22 50 4c 41 54 46 4f 52 4d 5c 22 2c 0a 5c 22  \"PLATFORM\",.\"
0d40: 54 41 52 47 45 54 5f 4f 53 5c 22 20 6f 72 20 69  TARGET_OS\" or i
0d50: 66 20 79 6f 75 20 61 72 65 20 69 6e 20 74 68 65  f you are in the
0d60: 20 73 65 6d 69 63 6f 6e 64 75 63 74 6f 72 20 62   semiconductor b
0d70: 75 73 69 6e 65 73 73 20 70 65 72 68 61 70 73 0a  usiness perhaps.
0d80: 74 68 69 6e 67 73 20 6c 69 6b 65 20 5c 22 54 45  things like \"TE
0d90: 43 48 4e 4f 4c 4f 47 59 5f 4e 4f 44 45 5c 22 2c  CHNOLOGY_NODE\",
0da0: 20 5c 22 44 45 53 49 47 4e 5f 4b 49 54 5c 22 20   \"DESIGN_KIT\" 
0db0: 6f 72 20 5c 22 4d 45 54 41 4c 5f 53 54 41 43 4b  or \"METAL_STACK
0dc0: 5c 22 2e 0a 0a 54 68 65 20 61 6c 6c 20 63 61 70  \"...The all cap
0dd0: 73 20 69 73 20 61 20 63 6f 6e 76 65 6e 74 69 6f  s is a conventio
0de0: 6e 20 62 65 63 61 75 73 65 20 74 68 65 20 76 61  n because the va
0df0: 72 69 61 62 6c 65 73 20 79 6f 75 20 63 68 6f 6f  riables you choo
0e00: 73 65 20 77 69 6c 6c 20 62 65 0a 61 76 61 69 6c  se will be.avail
0e10: 61 62 6c 65 20 74 6f 20 79 6f 75 72 20 74 65 73  able to your tes
0e20: 74 73 20 61 73 20 65 6e 76 69 72 6f 6e 6d 65 6e  ts as environmen
0e30: 74 20 76 61 72 69 61 62 6c 65 73 2e 20 59 6f 75  t variables. You
0e40: 20 63 61 6e 20 65 64 69 74 20 74 68 65 73 65 0a   can edit these.
0e50: 76 61 6c 75 65 73 20 6c 61 74 65 72 20 62 75 74  values later but
0e60: 20 69 74 20 69 73 20 67 65 6e 65 72 61 6c 6c 79   it is generally
0e70: 20 61 20 67 6f 6f 64 20 69 64 65 61 20 74 6f 20   a good idea to 
0e80: 73 65 74 74 6c 65 20 6f 6e 20 74 68 65 6d 0a 65  settle on them.e
0e90: 61 72 6c 79 2e 0a 0a 59 6f 75 72 20 72 75 6e 73  arly...Your runs
0ea0: 20 77 69 6c 6c 20 62 65 20 73 74 6f 72 65 64 20   will be stored 
0eb0: 69 6e 20 64 69 72 65 63 74 6f 72 69 65 73 20 73  in directories s
0ec0: 70 65 63 69 66 69 65 64 20 62 79 20 79 6f 75 72  pecified by your
0ed0: 0a 6b 65 79 73 2e 20 45 78 61 6d 70 6c 65 2c 20  .keys. Example, 
0ee0: 69 66 20 79 6f 75 20 68 61 76 65 20 6b 65 79 73  if you have keys
0ef0: 20 4f 53 46 41 4d 49 4c 59 2f 56 41 52 49 41 4e   OSFAMILY/VARIAN
0f00: 54 2f 4f 53 56 45 52 2f 52 45 4c 45 41 53 45 20  T/OSVER/RELEASE 
0f10: 79 6f 75 20 6d 61 79 0a 67 65 74 20 61 20 74 65  you may.get a te
0f20: 73 74 20 5c 22 62 75 69 6c 64 5c 22 20 69 6e 20  st \"build\" in 
0f30: 61 20 64 69 72 65 63 74 6f 72 79 20 6c 69 6b 65  a directory like
0f40: 20 74 68 69 73 3a 0a 6c 69 6e 75 78 2f 75 62 75   this:.linux/ubu
0f50: 6e 74 75 2f 31 31 2e 30 34 2f 72 65 76 5f 31 2e  ntu/11.04/rev_1.
0f60: 32 2f 62 75 69 6c 64 0a 0a 50 6c 65 61 73 65 20  2/build..Please 
0f70: 65 6e 74 65 72 20 79 6f 75 72 20 6b 65 79 73 20  enter your keys 
0f80: 6e 6f 77 2c 20 73 65 70 61 72 61 74 65 64 20 62  now, separated b
0f90: 79 20 73 70 61 63 65 73 20 6f 72 20 73 6c 61 73  y spaces or slas
0fa0: 68 65 73 2e 20 4f 6e 6c 79 20 61 6c 70 68 61 2d  hes. Only alpha-
0fb0: 6e 75 6d 65 72 69 63 20 63 68 61 72 61 63 74 65  numeric characte
0fc0: 72 73 2c 20 0a 75 70 70 65 72 20 63 61 73 65 20  rs, .upper case 
0fd0: 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 45 78 61  recommended. Exa
0fe0: 6d 70 6c 65 3a 20 43 4f 4d 50 49 4c 45 52 5f 56  mple: COMPILER_V
0ff0: 45 52 2f 52 45 4c 45 41 53 45 5f 4e 41 4d 45 2f  ER/RELEASE_NAME/
1000: 51 55 41 4c 5f 4c 45 56 45 4c 0a 22 29 0a 20 20  QUAL_LEVEL.").  
1010: 20 20 28 73 65 74 21 20 6b 65 79 73 20 28 6c 65    (set! keys (le
1020: 74 20 6c 6f 6f 70 20 28 28 6b 65 79 73 74 72 20  t loop ((keystr 
1030: 22 22 29 29 0a 09 09 20 28 69 66 20 28 65 71 75  ""))... (if (equ
1040: 61 6c 3f 20 6b 65 79 73 74 72 20 22 71 22 29 0a  al? keystr "q").
1050: 09 09 20 20 20 20 20 28 62 65 67 69 6e 0a 09 09  ..     (begin...
1060: 20 20 20 20 20 20 20 28 70 72 69 6e 74 20 22 51         (print "Q
1070: 75 69 74 69 6e 67 20 2e 2e 2e 22 29 0a 09 09 20  uiting ...")... 
1080: 20 20 20 20 20 20 28 65 78 69 74 29 29 0a 09 09        (exit))...
1090: 20 20 20 20 20 28 6c 65 74 20 28 28 6b 65 79 6c       (let ((keyl
10a0: 73 74 20 28 61 70 70 6c 79 20 61 70 70 65 6e 64  st (apply append
10b0: 0a 09 09 09 09 09 20 20 28 6d 61 70 20 73 74 72  ......  (map str
10c0: 69 6e 67 2d 73 70 6c 69 74 20 28 73 74 72 69 6e  ing-split (strin
10d0: 67 2d 73 70 6c 69 74 20 6b 65 79 73 74 72 20 22  g-split keystr "
10e0: 2f 22 29 29 29 29 29 0a 09 09 20 20 20 20 20 20  /")))))...      
10f0: 20 28 69 66 20 28 6f 72 20 28 6e 75 6c 6c 3f 20   (if (or (null? 
1100: 6b 65 79 6c 73 74 29 0a 09 09 09 20 20 20 20 20  keylst)....     
1110: 20 20 28 6e 6f 74 20 28 6e 75 6c 6c 3f 20 28 66    (not (null? (f
1120: 69 6c 74 65 72 20 73 74 72 69 6e 67 2d 6e 75 6c  ilter string-nul
1130: 6c 3f 20 6b 65 79 6c 73 74 29 29 29 29 0a 09 09  l? keylst))))...
1140: 09 20 20 20 28 62 65 67 69 6e 0a 09 09 09 20 20  .   (begin....  
1150: 20 20 20 28 64 69 73 70 6c 61 79 20 22 45 6e 74     (display "Ent
1160: 65 72 20 6b 65 79 73 20 73 65 70 61 72 61 74 65  er keys separate
1170: 64 20 62 79 20 73 70 61 63 65 73 20 6f 72 20 73  d by spaces or s
1180: 6c 61 73 68 65 73 3a 20 22 29 0a 09 09 09 20 20  lashes: ")....  
1190: 20 20 20 28 6c 6f 6f 70 20 28 72 65 61 64 2d 6c     (loop (read-l
11a0: 69 6e 65 29 29 29 0a 09 09 09 20 20 20 6b 65 79  ine)))....   key
11b0: 6c 73 74 29 29 29 29 29 0a 0a 20 20 20 20 28 70  lst)))))..    (p
11c0: 72 69 6e 74 20 22 59 6f 75 20 68 61 76 65 20 63  rint "You have c
11d0: 68 6f 6f 73 65 6e 20 22 20 28 73 74 72 69 6e 67  hoosen " (string
11e0: 2d 69 6e 74 65 72 73 70 65 72 73 65 20 6b 65 79  -intersperse key
11f0: 73 20 22 2c 20 22 29 20 22 20 66 6f 72 20 79 6f  s ", ") " for yo
1200: 75 72 20 6b 65 79 73 2e 22 29 0a 20 20 20 20 0a  ur keys.").    .
1210: 20 20 20 20 3b 3b 20 4e 6f 77 20 67 65 74 20 74      ;; Now get t
1220: 68 65 20 6c 69 6e 6b 20 74 72 65 65 20 6c 6f 63  he link tree loc
1230: 61 74 69 6f 6e 20 61 6e 64 20 61 20 66 69 72 73  ation and a firs
1240: 74 20 64 69 73 6b 0a 20 20 20 20 28 70 72 69 6e  t disk.    (prin
1250: 74 0a 20 20 20 20 20 22 3d 3d 3d 3d 3d 3d 3d 3d  t.     "========
1260: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 4e 6f 77 20  ==========..Now 
1270: 79 6f 75 20 6e 65 65 64 20 61 6e 20 69 6e 69 74  you need an init
1280: 69 61 6c 20 70 6c 61 63 65 20 74 6f 20 73 74 6f  ial place to sto
1290: 72 65 20 79 6f 75 72 20 72 75 6e 73 2e 20 54 68  re your runs. Th
12a0: 65 73 65 20 61 72 65 20 63 61 6c 6c 65 64 20 5c  ese are called \
12b0: 22 64 69 73 6b 73 5c 22 20 61 6e 64 20 79 6f 75  "disks\" and you
12c0: 0a 63 61 6e 20 61 64 64 20 6d 6f 72 65 20 61 74  .can add more at
12d0: 20 61 6e 79 20 74 69 6d 65 2e 20 54 6f 20 67 65   any time. To ge
12e0: 74 20 67 6f 69 6e 67 20 70 72 6f 76 69 64 65 20  t going provide 
12f0: 61 20 77 72 69 74 65 61 62 6c 65 20 64 69 72 65  a writeable dire
1300: 63 74 6f 72 79 20 6e 61 6d 65 2e 20 0a 0a 22 29  ctory name. ..")
1310: 0a 20 20 20 20 28 64 69 73 70 6c 61 79 20 22 45  .    (display "E
1320: 6e 74 65 72 20 79 6f 75 72 20 74 65 73 74 20 72  nter your test r
1330: 75 6e 73 20 64 69 72 65 63 74 6f 72 79 3a 20 22  uns directory: "
1340: 29 0a 20 20 20 20 28 73 65 74 21 20 66 69 72 73  ).    (set! firs
1350: 74 64 20 28 72 65 61 64 2d 6c 69 6e 65 29 29 0a  td (read-line)).
1360: 20 20 20 20 28 69 66 20 28 6e 6f 74 20 28 64 69      (if (not (di
1370: 72 65 63 74 6f 72 79 3f 20 66 69 72 73 74 64 29  rectory? firstd)
1380: 29 0a 09 28 62 65 67 69 6e 0a 09 20 20 28 70 72  )..(begin..  (pr
1390: 69 6e 74 20 22 57 41 52 4e 49 4e 47 3a 20 79 6f  int "WARNING: yo
13a0: 75 20 68 61 76 65 20 73 70 65 63 69 66 69 65 64  u have specified
13b0: 20 61 20 70 61 74 68 20 22 20 66 69 72 73 74 64   a path " firstd
13c0: 20 22 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74   " that does not
13d0: 20 65 78 69 73 74 2e 20 41 74 74 65 6d 70 74 69   exist. Attempti
13e0: 6e 67 20 74 6f 20 63 72 65 61 74 65 20 69 74 2e  ng to create it.
13f0: 2e 2e 5c 6e 22 29 0a 09 20 20 28 63 72 65 61 74  ..\n")..  (creat
1400: 65 2d 64 69 72 65 63 74 6f 72 79 20 66 69 72 73  e-directory firs
1410: 74 64 20 23 74 29 29 29 0a 0a 20 20 20 20 28 70  td #t)))..    (p
1420: 72 69 6e 74 0a 20 20 20 20 20 22 3d 3d 3d 3d 3d  rint.     "=====
1430: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 4d  =============..M
1440: 65 67 61 74 65 73 74 20 75 73 65 73 20 61 20 74  egatest uses a t
1450: 72 65 65 20 6f 66 20 73 79 6d 6c 69 6e 6b 73 20  ree of symlinks 
1460: 74 6f 20 70 72 6f 76 69 64 65 20 61 20 75 6e 69  to provide a uni
1470: 66 6f 72 6d 20 73 74 72 75 63 74 75 72 65 20 66  form structure f
1480: 6f 72 20 66 69 6e 64 69 6e 67 20 61 6c 6c 20 74  or finding all t
1490: 68 65 20 74 65 73 74 73 0a 79 6f 75 20 72 75 6e  he tests.you run
14a0: 20 6f 76 65 72 20 74 69 6d 65 2e 20 50 6c 65 61   over time. Plea
14b0: 73 65 20 70 72 6f 76 69 64 65 20 61 20 70 61 74  se provide a pat
14c0: 68 20 77 68 65 72 65 20 77 65 20 63 61 6e 20 63  h where we can c
14d0: 72 65 61 74 65 20 74 68 69 73 20 6c 69 6e 6b 20  reate this link 
14e0: 74 72 65 65 2e 0a 0a 22 29 0a 20 20 20 20 28 64  tree...").    (d
14f0: 69 73 70 6c 61 79 20 22 45 6e 74 65 72 20 6c 69  isplay "Enter li
1500: 6e 6b 20 74 72 65 65 20 64 69 72 65 63 74 6f 72  nk tree director
1510: 79 3a 20 22 29 0a 20 20 20 20 28 73 65 74 21 20  y: ").    (set! 
1520: 6c 6e 74 72 65 65 20 28 72 65 61 64 2d 6c 69 6e  lntree (read-lin
1530: 65 29 29 0a 20 20 20 20 28 69 66 20 28 6e 6f 74  e)).    (if (not
1540: 20 28 64 69 72 65 63 74 6f 72 79 3f 20 6c 6e 74   (directory? lnt
1550: 72 65 65 29 29 0a 09 28 62 65 67 69 6e 0a 09 20  ree))..(begin.. 
1560: 20 28 70 72 69 6e 74 20 22 57 41 52 4e 49 4e 47   (print "WARNING
1570: 3a 20 79 6f 75 20 68 61 76 65 20 73 70 65 63 69  : you have speci
1580: 66 69 65 64 20 61 20 70 61 74 68 20 22 20 6c 6e  fied a path " ln
1590: 74 72 65 65 20 22 74 68 61 74 20 64 6f 65 73 20  tree "that does 
15a0: 6e 6f 74 20 65 78 69 73 74 2e 20 41 74 74 65 6d  not exist. Attem
15b0: 70 74 69 6e 67 20 74 6f 20 63 72 65 61 74 65 20  pting to create 
15c0: 69 74 2e 2e 2e 5c 6e 22 29 0a 09 20 20 28 63 72  it...\n")..  (cr
15d0: 65 61 74 65 2d 64 69 72 65 63 74 6f 72 79 20 6c  eate-directory l
15e0: 6e 74 72 65 65 20 23 74 29 29 29 0a 20 20 20 20  ntree #t))).    
15f0: 0a 20 20 20 20 28 77 69 74 68 2d 6f 75 74 70 75  .    (with-outpu
1600: 74 2d 74 6f 2d 66 69 6c 65 20 28 63 6f 6e 63 20  t-to-file (conc 
1610: 70 61 74 68 20 22 2f 6d 65 67 61 74 65 73 74 2e  path "/megatest.
1620: 63 6f 6e 66 69 67 22 29 0a 20 20 20 20 20 20 28  config").      (
1630: 6c 61 6d 62 64 61 20 28 29 0a 09 28 70 72 69 6e  lambda ()..(prin
1640: 74 20 22 23 20 54 68 69 73 20 61 72 65 61 20 75  t "# This area u
1650: 73 65 73 20 4d 65 67 61 74 65 73 74 2e 20 4c 65  ses Megatest. Le
1660: 61 72 6e 20 6d 6f 72 65 20 61 74 20 68 74 74 70  arn more at http
1670: 3a 2f 2f 77 77 77 2e 6b 69 61 74 6f 61 2e 63 6f  ://www.kiatoa.co
1680: 6d 2f 66 6f 73 73 69 6c 73 2f 6d 65 67 61 74 65  m/fossils/megate
1690: 73 74 2e 22 29 0a 09 28 70 72 69 6e 74 20 22 23  st.")..(print "#
16a0: 5c 6e 22 29 0a 09 28 70 72 69 6e 74 20 22 5b 66  \n")..(print "[f
16b0: 69 65 6c 64 73 5d 22 29 0a 09 28 6d 61 70 20 28  ields]")..(map (
16c0: 6c 61 6d 62 64 61 20 28 6b 29 28 70 72 69 6e 74  lambda (k)(print
16d0: 20 6b 20 22 20 54 45 58 54 22 29 29 20 6b 65 79   k " TEXT")) key
16e0: 73 29 0a 09 28 70 72 69 6e 74 20 22 22 29 0a 09  s)..(print "")..
16f0: 28 70 72 69 6e 74 20 22 5b 73 65 74 75 70 5d 22  (print "[setup]"
1700: 29 0a 09 28 70 72 69 6e 74 20 22 23 20 41 64 6a  )..(print "# Adj
1710: 75 73 74 20 6d 61 78 5f 63 6f 6e 63 75 72 72 65  ust max_concurre
1720: 6e 74 5f 6a 6f 62 73 20 74 6f 20 6c 69 6d 69 74  nt_jobs to limit
1730: 20 68 6f 77 20 6d 75 63 68 20 79 6f 75 20 6c 6f   how much you lo
1740: 61 64 20 79 6f 75 72 20 6d 61 63 68 69 6e 65 73  ad your machines
1750: 22 29 0a 09 28 70 72 69 6e 74 20 22 6d 61 78 5f  ")..(print "max_
1760: 63 6f 6e 63 75 72 72 65 6e 74 5f 6a 6f 62 73 20  concurrent_jobs 
1770: 35 30 5c 6e 22 29 0a 09 28 70 72 69 6e 74 20 22  50\n")..(print "
1780: 23 20 54 68 69 73 20 69 73 20 79 6f 75 72 20 6c  # This is your l
1790: 69 6e 6b 20 70 61 74 68 2e 20 41 76 6f 69 64 20  ink path. Avoid 
17a0: 6d 6f 76 69 6e 67 20 69 74 20 6f 6e 63 65 20 73  moving it once s
17b0: 65 74 2e 22 29 0a 09 28 70 72 69 6e 74 20 22 6c  et.")..(print "l
17c0: 69 6e 6b 74 72 65 65 20 22 20 6c 6e 74 72 65 65  inktree " lntree
17d0: 29 20 3b 3b 20 28 63 6f 6d 6d 6f 6e 3a 72 65 61  ) ;; (common:rea
17e0: 6c 2d 70 61 74 68 20 6c 6e 74 72 65 65 29 29 0a  l-path lntree)).
17f0: 09 28 70 72 69 6e 74 20 22 5c 6e 23 20 4a 6f 62  .(print "\n# Job
1800: 20 74 6f 6f 6c 73 20 61 72 65 20 6d 6f 72 65 20   tools are more 
1810: 61 64 76 61 6e 63 65 64 20 77 61 79 73 20 74 6f  advanced ways to
1820: 20 63 6f 6e 74 72 6f 6c 20 68 6f 77 20 79 6f 75   control how you
1830: 72 20 6a 6f 62 73 20 61 72 65 20 6c 61 75 6e 63  r jobs are launc
1840: 68 65 64 22 29 0a 09 28 70 72 69 6e 74 20 22 5b  hed")..(print "[
1850: 6a 6f 62 74 6f 6f 6c 73 5d 5c 6e 75 73 65 73 68  jobtools]\nusesh
1860: 65 6c 6c 20 79 65 73 5c 6e 6c 61 75 6e 63 68 65  ell yes\nlaunche
1870: 72 20 6e 62 66 61 6b 65 5c 6e 6d 61 78 6c 6f 61  r nbfake\nmaxloa
1880: 64 20 31 2e 35 5c 6e 22 29 0a 09 28 70 72 69 6e  d 1.5\n")..(prin
1890: 74 20 22 23 20 59 6f 75 20 63 61 6e 20 6f 76 65  t "# You can ove
18a0: 72 72 69 64 65 20 65 6e 76 69 72 6f 6e 6d 65 6e  rride environmen
18b0: 74 20 76 61 72 69 61 62 6c 65 73 20 66 6f 72 20  t variables for 
18c0: 61 6c 6c 20 79 6f 75 72 20 74 65 73 74 73 20 68  all your tests h
18d0: 65 72 65 22 29 0a 09 28 70 72 69 6e 74 20 22 5b  ere")..(print "[
18e0: 65 6e 76 2d 6f 76 65 72 72 69 64 65 5d 5c 6e 45  env-override]\nE
18f0: 58 41 4d 50 4c 45 5f 56 41 52 20 65 78 61 6d 70  XAMPLE_VAR examp
1900: 6c 65 20 76 61 6c 75 65 5c 6e 22 29 0a 09 28 70  le value\n")..(p
1910: 72 69 6e 74 20 22 23 20 41 73 20 79 6f 75 20 72  rint "# As you r
1920: 75 6e 20 6d 6f 72 65 20 74 65 73 74 73 20 79 6f  un more tests yo
1930: 75 20 6d 61 79 20 6e 65 65 64 20 74 6f 20 61 64  u may need to ad
1940: 64 20 61 64 64 69 74 69 6f 6e 61 6c 20 64 69 73  d additional dis
1950: 6b 73 2c 20 74 68 65 20 6e 61 6d 65 73 20 61 72  ks, the names ar
1960: 65 20 61 72 62 69 74 72 61 72 79 20 62 75 74 20  e arbitrary but 
1970: 6d 75 73 74 20 62 65 20 75 6e 69 71 75 65 22 29  must be unique")
1980: 0a 09 28 70 72 69 6e 74 20 22 5b 64 69 73 6b 73  ..(print "[disks
1990: 5d 5c 6e 64 69 73 6b 30 20 22 20 66 69 72 73 74  ]\ndisk0 " first
19a0: 64 29 29 29 20 3b 3b 20 28 63 6f 6d 6d 6f 6e 3a  d))) ;; (common:
19b0: 72 65 61 6c 2d 70 61 74 68 20 66 69 72 73 74 64  real-path firstd
19c0: 29 29 29 29 0a 20 20 20 20 0a 20 20 20 20 28 70  )))).    .    (p
19d0: 72 69 6e 74 0a 20 20 20 20 20 22 3d 3d 3d 3d 3d  rint.     "=====
19e0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 49  =============..I
19f0: 27 6d 20 6e 6f 77 20 63 72 65 61 74 69 6e 67 20  'm now creating 
1a00: 61 20 72 75 6e 63 6f 6e 66 69 67 73 2e 63 6f 6e  a runconfigs.con
1a10: 66 69 67 20 66 69 6c 65 20 66 6f 72 20 79 6f 75  fig file for you
1a20: 20 77 69 74 68 20 61 20 64 65 66 61 75 6c 74 20   with a default 
1a30: 73 65 63 74 69 6f 6e 2e 0a 59 6f 75 20 63 61 6e  section..You can
1a40: 20 75 73 65 20 74 68 69 73 20 66 69 6c 65 20 74   use this file t
1a50: 6f 20 73 65 74 20 76 61 72 69 61 62 6c 65 73 20  o set variables 
1a60: 66 6f 72 20 79 6f 75 72 20 74 65 73 74 73 20 62  for your tests b
1a70: 61 73 65 64 20 6f 6e 20 74 68 65 20 5c 22 74 61  ased on the \"ta
1a80: 72 67 65 74 5c 22 20 28 74 68 65 20 63 6f 6d 62  rget\" (the comb
1a90: 69 6e 61 74 69 6f 6e 0a 6f 66 20 6b 65 79 73 29  ination.of keys)
1aa0: 2e 0a 0a 22 29 0a 20 20 20 20 28 77 69 74 68 2d  ...").    (with-
1ab0: 6f 75 74 70 75 74 2d 74 6f 2d 66 69 6c 65 20 28  output-to-file (
1ac0: 63 6f 6e 63 20 70 61 74 68 20 22 2f 72 75 6e 63  conc path "/runc
1ad0: 6f 6e 66 69 67 73 2e 63 6f 6e 66 69 67 22 29 0a  onfigs.config").
1ae0: 20 20 20 20 20 20 28 6c 61 6d 62 64 61 20 28 29        (lambda ()
1af0: 0a 09 28 70 72 69 6e 74 20 22 23 20 54 68 65 20  ..(print "# The 
1b00: 76 61 72 69 61 62 6c 65 73 20 69 6e 20 74 68 65  variables in the
1b10: 20 64 65 66 61 75 6c 74 20 63 61 74 65 67 6f 72   default categor
1b20: 79 20 77 69 6c 6c 20 62 65 20 73 65 65 6e 20 69  y will be seen i
1b30: 6e 20 61 6c 6c 20 72 75 6e 73 5c 6e 5b 64 65 66  n all runs\n[def
1b40: 61 75 6c 74 5d 5c 6e 41 4c 4c 54 45 53 54 53 20  ault]\nALLTESTS 
1b50: 73 65 65 20 74 68 69 73 20 76 61 72 69 61 62 6c  see this variabl
1b60: 65 5c 6e 22 29 0a 09 0a 09 28 70 72 69 6e 74 20  e\n")....(print 
1b70: 22 23 20 59 6f 75 72 20 76 61 72 69 61 62 6c 65  "# Your variable
1b80: 73 20 68 65 72 65 20 61 72 65 20 67 72 6f 75 70  s here are group
1b90: 65 64 20 62 79 20 74 61 72 67 65 74 73 20 5b 22  ed by targets ["
1ba0: 20 28 73 74 72 69 6e 67 2d 69 6e 74 65 72 73 70   (string-intersp
1bb0: 65 72 73 65 20 6b 65 79 73 20 22 2f 22 29 20 22  erse keys "/") "
1bc0: 5d 22 29 0a 09 28 6c 65 74 20 28 28 65 78 61 6d  ]")..(let ((exam
1bd0: 70 6c 65 2d 74 61 72 67 65 74 20 28 73 74 72 69  ple-target (stri
1be0: 6e 67 2d 69 6e 74 65 72 73 70 65 72 73 65 20 28  ng-intersperse (
1bf0: 6d 61 70 20 28 6c 61 6d 62 64 61 20 28 6b 29 28  map (lambda (k)(
1c00: 63 6f 6e 63 20 6b 20 22 5f 76 61 6c 22 29 29 20  conc k "_val")) 
1c10: 6b 65 79 73 29 20 22 2f 22 29 29 29 0a 09 20 20  keys) "/")))..  
1c20: 28 70 72 69 6e 74 20 22 5b 22 20 65 78 61 6d 70  (print "[" examp
1c30: 6c 65 2d 74 61 72 67 65 74 20 22 5d 22 29 0a 09  le-target "]")..
1c40: 20 20 28 70 72 69 6e 74 20 22 41 4e 4f 54 48 45    (print "ANOTHE
1c50: 52 56 41 52 20 6f 6e 6c 79 20 64 65 66 69 6e 65  RVAR only define
1c60: 64 20 69 66 20 74 61 72 67 65 74 20 69 73 20 22  d if target is "
1c70: 20 65 78 61 6d 70 6c 65 2d 74 61 72 67 65 74 29   example-target)
1c80: 29 0a 09 28 70 72 69 6e 74 20 22 5c 6e 23 20 49  )..(print "\n# I
1c90: 74 20 63 61 6e 20 62 65 20 68 61 6e 64 79 20 74  t can be handy t
1ca0: 6f 20 69 6e 63 6c 75 64 65 20 61 20 66 69 6c 65  o include a file
1cb0: 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 75 73   based on the us
1cc0: 65 72 73 20 75 6e 69 78 20 75 73 65 72 6e 61 6d  ers unix usernam
1cd0: 65 2e 5c 6e 22 0a 09 20 20 20 20 20 20 20 22 23  e.\n"..       "#
1ce0: 20 54 6f 20 70 72 65 76 65 6e 74 20 63 6c 75 74   To prevent clut
1cf0: 74 65 72 69 6e 67 20 75 70 20 74 68 65 20 74 6f  tering up the to
1d00: 70 20 6c 65 76 65 6c 20 64 69 72 65 63 74 6f 72  p level director
1d10: 79 20 77 65 27 6c 6c 20 70 75 74 20 74 68 69 73  y we'll put this
1d20: 20 66 69 6c 65 5c 6e 23 20 69 6e 20 61 20 64 69   file\n# in a di
1d30: 72 65 63 74 6f 72 79 20 63 61 6c 6c 65 64 20 5c  rectory called \
1d40: 22 63 6f 6e 66 69 67 73 5c 22 2e 22 29 0a 09 28  "configs\".")..(
1d50: 70 72 69 6e 74 20 22 5b 69 6e 63 6c 75 64 65 20  print "[include 
1d60: 23 7b 67 65 74 65 6e 76 20 55 53 45 52 7d 2e 63  #{getenv USER}.c
1d70: 6f 6e 66 69 67 5d 22 29 0a 09 29 29 0a 0a 20 20  onfig]")..))..  
1d80: 20 20 28 63 72 65 61 74 65 2d 64 69 72 65 63 74    (create-direct
1d90: 6f 72 79 20 28 63 6f 6e 63 20 70 61 74 68 20 22  ory (conc path "
1da0: 2f 63 6f 6e 66 69 67 73 22 29 20 23 74 29 0a 20  /configs") #t). 
1db0: 20 20 20 28 77 69 74 68 2d 6f 75 74 70 75 74 2d     (with-output-
1dc0: 74 6f 2d 66 69 6c 65 20 28 63 6f 6e 63 20 70 61  to-file (conc pa
1dd0: 74 68 20 22 2f 63 6f 6e 66 69 67 73 2f 22 20 28  th "/configs/" (
1de0: 63 75 72 72 65 6e 74 2d 75 73 65 72 2d 6e 61 6d  current-user-nam
1df0: 65 29 20 22 2e 63 6f 6e 66 69 67 22 29 0a 20 20  e) ".config").  
1e00: 20 20 20 20 28 6c 61 6d 62 64 61 20 28 29 0a 09      (lambda ()..
1e10: 28 70 72 69 6e 74 20 22 23 20 4f 76 65 72 72 69  (print "# Overri
1e20: 64 65 20 73 65 74 74 69 6e 67 73 20 69 6e 20 2e  de settings in .
1e30: 2e 2f 72 75 6e 63 6f 6e 66 69 67 73 2e 63 6f 6e  ./runconfigs.con
1e40: 66 69 67 20 66 6f 72 20 75 73 65 72 20 22 20 28  fig for user " (
1e50: 63 75 72 72 65 6e 74 2d 75 73 65 72 2d 6e 61 6d  current-user-nam
1e60: 65 29 20 22 20 68 65 72 65 2e 22 29 29 29 0a 20  e) " here."))). 
1e70: 20 20 20 0a 20 20 20 20 3b 3b 20 4e 6f 77 20 63     .    ;; Now c
1e80: 72 65 61 74 65 20 61 20 74 65 73 74 20 61 6e 64  reate a test and
1e90: 20 6c 6f 67 70 72 6f 20 66 69 6c 65 0a 20 20 20   logpro file.   
1ea0: 20 28 70 72 69 6e 74 0a 20 20 20 20 20 22 3d 3d   (print.     "==
1eb0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1ec0: 0a 0a 59 6f 75 20 6e 6f 77 20 68 61 76 65 20 74  ..You now have t
1ed0: 68 65 20 62 61 73 69 63 20 63 6f 6d 6d 6f 6e 20  he basic common 
1ee0: 66 69 6c 65 73 20 66 6f 72 20 79 6f 75 72 20 6d  files for your m
1ef0: 65 67 61 74 65 73 74 20 73 65 74 75 70 2e 20 4e  egatest setup. N
1f00: 65 78 74 20 72 75 6e 0a 5c 22 6d 65 67 61 74 65  ext run.\"megate
1f10: 73 74 20 2d 63 72 65 61 74 65 2d 74 65 73 74 20  st -create-test 
1f20: 3c 74 65 73 74 6e 61 6d 65 3e 5c 22 20 74 6f 20  <testname>\" to 
1f30: 63 72 65 61 74 65 20 61 20 74 65 73 74 2e 0a 0a  create a test...
1f40: 54 68 61 6e 6b 20 79 6f 75 20 66 6f 72 20 75 73  Thank you for us
1f50: 69 6e 67 20 4d 65 67 61 74 65 73 74 2e 20 0a 0a  ing Megatest. ..
1f60: 59 6f 75 20 63 61 6e 20 65 64 69 74 20 79 6f 75  You can edit you
1f70: 72 20 63 6f 6e 66 69 67 20 66 69 6c 65 73 20 61  r config files a
1f80: 6e 64 20 63 72 65 61 74 65 20 74 65 73 74 73 20  nd create tests 
1f90: 69 6e 20 74 68 65 20 22 20 70 61 74 68 20 22 20  in the " path " 
1fa0: 64 69 72 65 63 74 6f 72 79 0a 0a 22 29 29 29 0a  directory.."))).
1fb0: 0a 0a 3b 3b 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ..;;============
1fc0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1fd0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1fe0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1ff0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 3b 3b 20 63 72  ==========.;; cr
2000: 65 61 74 65 20 73 6b 65 6c 65 74 6f 6e 20 66 69  eate skeleton fi
2010: 6c 65 73 20 66 6f 72 20 61 20 74 65 73 74 0a 3b  les for a test.;
2020: 3b 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ;===============
2030: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2040: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2050: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2060: 3d 3d 3d 3d 3d 3d 3d 0a 0a 28 64 65 66 69 6e 65  =======..(define
2070: 20 28 67 65 6e 65 78 61 6d 70 6c 65 3a 6d 6b 2d   (genexample:mk-
2080: 6d 65 67 61 74 65 73 74 2d 74 65 73 74 20 74 65  megatest-test te
2090: 73 74 6e 61 6d 65 29 0a 20 20 3b 3b 20 47 61 74  stname).  ;; Gat
20a0: 68 65 72 20 6e 65 65 64 65 64 20 64 61 74 61 0a  her needed data.
20b0: 20 20 28 6c 65 74 20 28 28 77 61 69 74 6f 6e 20    (let ((waiton 
20c0: 20 20 23 66 29 0a 09 28 70 72 69 6f 72 69 74 79    #f)..(priority
20d0: 20 23 66 29 0a 09 28 64 65 73 63 72 69 70 74 69   #f)..(descripti
20e0: 6f 6e 20 23 66 29 0a 09 28 73 74 65 70 73 20 20  on #f)..(steps  
20f0: 20 20 27 28 29 29 0a 09 28 73 63 72 69 70 74 73    '())..(scripts
2100: 20 20 27 28 29 29 0a 09 28 69 74 65 6d 73 20 20    '())..(items  
2110: 20 20 27 28 29 29 0a 09 28 72 65 6c 2d 70 61 74    '())..(rel-pat
2120: 68 20 23 66 29 29 0a 0a 20 20 20 20 28 63 6f 6e  h #f))..    (con
2130: 64 0a 20 20 20 20 20 28 28 63 6f 6d 6d 6f 6e 3a  d.     ((common:
2140: 66 69 6c 65 2d 65 78 69 73 74 73 3f 20 22 6d 65  file-exists? "me
2150: 67 61 74 65 73 74 2e 63 6f 6e 66 69 67 22 29 20  gatest.config") 
2160: 20 20 20 20 20 20 20 20 28 73 65 74 21 20 72 65          (set! re
2170: 6c 2d 70 61 74 68 20 22 2e 2f 22 29 29 0a 20 20  l-path "./")).  
2180: 20 20 20 28 28 63 6f 6d 6d 6f 6e 3a 66 69 6c 65     ((common:file
2190: 2d 65 78 69 73 74 73 3f 20 22 2e 2e 2f 6d 65 67  -exists? "../meg
21a0: 61 74 65 73 74 2e 63 6f 6e 66 69 67 22 29 20 20  atest.config")  
21b0: 20 20 20 20 28 73 65 74 21 20 72 65 6c 2d 70 61      (set! rel-pa
21c0: 74 68 20 22 2e 2e 2f 22 29 29 0a 20 20 20 20 20  th "../")).     
21d0: 28 28 63 6f 6d 6d 6f 6e 3a 66 69 6c 65 2d 65 78  ((common:file-ex
21e0: 69 73 74 73 3f 20 22 2e 2e 2f 2e 2e 2f 6d 65 67  ists? "../../meg
21f0: 61 74 65 73 74 2e 63 6f 6e 66 69 67 22 29 20 20  atest.config")  
2200: 20 28 73 65 74 21 20 72 65 6c 2d 70 61 74 68 20   (set! rel-path 
2210: 22 2e 2e 2f 2e 2e 2f 22 29 29 0a 20 20 20 20 20  "../../")).     
2220: 28 28 63 6f 6d 6d 6f 6e 3a 66 69 6c 65 2d 65 78  ((common:file-ex
2230: 69 73 74 73 3f 20 22 2e 2e 2f 2e 2e 2f 2e 2e 2f  ists? "../../../
2240: 6d 65 67 61 74 65 73 74 2e 63 6f 6e 66 69 67 22  megatest.config"
2250: 29 28 73 65 74 21 20 72 65 6c 2d 70 61 74 68 20  )(set! rel-path 
2260: 22 2e 2e 2f 2e 2e 2f 2e 2e 2f 22 29 29 29 20 3b  "../../../"))) ;
2270: 3b 20 67 6f 6f 64 20 65 6e 6f 75 67 68 20 64 61  ; good enough da
2280: 6e 67 20 69 74 2e 0a 0a 20 20 20 20 3b 3b 20 44  ng it...    ;; D
2290: 6f 6e 27 74 20 67 61 74 68 65 72 20 64 61 74 61  on't gather data
22a0: 20 6f 72 20 63 6f 6e 74 69 6e 75 65 20 69 66 20   or continue if 
22b0: 61 29 20 6d 65 67 61 74 65 73 74 2e 63 6f 6e 66  a) megatest.conf
22c0: 69 67 20 63 61 6e 27 74 20 62 65 20 66 6f 75 6e  ig can't be foun
22d0: 64 20 6f 72 20 62 29 20 74 65 73 74 63 6f 6e 66  d or b) testconf
22e0: 69 67 20 61 6c 72 65 61 64 79 20 65 78 69 73 74  ig already exist
22f0: 73 0a 20 20 20 20 28 69 66 20 28 6e 6f 74 20 72  s.    (if (not r
2300: 65 6c 2d 70 61 74 68 29 0a 09 28 62 65 67 69 6e  el-path)..(begin
2310: 0a 09 20 20 28 70 72 69 6e 74 20 22 45 52 52 4f  ..  (print "ERRO
2320: 52 3a 20 49 20 63 6f 75 6c 64 20 6e 6f 74 20 66  R: I could not f
2330: 69 6e 64 20 6d 65 67 61 74 65 73 74 2e 63 6f 6e  ind megatest.con
2340: 66 69 67 2c 20 70 6c 65 61 73 65 20 72 75 6e 20  fig, please run 
2350: 2d 63 72 65 61 74 65 2d 74 65 73 74 20 69 6e 20  -create-test in 
2360: 74 68 65 20 74 6f 70 20 64 69 72 20 6f 66 20 79  the top dir of y
2370: 6f 75 72 20 6d 65 67 61 74 65 73 74 20 61 72 65  our megatest are
2380: 61 22 29 0a 09 20 20 28 65 78 69 74 20 31 29 29  a")..  (exit 1))
2390: 29 0a 0a 20 20 20 20 28 69 66 20 28 63 6f 6d 6d  )..    (if (comm
23a0: 6f 6e 3a 66 69 6c 65 2d 65 78 69 73 74 73 3f 20  on:file-exists? 
23b0: 28 63 6f 6e 63 20 72 65 6c 2d 70 61 74 68 20 22  (conc rel-path "
23c0: 74 65 73 74 73 2f 22 20 74 65 73 74 6e 61 6d 65  tests/" testname
23d0: 20 22 2f 74 65 73 74 63 6f 6e 66 69 67 22 29 29   "/testconfig"))
23e0: 0a 09 28 62 65 67 69 6e 0a 09 20 20 28 70 72 69  ..(begin..  (pri
23f0: 6e 74 20 22 57 41 52 4e 49 4e 47 3a 20 59 6f 75  nt "WARNING: You
2400: 20 61 6c 72 65 61 64 79 20 68 61 76 65 20 61 20   already have a 
2410: 74 65 73 74 63 6f 6e 66 69 67 20 69 6e 20 22 20  testconfig in " 
2420: 72 65 6c 2d 70 61 74 68 20 22 74 65 73 74 73 2f  rel-path "tests/
2430: 22 20 74 65 73 74 6e 61 6d 65 20 22 2c 20 64 6f  " testname ", do
2440: 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 6c 6f   you want to clo
2450: 62 62 65 72 20 79 6f 75 72 20 66 69 6c 65 73 3f  bber your files?
2460: 22 29 0a 09 20 20 28 64 69 73 70 6c 61 79 20 22  ")..  (display "
2470: 45 6e 74 65 72 20 79 2f 6e 3a 20 22 29 0a 09 20  Enter y/n: ").. 
2480: 20 28 69 66 20 28 6e 6f 74 20 28 65 71 75 61 6c   (if (not (equal
2490: 3f 20 22 79 22 20 28 72 65 61 64 2d 6c 69 6e 65  ? "y" (read-line
24a0: 29 29 29 0a 09 20 20 20 20 20 20 28 62 65 67 69  )))..      (begi
24b0: 6e 0a 09 09 28 70 72 69 6e 74 20 22 49 4e 46 4f  n...(print "INFO
24c0: 3a 20 75 73 65 72 20 61 62 6f 72 74 20 6f 66 20  : user abort of 
24d0: 63 72 65 61 74 69 6f 6e 20 6f 66 20 74 65 73 74  creation of test
24e0: 20 22 20 74 65 73 74 6e 61 6d 65 29 0a 09 09 28   " testname)...(
24f0: 65 78 69 74 20 31 29 29 29 29 29 0a 0a 20 20 20  exit 1)))))..   
2500: 20 28 70 72 69 6e 74 20 22 57 65 20 61 72 65 20   (print "We are 
2510: 67 6f 69 6e 67 20 74 6f 20 67 65 6e 65 72 61 74  going to generat
2520: 65 20 61 20 73 6b 65 6c 65 74 6f 6e 20 73 65 74  e a skeleton set
2530: 20 6f 66 20 66 69 6c 65 73 20 66 6f 72 20 79 6f   of files for yo
2540: 75 72 20 74 65 73 74 20 22 20 74 65 73 74 6e 61  ur test " testna
2550: 6d 65 20 22 5c 6e 22 0a 09 20 20 20 22 20 2a 2a  me "\n"..   " **
2560: 2a 20 4e 6f 74 65 3a 20 64 6f 20 6e 6f 74 20 77  * Note: do not w
2570: 6f 72 72 79 20 74 6f 6f 20 6d 75 63 68 20 61 62  orry too much ab
2580: 6f 75 74 20 74 79 70 6f 73 2c 20 79 6f 75 20 63  out typos, you c
2590: 61 6e 20 65 64 69 74 20 74 68 65 20 66 69 6c 65  an edit the file
25a0: 73 20 63 72 65 61 74 65 64 20 77 68 65 6e 20 79  s created when y
25b0: 6f 75 20 61 72 65 20 64 6f 6e 65 2e 22 29 0a 0a  ou are done.")..
25c0: 20 20 20 20 28 70 72 69 6e 74 20 22 5c 6e 3d 3d      (print "\n==
25d0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
25e0: 5c 6e 50 6c 65 61 73 65 20 64 65 73 63 72 69 62  \nPlease describ
25f0: 65 20 74 68 69 73 20 74 65 73 74 2e 20 54 68 65  e this test. The
2600: 20 64 65 73 63 72 69 70 74 69 6f 6e 20 77 69 6c   description wil
2610: 6c 20 62 65 20 76 69 73 69 62 6c 65 20 69 6e 20  l be visible in 
2620: 76 61 72 69 6f 75 73 20 64 69 61 6c 6f 67 73 20  various dialogs 
2630: 61 6e 64 20 72 65 70 6f 72 74 73 22 29 0a 20 20  and reports").  
2640: 20 20 28 64 69 73 70 6c 61 79 20 22 45 6e 74 65    (display "Ente
2650: 72 20 6f 6e 65 20 6c 69 6e 65 20 64 65 73 63 72  r one line descr
2660: 69 70 74 69 6f 6e 20 66 6f 72 20 74 68 69 73 20  iption for this 
2670: 74 65 73 74 3a 20 22 29 0a 20 20 20 20 28 73 65  test: ").    (se
2680: 74 21 20 64 65 73 63 72 69 70 74 69 6f 6e 20 28  t! description (
2690: 72 65 61 64 2d 6c 69 6e 65 29 29 0a 0a 20 20 20  read-line))..   
26a0: 20 28 70 72 69 6e 74 20 22 5c 6e 5c 6e 3d 3d 3d   (print "\n\n===
26b0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 5c  ===============\
26c0: 6e 44 6f 65 73 20 74 68 69 73 20 74 65 73 74 2c  nDoes this test,
26d0: 20 22 20 74 65 73 74 6e 61 6d 65 20 22 2c 20 72   " testname ", r
26e0: 65 71 75 69 72 65 20 61 6e 79 20 6f 74 68 65 72  equire any other
26f0: 20 74 65 73 74 20 62 65 20 72 75 6e 20 70 72 69   test be run pri
2700: 6f 72 20 74 6f 20 6c 61 75 6e 63 68 3f 22 29 0a  or to launch?").
2710: 20 20 20 20 28 64 69 73 70 6c 61 79 20 28 63 6f      (display (co
2720: 6e 63 20 22 45 6e 74 65 72 20 73 70 61 63 65 20  nc "Enter space 
2730: 64 65 6c 69 6d 69 74 65 64 20 6c 69 73 74 20 6f  delimited list o
2740: 66 20 74 65 73 74 73 20 77 68 69 63 68 20 22 20  f tests which " 
2750: 74 65 73 74 6e 61 6d 65 20 22 20 6d 75 73 74 20  testname " must 
2760: 77 61 69 74 20 66 6f 72 20 28 64 65 66 61 75 6c  wait for (defaul
2770: 74 20 69 73 20 6e 6f 20 77 61 69 74 6f 6e 29 3a  t is no waiton):
2780: 20 22 29 29 0a 20 20 20 20 28 73 65 74 21 20 77   ")).    (set! w
2790: 61 69 74 6f 6e 20 28 72 65 61 64 2d 6c 69 6e 65  aiton (read-line
27a0: 29 29 0a 0a 20 20 20 20 28 70 72 69 6e 74 20 22  ))..    (print "
27b0: 5c 6e 5c 6e 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  \n\n============
27c0: 3d 3d 3d 3d 3d 3d 5c 6e 44 6f 20 79 6f 75 20 77  ======\nDo you w
27d0: 69 73 68 20 74 6f 20 70 72 69 6f 72 69 74 69 7a  ish to prioritiz
27e0: 65 20 74 68 65 20 72 75 6e 6e 69 6e 67 20 6f 66  e the running of
27f0: 20 74 68 69 73 20 74 65 73 74 20 6f 76 65 72 20   this test over 
2800: 6f 74 68 65 72 20 74 65 73 74 73 3f 20 49 66 20  other tests? If 
2810: 73 6f 22 29 0a 20 20 20 20 28 70 72 69 6e 74 20  so").    (print 
2820: 22 65 6e 74 65 72 20 61 20 6e 75 6d 62 65 72 20  "enter a number 
2830: 67 72 65 61 74 65 72 20 74 68 61 6e 20 7a 65 72  greater than zer
2840: 6f 20 68 65 72 65 22 29 0a 20 20 20 20 28 64 69  o here").    (di
2850: 73 70 6c 61 79 20 22 45 6e 74 65 72 20 61 20 70  splay "Enter a p
2860: 72 69 6f 72 69 74 79 20 6f 66 20 30 20 28 64 65  riority of 0 (de
2870: 66 61 75 6c 74 29 20 6f 72 20 68 69 67 68 65 72  fault) or higher
2880: 3a 20 22 29 0a 20 20 20 20 28 73 65 74 21 20 70  : ").    (set! p
2890: 72 69 6f 72 69 74 79 20 28 72 65 61 64 2d 6c 69  riority (read-li
28a0: 6e 65 29 29 0a 0a 20 20 20 20 3b 3b 20 47 65 74  ne))..    ;; Get
28b0: 20 74 68 65 20 73 74 65 70 73 0a 20 20 20 20 28   the steps.    (
28c0: 70 72 69 6e 74 20 22 5c 6e 3d 3d 3d 3d 3d 3d 3d  print "\n=======
28d0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 5c 6e 4e 6f 77  ===========\nNow
28e0: 20 74 6f 20 65 6e 74 65 72 20 74 68 65 20 6f 6e   to enter the on
28f0: 65 20 6f 72 20 6d 6f 72 65 20 73 74 65 70 73 20  e or more steps 
2900: 74 68 61 74 20 6d 61 6b 65 20 75 70 20 79 6f 75  that make up you
2910: 72 20 74 65 73 74 2c 20 6e 6f 74 65 3b 20 79 6f  r test, note; yo
2920: 75 20 63 61 6e 20 61 64 64 20 6d 6f 72 65 20 6c  u can add more l
2930: 61 74 65 72 22 29 0a 20 20 20 20 28 70 72 69 6e  ater").    (prin
2940: 74 20 22 48 69 6e 74 3b 20 75 73 65 20 2e 73 68  t "Hint; use .sh
2950: 20 65 78 74 65 6e 73 69 6f 6e 20 6f 6e 20 74 68   extension on th
2960: 65 20 73 63 72 69 70 74 20 6e 61 6d 65 73 20 61  e script names a
2970: 6e 64 20 77 65 27 6c 6c 20 63 72 65 61 74 65 20  nd we'll create 
2980: 61 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 73 63  a placeholder sc
2990: 72 69 70 74 2e 22 0a 0a 20 20 20 20 28 6c 65 74  ript."..    (let
29a0: 20 28 28 73 74 65 70 6e 61 6d 65 20 20 20 23 66   ((stepname   #f
29b0: 29 0a 09 20 20 28 73 63 72 69 70 74 6e 61 6d 65  )..  (scriptname
29c0: 20 23 66 29 29 0a 20 20 20 20 20 20 28 6c 65 74   #f)).      (let
29d0: 20 6c 6f 6f 70 20 28 28 64 6f 6e 65 20 23 66 29   loop ((done #f)
29e0: 29 0a 09 28 64 69 73 70 6c 61 79 20 22 45 6e 74  )..(display "Ent
29f0: 65 72 20 74 68 65 20 6e 61 6d 65 20 66 6f 72 20  er the name for 
2a00: 74 68 69 73 20 73 74 65 70 20 28 62 6c 61 6e 6b  this step (blank
2a10: 20 74 6f 20 73 74 6f 70 29 3a 20 22 29 0a 09 28   to stop): ")..(
2a20: 73 65 74 21 20 73 74 65 70 6e 61 6d 65 20 28 72  set! stepname (r
2a30: 65 61 64 2d 6c 69 6e 65 29 29 0a 09 28 69 66 20  ead-line))..(if 
2a40: 28 6e 6f 74 20 28 65 71 75 61 6c 3f 20 73 74 65  (not (equal? ste
2a50: 70 6e 61 6d 65 20 22 22 29 29 0a 09 20 20 20 20  pname ""))..    
2a60: 28 62 65 67 69 6e 0a 09 20 20 20 20 20 20 28 64  (begin..      (d
2a70: 69 73 70 6c 61 79 20 22 45 6e 74 65 72 20 74 68  isplay "Enter th
2a80: 65 20 73 63 72 69 70 74 20 6f 72 20 70 72 6f 67  e script or prog
2a90: 61 6d 20 74 6f 20 72 75 6e 3a 20 22 29 0a 09 20  am to run: ").. 
2aa0: 20 20 20 20 20 28 73 65 74 21 20 73 63 72 69 70       (set! scrip
2ab0: 74 6e 61 6d 65 20 28 72 65 61 64 2d 6c 69 6e 65  tname (read-line
2ac0: 29 29 0a 09 20 20 20 20 20 20 28 73 65 74 21 20  ))..      (set! 
2ad0: 73 74 65 70 73 20 28 61 70 70 65 6e 64 20 73 74  steps (append st
2ae0: 65 70 73 20 28 6c 69 73 74 20 28 6c 69 73 74 20  eps (list (list 
2af0: 73 74 65 70 6e 61 6d 65 20 73 63 72 69 70 74 6e  stepname scriptn
2b00: 61 6d 65 29 29 29 29 29 29 0a 09 28 69 66 20 28  ame))))))..(if (
2b10: 6e 6f 74 20 28 65 71 75 61 6c 3f 20 73 74 65 70  not (equal? step
2b20: 6e 61 6d 65 20 22 22 29 29 0a 09 20 20 20 20 28  name ""))..    (
2b30: 62 65 67 69 6e 0a 09 20 20 20 20 20 20 28 70 72  begin..      (pr
2b40: 69 6e 74 20 22 41 64 64 65 64 20 73 74 65 70 20  int "Added step 
2b50: 22 20 73 74 65 70 6e 61 6d 65 20 22 20 74 6f 20  " stepname " to 
2b60: 6c 69 73 74 20 6f 66 20 73 74 65 70 73 2e 5c 6e  list of steps.\n
2b70: 22 29 0a 09 20 20 20 20 20 20 28 6c 6f 6f 70 20  ")..      (loop 
2b80: 23 66 29 29 29 29 29 0a 0a 20 20 20 20 3b 3b 20  #f)))))..    ;; 
2b90: 47 65 74 20 74 68 65 20 69 74 65 6d 73 0a 20 20  Get the items.  
2ba0: 20 20 28 70 72 69 6e 74 20 22 5c 6e 5c 6e 3d 3d    (print "\n\n==
2bb0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2bc0: 5c 6e 4e 65 78 74 20 77 65 20 6e 65 65 64 20 74  \nNext we need t
2bd0: 6f 20 67 65 74 20 74 68 65 20 76 61 72 69 61 62  o get the variab
2be0: 6c 65 73 20 61 6e 64 20 76 61 6c 75 65 73 20 79  les and values y
2bf0: 6f 75 20 77 69 73 68 20 74 6f 20 69 74 65 72 61  ou wish to itera
2c00: 74 65 20 74 68 69 73 20 74 65 73 74 20 6f 76 65  te this test ove
2c10: 72 20 28 62 6c 61 6e 6b 20 66 6f 72 20 6e 6f 6e  r (blank for non
2c20: 65 29 22 29 0a 20 20 20 20 28 6c 65 74 20 28 28  e)").    (let ((
2c30: 76 61 72 6e 61 6d 65 20 23 66 29 0a 09 20 20 28  varname #f)..  (
2c40: 76 61 6c 75 65 73 20 20 23 66 29 29 0a 20 20 20  values  #f)).   
2c50: 20 20 20 28 6c 65 74 20 6c 6f 6f 70 20 28 28 64     (let loop ((d
2c60: 6f 6e 65 20 23 66 29 29 0a 09 28 64 69 73 70 6c  one #f))..(displ
2c70: 61 79 20 22 45 6e 74 65 72 20 74 68 65 20 76 61  ay "Enter the va
2c80: 72 69 61 62 6c 65 20 6e 61 6d 65 3a 20 22 29 0a  riable name: ").
2c90: 09 28 73 65 74 21 20 76 61 72 6e 61 6d 65 20 28  .(set! varname (
2ca0: 72 65 61 64 2d 6c 69 6e 65 29 29 0a 09 28 69 66  read-line))..(if
2cb0: 20 28 6e 6f 74 20 28 65 71 75 61 6c 3f 20 76 61   (not (equal? va
2cc0: 72 6e 61 6d 65 20 22 22 29 29 0a 09 20 20 20 20  rname ""))..    
2cd0: 28 62 65 67 69 6e 0a 09 20 20 20 20 20 20 28 64  (begin..      (d
2ce0: 69 73 70 6c 61 79 20 28 63 6f 6e 63 20 22 45 6e  isplay (conc "En
2cf0: 74 65 72 20 74 68 65 20 73 70 61 63 65 20 73 65  ter the space se
2d00: 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20  parated list of 
2d10: 76 61 6c 75 65 73 20 66 6f 72 20 22 20 76 61 72  values for " var
2d20: 6e 61 6d 65 20 22 3a 20 22 29 29 0a 09 20 20 20  name ": "))..   
2d30: 20 20 20 28 73 65 74 21 20 76 61 6c 75 65 73 20     (set! values 
2d40: 28 72 65 61 64 2d 6c 69 6e 65 29 29 0a 09 20 20  (read-line))..  
2d50: 20 20 20 20 28 73 65 74 21 20 69 74 65 6d 73 20      (set! items 
2d60: 28 61 70 70 65 6e 64 20 69 74 65 6d 73 20 28 6c  (append items (l
2d70: 69 73 74 20 28 63 6f 6e 63 20 76 61 72 6e 61 6d  ist (conc varnam
2d80: 65 20 22 20 22 20 76 61 6c 75 65 73 29 29 29 29  e " " values))))
2d90: 29 29 0a 09 28 69 66 20 28 6e 6f 74 20 28 65 71  ))..(if (not (eq
2da0: 75 61 6c 3f 20 76 61 72 6e 61 6d 65 20 22 22 29  ual? varname "")
2db0: 29 0a 09 20 20 20 20 28 6c 6f 6f 70 20 23 66 29  )..    (loop #f)
2dc0: 29 29 29 0a 0a 20 20 20 20 3b 3b 20 4e 6f 77 20  )))..    ;; Now 
2dd0: 63 72 65 61 74 65 20 74 68 65 20 74 65 73 74 0a  create the test.
2de0: 20 20 20 20 28 69 66 20 28 6e 6f 74 20 72 65 6c      (if (not rel
2df0: 2d 70 61 74 68 29 0a 09 28 62 65 67 69 6e 0a 09  -path)..(begin..
2e00: 20 20 28 70 72 69 6e 74 20 22 45 52 52 4f 52 3a    (print "ERROR:
2e10: 20 59 6f 75 20 6d 75 73 74 20 72 75 6e 20 74 68   You must run th
2e20: 69 73 20 63 6f 6d 6d 61 6e 64 20 69 6e 20 61 20  is command in a 
2e30: 6d 65 67 61 74 65 73 74 20 61 72 65 61 20 75 6e  megatest area un
2e40: 64 65 72 20 77 68 65 72 65 20 74 68 65 20 6d 65  der where the me
2e50: 67 61 74 65 73 74 2e 63 6f 6e 66 69 67 20 66 69  gatest.config fi
2e60: 6c 65 20 65 78 69 73 74 73 2e 22 29 0a 09 20 20  le exists.")..  
2e70: 28 65 78 69 74 20 31 29 29 0a 09 28 6c 65 74 20  (exit 1))..(let 
2e80: 28 28 74 65 73 74 64 69 72 20 28 63 6f 6e 63 20  ((testdir (conc 
2e90: 72 65 6c 2d 70 61 74 68 20 22 74 65 73 74 73 2f  rel-path "tests/
2ea0: 22 20 74 65 73 74 6e 61 6d 65 29 29 29 0a 09 20  " testname))).. 
2eb0: 20 28 63 72 65 61 74 65 2d 64 69 72 65 63 74 6f   (create-directo
2ec0: 72 79 20 74 65 73 74 64 69 72 20 23 74 29 0a 09  ry testdir #t)..
2ed0: 20 20 28 77 69 74 68 2d 6f 75 74 70 75 74 2d 74    (with-output-t
2ee0: 6f 2d 66 69 6c 65 20 28 63 6f 6e 63 20 74 65 73  o-file (conc tes
2ef0: 74 64 69 72 20 22 2f 74 65 73 74 63 6f 6e 66 69  tdir "/testconfi
2f00: 67 22 29 0a 09 20 20 20 20 28 6c 61 6d 62 64 61  g")..    (lambda
2f10: 20 28 29 0a 09 20 20 20 20 20 20 28 70 72 69 6e   ()..      (prin
2f20: 74 20 22 23 20 41 64 64 20 61 64 64 69 74 69 6f  t "# Add additio
2f30: 6e 61 6c 20 73 74 65 70 73 20 68 65 72 65 2e 20  nal steps here. 
2f40: 46 6f 72 6d 61 74 20 69 73 20 5c 22 73 74 65 70  Format is \"step
2f50: 6e 61 6d 65 20 73 63 72 69 70 74 5c 22 5c 6e 5b  name script\"\n[
2f60: 65 7a 73 74 65 70 73 5d 22 29 0a 09 20 20 20 20  ezsteps]")..    
2f70: 20 20 28 6d 61 70 20 28 6c 61 6d 62 64 61 20 28    (map (lambda (
2f80: 73 74 70 29 28 70 72 69 6e 74 20 28 73 74 72 69  stp)(print (stri
2f90: 6e 67 2d 69 6e 74 65 72 73 70 65 72 73 65 20 73  ng-intersperse s
2fa0: 74 70 20 22 20 22 29 29 29 20 73 74 65 70 73 29  tp " "))) steps)
2fb0: 0a 09 20 20 20 20 20 20 28 70 72 69 6e 74 20 22  ..      (print "
2fc0: 22 29 0a 09 20 20 20 20 20 20 28 70 72 69 6e 74  ")..      (print
2fd0: 20 22 23 20 54 65 73 74 20 72 65 71 75 69 72 65   "# Test require
2fe0: 6d 65 6e 74 73 20 61 72 65 20 73 70 65 63 69 66  ments are specif
2ff0: 69 65 64 20 68 65 72 65 5c 6e 5b 72 65 71 75 69  ied here\n[requi
3000: 72 65 6d 65 6e 74 73 5d 22 29 0a 09 20 20 20 20  rements]")..    
3010: 20 20 28 70 72 69 6e 74 20 28 69 66 20 28 73 74    (print (if (st
3020: 72 69 6e 67 2d 6e 75 6c 6c 3f 20 77 61 69 74 6f  ring-null? waito
3030: 6e 29 20 22 23 20 22 20 22 22 29 20 22 77 61 69  n) "# " "") "wai
3040: 74 6f 6e 20 22 20 77 61 69 74 6f 6e 29 0a 09 20  ton " waiton).. 
3050: 20 20 20 20 20 28 70 72 69 6e 74 20 22 70 72 69       (print "pri
3060: 6f 72 69 74 79 20 22 20 28 69 66 20 28 73 74 72  ority " (if (str
3070: 69 6e 67 2d 6e 75 6c 6c 3f 20 70 72 69 6f 72 69  ing-null? priori
3080: 74 79 29 20 30 20 70 72 69 6f 72 69 74 79 29 20  ty) 0 priority) 
3090: 22 5c 6e 22 29 0a 09 20 20 20 20 20 20 28 70 72  "\n")..      (pr
30a0: 69 6e 74 20 22 23 20 49 74 65 72 61 74 69 6f 6e  int "# Iteration
30b0: 20 66 6f 72 20 79 6f 75 72 20 74 65 73 74 20 69   for your test i
30c0: 73 20 63 6f 6e 74 72 6f 6c 6c 65 64 20 62 79 20  s controlled by 
30d0: 74 68 65 20 69 74 65 6d 73 20 73 65 63 74 69 6f  the items sectio
30e0: 6e 5c 6e 5b 69 74 65 6d 73 5d 22 29 0a 09 20 20  n\n[items]")..  
30f0: 20 20 20 20 28 6d 61 70 20 70 72 69 6e 74 20 69      (map print i
3100: 74 65 6d 73 29 0a 09 20 20 20 20 20 20 28 70 72  tems)..      (pr
3110: 69 6e 74 20 22 22 29 0a 09 20 20 20 20 20 20 28  int "")..      (
3120: 70 72 69 6e 74 20 22 23 20 41 6c 74 65 72 6e 61  print "# Alterna
3130: 74 69 76 65 6c 79 20 79 6f 75 20 63 6f 75 6c 64  tively you could
3140: 20 75 73 65 20 61 20 5b 69 74 65 6d 73 74 61 62   use a [itemstab
3150: 6c 65 5d 20 73 65 63 74 69 6f 6e 22 29 0a 09 20  le] section").. 
3160: 20 20 20 20 20 28 70 72 69 6e 74 20 22 23 20 5b       (print "# [
3170: 69 74 65 6d 73 74 61 62 6c 65 5d 22 29 0a 09 20  itemstable]").. 
3180: 20 20 20 20 20 28 70 72 69 6e 74 20 22 23 20 49       (print "# I
3190: 54 45 4d 56 41 52 31 20 20 61 20 20 20 20 62 20  TEMVAR1  a    b 
31a0: 20 20 20 63 22 29 0a 09 20 20 20 20 20 20 28 70     c")..      (p
31b0: 72 69 6e 74 20 22 23 20 49 54 45 4d 56 41 52 32  rint "# ITEMVAR2
31c0: 20 20 64 20 20 20 20 65 20 20 20 20 66 22 29 0a    d    e    f").
31d0: 09 20 20 20 20 20 20 28 70 72 69 6e 74 20 22 23  .      (print "#
31e0: 5c 6e 23 20 77 6f 75 6c 64 20 72 65 73 75 6c 74  \n# would result
31f0: 20 69 6e 20 69 74 65 6d 73 3a 20 61 2f 64 20 20   in items: a/d  
3200: 62 2f 65 20 20 20 63 2f 66 5c 6e 23 5c 6e 22 29  b/e   c/f\n#\n")
3210: 0a 09 20 20 20 20 20 20 28 70 72 69 6e 74 20 22  ..      (print "
3220: 23 20 4c 6f 67 70 72 6f 20 72 75 6c 65 73 20 66  # Logpro rules f
3230: 6f 72 20 65 61 63 68 20 73 74 65 70 20 63 61 6e  or each step can
3240: 20 62 65 20 63 61 70 74 75 72 65 64 20 68 65 72   be captured her
3250: 65 20 69 6e 20 74 68 65 20 74 65 73 74 63 6f 6e  e in the testcon
3260: 66 69 67 22 29 0a 09 20 20 20 20 20 20 28 70 72  fig")..      (pr
3270: 69 6e 74 20 22 23 20 6e 6f 74 65 3a 20 54 68 65  int "# note: The
3280: 20 3b 3b 20 61 66 74 65 72 20 74 68 65 20 73 74   ;; after the st
3290: 65 70 6e 61 6d 65 20 61 6e 64 20 74 68 65 20 6c  epname and the l
32a0: 65 61 64 69 6e 67 20 77 68 69 74 65 73 70 61 63  eading whitespac
32b0: 65 20 61 72 65 20 72 65 71 75 69 72 65 64 22 29  e are required")
32c0: 0a 09 20 20 20 20 20 20 28 70 72 69 6e 74 20 22  ..      (print "
32d0: 23 5c 6e 5b 6c 6f 67 70 72 6f 5d 5c 6e 22 29 0a  #\n[logpro]\n").
32e0: 09 20 20 20 20 20 20 28 66 6f 72 2d 65 61 63 68  .      (for-each
32f0: 20 28 6c 61 6d 62 64 61 20 28 73 74 65 70 29 0a   (lambda (step).
3300: 09 09 09 20 20 28 6c 65 74 20 28 28 73 74 65 70  ...  (let ((step
3310: 6e 61 6d 65 20 20 20 28 63 61 72 20 73 74 65 70  name   (car step
3320: 29 29 0a 09 09 09 09 28 73 63 72 69 70 74 6e 61  )).....(scriptna
3330: 6d 65 20 28 63 61 64 72 20 73 74 65 70 29 29 29  me (cadr step)))
3340: 0a 09 09 09 20 20 20 20 28 70 72 69 6e 74 20 73  ....    (print s
3350: 74 65 70 6e 61 6d 65 20 22 20 3b 3b 20 72 75 6c  tepname " ;; rul
3360: 65 73 20 66 6f 72 20 63 68 65 63 6b 69 6e 67 20  es for checking 
3370: 6f 75 74 70 75 74 20 66 72 6f 6d 20 72 75 6e 6e  output from runn
3380: 69 6e 67 20 73 74 65 70 20 22 20 73 74 65 70 20  ing step " step 
3390: 22 20 77 69 74 68 20 63 6f 6d 6d 61 6e 64 20 22  " with command "
33a0: 20 73 63 72 69 70 74 6e 61 6d 65 29 0a 09 09 09   scriptname)....
33b0: 20 20 20 20 28 70 72 69 6e 74 20 67 65 6e 65 78      (print genex
33c0: 61 6d 70 6c 65 3a 65 78 61 6d 70 6c 65 2d 6c 6f  ample:example-lo
33d0: 67 70 72 6f 20 22 5c 6e 22 29 29 29 0a 09 09 09  gpro "\n")))....
33e0: 73 74 65 70 73 29 0a 09 20 20 20 20 20 20 28 70  steps)..      (p
33f0: 72 69 6e 74 20 22 23 20 74 65 73 74 5f 6d 65 74  rint "# test_met
3400: 61 20 69 73 20 61 20 73 65 63 74 69 6f 6e 20 66  a is a section f
3410: 6f 72 20 73 74 6f 72 69 6e 67 20 61 64 64 69 74  or storing addit
3420: 69 6f 6e 61 6c 20 64 61 74 61 20 6f 6e 20 79 6f  ional data on yo
3430: 75 72 20 74 65 73 74 5c 6e 5b 74 65 73 74 5f 6d  ur test\n[test_m
3440: 65 74 61 5d 22 29 0a 09 20 20 20 20 20 20 28 70  eta]")..      (p
3450: 72 69 6e 74 20 22 61 75 74 68 6f 72 20 22 20 28  rint "author " (
3460: 67 65 74 2d 65 6e 76 69 72 6f 6e 6d 65 6e 74 2d  get-environment-
3470: 76 61 72 69 61 62 6c 65 20 22 55 53 45 52 22 29  variable "USER")
3480: 29 0a 09 20 20 20 20 20 20 28 70 72 69 6e 74 20  )..      (print 
3490: 22 6f 77 6e 65 72 20 20 22 20 28 67 65 74 2d 65  "owner  " (get-e
34a0: 6e 76 69 72 6f 6e 6d 65 6e 74 2d 76 61 72 69 61  nvironment-varia
34b0: 62 6c 65 20 22 55 53 45 52 22 29 29 0a 09 20 20  ble "USER"))..  
34c0: 20 20 20 20 28 70 72 69 6e 74 20 22 64 65 73 63      (print "desc
34d0: 72 69 70 74 69 6f 6e 20 22 20 64 65 73 63 72 69  ription " descri
34e0: 70 74 69 6f 6e 29 0a 09 20 20 20 20 20 20 28 70  ption)..      (p
34f0: 72 69 6e 74 20 22 74 61 67 73 20 74 61 67 6f 6e  rint "tags tagon
3500: 65 2c 74 61 67 74 77 6f 22 29 0a 09 20 20 20 20  e,tagtwo")..    
3510: 20 20 28 70 72 69 6e 74 20 22 72 65 76 69 65 77    (print "review
3520: 65 64 20 6e 65 76 65 72 22 29 29 29 0a 09 20 20  ed never")))..  
3530: 3b 3b 20 4e 6f 77 20 63 72 65 61 74 65 20 73 68  ;; Now create sh
3540: 65 6c 6c 20 73 63 72 69 70 74 73 20 28 69 66 20  ell scripts (if 
3550: 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 2e 73 68  extension is .sh
3560: 29 20 61 6e 64 20 6c 6f 67 70 72 6f 20 66 69 6c  ) and logpro fil
3570: 65 73 0a 09 20 20 28 66 6f 72 2d 65 61 63 68 20  es..  (for-each 
3580: 28 6c 61 6d 62 64 61 20 28 73 74 70 29 0a 09 09  (lambda (stp)...
3590: 20 20 20 20 20 20 28 6c 65 74 20 28 28 73 74 65        (let ((ste
35a0: 70 6e 61 6d 65 20 28 63 61 72 20 73 74 70 29 29  pname (car stp))
35b0: 0a 09 09 09 20 20 20 20 28 73 63 72 69 70 74 20  ....    (script 
35c0: 20 20 28 63 61 64 72 20 73 74 70 29 29 29 0a 09    (cadr stp)))..
35d0: 09 09 28 69 66 20 28 73 74 72 69 6e 67 2d 6d 61  ..(if (string-ma
35e0: 74 63 68 20 22 2e 2a 5c 5c 2e 73 68 24 22 20 73  tch ".*\\.sh$" s
35f0: 63 72 69 70 74 29 0a 09 09 09 20 20 20 20 28 62  cript)....    (b
3600: 65 67 69 6e 0a 09 09 09 20 20 20 20 20 20 28 77  egin....      (w
3610: 69 74 68 2d 6f 75 74 70 75 74 2d 74 6f 2d 66 69  ith-output-to-fi
3620: 6c 65 20 28 63 6f 6e 63 20 74 65 73 74 64 69 72  le (conc testdir
3630: 20 22 2f 22 20 73 63 72 69 70 74 29 0a 09 09 09   "/" script)....
3640: 09 28 6c 61 6d 62 64 61 20 28 29 0a 09 09 09 09  .(lambda ().....
3650: 20 20 28 70 72 69 6e 74 20 67 65 6e 65 78 61 6d    (print genexam
3660: 70 6c 65 3a 65 78 61 6d 70 6c 65 2d 73 63 72 69  ple:example-scri
3670: 70 74 29 29 29 0a 09 09 09 20 20 20 20 20 20 28  pt)))....      (
3680: 73 79 73 74 65 6d 20 28 63 6f 6e 63 20 22 63 68  system (conc "ch
3690: 6d 6f 64 20 75 67 2b 72 2c 61 2b 78 20 22 20 28  mod ug+r,a+x " (
36a0: 63 6f 6e 63 20 74 65 73 74 64 69 72 20 22 2f 22  conc testdir "/"
36b0: 20 73 63 72 69 70 74 29 29 29 29 29 29 29 0a 09   script)))))))..
36c0: 09 20 20 20 20 73 74 65 70 73 29 29 29 29 29 29  .    steps))))))
36d0: 0a 0a 3b 3b 20 65 61 73 69 65 72 20 74 6f 20 77  ..;; easier to w
36e0: 6f 72 6b 20 62 61 63 6b 77 61 72 64 73 20 74 68  ork backwards th
36f0: 61 6e 20 63 68 61 6e 67 65 20 74 68 65 20 75 70  an change the up
3700: 73 74 72 65 61 6d 20 63 6f 64 65 0a 3b 3b 0a 28  stream code.;;.(
3710: 64 65 66 69 6e 65 20 28 68 72 73 2d 6d 69 6e 2d  define (hrs-min-
3720: 73 65 63 2d 3e 73 65 63 6f 6e 64 73 20 73 74 72  sec->seconds str
3730: 29 0a 20 20 28 6c 65 74 2a 20 28 28 70 61 72 74  ).  (let* ((part
3740: 73 20 28 73 74 72 69 6e 67 2d 73 70 6c 69 74 20  s (string-split 
3750: 73 74 72 29 29 0a 09 20 28 72 65 73 20 20 20 30  str)).. (res   0
3760: 29 29 0a 20 20 20 20 28 66 6f 72 2d 65 61 63 68  )).    (for-each
3770: 0a 20 20 20 20 20 28 6c 61 6d 62 64 61 20 28 70  .     (lambda (p
3780: 61 72 74 29 0a 20 20 20 20 20 20 20 28 73 65 74  art).       (set
3790: 21 20 72 65 73 0a 09 20 20 20 20 20 28 2b 20 72  ! res..     (+ r
37a0: 65 73 0a 09 09 28 6d 61 74 63 68 20 28 73 74 72  es...(match (str
37b0: 69 6e 67 2d 6d 61 74 63 68 20 22 28 5c 5c 64 2b  ing-match "(\\d+
37c0: 29 28 5b 61 2d 7a 5d 29 22 20 70 61 72 74 29 0a  )([a-z])" part).
37d0: 09 09 20 20 28 28 5f 20 76 61 6c 20 75 6e 69 74  ..  ((_ val unit
37e0: 73 29 28 2a 20 28 73 74 72 69 6e 67 2d 3e 6e 75  s)(* (string->nu
37f0: 6d 62 65 72 20 76 61 6c 29 28 63 61 73 65 20 28  mber val)(case (
3800: 73 74 72 69 6e 67 2d 3e 73 79 6d 62 6f 6c 20 75  string->symbol u
3810: 6e 69 74 73 29 0a 09 09 09 09 09 09 09 20 28 28  nits)........ ((
3820: 73 29 20 31 29 0a 09 09 09 09 09 09 09 20 28 28  s) 1)........ ((
3830: 6d 29 20 36 30 29 0a 09 09 09 09 09 09 09 20 28  m) 60)........ (
3840: 28 68 29 20 33 36 30 30 29 29 29 29 0a 09 09 20  (h) 3600))))... 
3850: 20 28 65 6c 73 65 20 30 29 29 29 29 29 0a 20 20   (else 0))))).  
3860: 20 20 20 70 61 72 74 73 29 0a 20 20 20 20 72 65     parts).    re
3870: 73 29 29 0a 0a 3b 3b 20 67 65 6e 65 72 61 74 65  s))..;; generate
3880: 20 61 20 73 6b 65 6c 65 74 6f 6e 20 4d 65 67 61   a skeleton Mega
3890: 74 65 73 74 20 61 72 65 61 20 66 72 6f 6d 20 61  test area from a
38a0: 20 63 75 72 72 65 6e 74 20 61 72 65 61 20 77 69   current area wi
38b0: 74 68 20 72 75 6e 73 0a 3b 3b 0a 3b 3b 20 20 20  th runs.;;.;;   
38c0: 20 73 70 65 63 69 66 79 20 74 61 72 67 65 74 2c   specify target,
38d0: 20 72 75 6e 6e 61 6d 65 20 65 74 63 20 74 6f 20   runname etc to 
38e0: 75 73 65 20 73 70 65 63 69 66 69 63 20 72 75 6e  use specific run
38f0: 73 20 66 6f 72 20 74 68 65 20 74 65 6d 70 6c 61  s for the templa
3900: 74 65 0a 3b 3b 0a 28 64 65 66 69 6e 65 20 28 67  te.;;.(define (g
3910: 65 6e 65 78 61 6d 70 6c 65 3a 65 78 74 72 61 63  enexample:extrac
3920: 74 2d 73 6b 65 6c 65 74 6f 6e 2d 61 72 65 61 20  t-skeleton-area 
3930: 64 65 73 74 2d 70 61 74 68 29 0a 20 20 28 6c 65  dest-path).  (le
3940: 74 2a 20 28 28 74 61 72 67 65 74 20 20 20 20 28  t* ((target    (
3950: 61 72 67 73 3a 67 65 74 2d 61 72 67 20 22 2d 74  args:get-arg "-t
3960: 61 72 67 65 74 22 29 29 0a 09 20 28 72 75 6e 6e  arget")).. (runn
3970: 61 6d 65 20 20 20 28 61 72 67 73 3a 67 65 74 2d  ame   (args:get-
3980: 61 72 67 20 22 2d 72 75 6e 6e 61 6d 65 22 29 29  arg "-runname"))
3990: 0a 09 20 28 6f 62 74 75 73 65 20 20 20 20 28 6d  .. (obtuse    (m
39a0: 61 6b 65 2d 68 61 73 68 2d 74 61 62 6c 65 29 29  ake-hash-table))
39b0: 0a 09 20 28 6f 62 74 75 73 65 66 20 20 20 28 61  .. (obtusef   (a
39c0: 72 67 73 3a 67 65 74 2d 61 72 67 20 22 2d 6f 62  rgs:get-arg "-ob
39d0: 66 75 73 63 61 74 65 22 29 29 0a 09 20 28 6c 65  fuscate")).. (le
39e0: 74 74 65 72 73 20 20 20 28 73 74 72 69 6e 67 2d  tters   (string-
39f0: 73 70 6c 69 74 2d 66 69 65 6c 64 73 20 22 5c 5c  split-fields "\\
3a00: 53 22 20 22 61 62 63 64 65 66 67 68 69 6a 6b 6c  S" "abcdefghijkl
3a10: 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 22 29  mnopqrstuvwxyz")
3a20: 29 0a 09 20 28 6d 61 78 6c 65 74 74 65 72 20 28  ).. (maxletter (
3a30: 2d 20 28 6c 65 6e 67 74 68 20 6c 65 74 74 65 72  - (length letter
3a40: 73 29 20 31 29 29 0a 09 20 28 6c 61 73 74 6c 65  s) 1)).. (lastle
3a50: 74 20 20 20 30 29 0a 09 20 28 6c 61 73 74 6e 75  t   0).. (lastnu
3a60: 6d 20 20 20 31 29 20 0a 09 20 28 6f 62 66 75 73  m   1) .. (obfus
3a70: 63 61 74 65 20 28 6c 61 6d 62 64 61 20 28 69 6e  cate (lambda (in
3a80: 73 74 72 29 0a 09 09 20 20 20 20 20 20 28 6f 72  str)...      (or
3a90: 20 28 68 61 73 68 2d 74 61 62 6c 65 2d 72 65 66   (hash-table-ref
3aa0: 2f 64 65 66 61 75 6c 74 20 6f 62 74 75 73 65 20  /default obtuse 
3ab0: 69 6e 73 74 72 20 23 66 29 0a 09 09 09 20 20 28  instr #f)....  (
3ac0: 69 66 20 6f 62 74 75 73 65 66 0a 09 09 09 20 20  if obtusef....  
3ad0: 20 20 20 20 28 6c 65 74 2a 20 28 28 6c 65 74 74      (let* ((lett
3ae0: 65 72 20 28 6c 69 73 74 2d 72 65 66 20 6c 65 74  er (list-ref let
3af0: 74 65 72 73 20 6c 61 73 74 6c 65 74 29 29 0a 09  ters lastlet))..
3b00: 09 09 09 20 20 20 20 20 28 76 61 6c 20 20 20 20  ...     (val    
3b10: 28 63 6f 6e 63 20 6c 65 74 74 65 72 20 6c 61 73  (conc letter las
3b20: 74 6e 75 6d 29 29 29 0a 09 09 09 09 28 69 66 20  tnum))).....(if 
3b30: 28 3e 3d 20 6c 61 73 74 6c 65 74 20 6d 61 78 6c  (>= lastlet maxl
3b40: 65 74 74 65 72 29 0a 09 09 09 09 20 20 20 20 28  etter).....    (
3b50: 62 65 67 69 6e 0a 09 09 09 09 20 20 20 20 20 20  begin.....      
3b60: 28 73 65 74 21 20 6c 61 73 74 6c 65 74 20 30 29  (set! lastlet 0)
3b70: 0a 09 09 09 09 20 20 20 20 20 20 28 73 65 74 21  .....      (set!
3b80: 20 6c 61 73 74 6e 75 6d 20 28 2b 20 6c 61 73 74   lastnum (+ last
3b90: 6e 75 6d 20 31 29 29 29 0a 09 09 09 09 20 20 20  num 1))).....   
3ba0: 20 28 73 65 74 21 20 6c 61 73 74 6c 65 74 20 28   (set! lastlet (
3bb0: 2b 20 6c 61 73 74 6c 65 74 20 31 29 29 29 0a 09  + lastlet 1)))..
3bc0: 09 09 09 28 68 61 73 68 2d 74 61 62 6c 65 2d 73  ...(hash-table-s
3bd0: 65 74 21 20 6f 62 74 75 73 65 20 69 6e 73 74 72  et! obtuse instr
3be0: 20 76 61 6c 29 0a 09 09 09 09 76 61 6c 29 0a 09   val).....val)..
3bf0: 09 09 20 20 20 20 20 20 69 6e 73 74 72 29 29 29  ..      instr)))
3c00: 29 29 0a 20 20 20 20 28 69 66 20 28 6e 6f 74 20  )).    (if (not 
3c10: 28 61 6e 64 20 74 61 72 67 65 74 20 72 75 6e 6e  (and target runn
3c20: 61 6d 65 29 29 0a 09 28 64 65 62 75 67 3a 70 72  ame))..(debug:pr
3c30: 69 6e 74 20 30 20 2a 64 65 66 61 75 6c 74 2d 6c  int 0 *default-l
3c40: 6f 67 2d 70 6f 72 74 2a 20 22 57 41 52 4e 49 4e  og-port* "WARNIN
3c50: 47 3a 20 46 6f 72 20 62 65 73 74 20 72 65 73 75  G: For best resu
3c60: 6c 74 73 20 70 6c 65 61 73 65 20 73 70 65 63 69  lts please speci
3c70: 66 69 79 20 2d 74 61 72 67 65 74 20 61 6e 64 20  fiy -target and 
3c80: 2d 72 75 6e 6e 61 6d 65 20 66 6f 72 20 61 20 67  -runname for a g
3c90: 6f 6f 64 20 72 75 6e 20 74 6f 20 75 73 65 20 61  ood run to use a
3ca0: 73 20 61 20 74 65 6d 70 6c 61 74 65 2e 22 29 29  s a template."))
3cb0: 0a 20 20 20 20 28 69 66 20 28 6e 6f 74 20 28 61  .    (if (not (a
3cc0: 6e 64 20 28 66 69 6c 65 2d 65 78 69 73 74 73 3f  nd (file-exists?
3cd0: 20 22 6d 65 67 61 74 65 73 74 2e 63 6f 6e 66 69   "megatest.confi
3ce0: 67 22 29 0a 09 09 20 20 28 66 69 6c 65 2d 65 78  g")...  (file-ex
3cf0: 69 73 74 73 3f 20 22 6d 65 67 61 74 65 73 74 2e  ists? "megatest.
3d00: 64 62 22 29 29 29 0a 09 28 62 65 67 69 6e 0a 09  db")))..(begin..
3d10: 20 20 28 64 65 62 75 67 3a 70 72 69 6e 74 20 30    (debug:print 0
3d20: 20 2a 64 65 66 61 75 6c 74 2d 6c 6f 67 2d 70 6f   *default-log-po
3d30: 72 74 2a 20 22 45 52 52 4f 52 3a 20 74 68 69 73  rt* "ERROR: this
3d40: 20 63 6f 6d 6d 61 6e 64 20 6d 75 73 74 20 62 65   command must be
3d50: 20 72 75 6e 20 61 74 20 74 68 65 20 74 6f 70 20   run at the top 
3d60: 6c 65 76 65 6c 20 6f 66 20 61 20 6d 65 67 61 74  level of a megat
3d70: 65 73 74 20 61 72 65 61 20 77 68 65 72 65 20 72  est area where r
3d80: 75 6e 73 20 68 61 76 65 20 62 65 65 6e 20 63 6f  uns have been co
3d90: 6d 70 6c 65 74 65 64 22 29 0a 09 20 20 28 65 78  mpleted")..  (ex
3da0: 69 74 29 29 29 0a 09 20 20 20 20 20 0a 20 20 20  it)))..     .   
3db0: 20 3b 3b 20 66 69 72 73 74 20 63 72 65 61 74 65   ;; first create
3dc0: 20 74 68 65 20 64 65 73 74 20 70 61 74 68 20 61   the dest path a
3dd0: 6e 64 20 6e 65 65 64 65 64 20 73 75 62 64 69 72  nd needed subdir
3de0: 65 63 74 6f 72 69 65 73 0a 20 20 20 20 28 69 66  ectories.    (if
3df0: 20 28 6e 6f 74 20 28 66 69 6c 65 2d 65 78 69 73   (not (file-exis
3e00: 74 73 3f 20 64 65 73 74 2d 70 61 74 68 29 29 0a  ts? dest-path)).
3e10: 09 28 62 65 67 69 6e 0a 09 20 20 28 63 72 65 61  .(begin..  (crea
3e20: 74 65 2d 64 69 72 65 63 74 6f 72 79 20 64 65 73  te-directory des
3e30: 74 2d 70 61 74 68 29 0a 09 20 20 28 63 72 65 61  t-path)..  (crea
3e40: 74 65 2d 64 69 72 65 63 74 6f 72 79 20 28 63 6f  te-directory (co
3e50: 6e 63 20 64 65 73 74 2d 70 61 74 68 20 22 2f 74  nc dest-path "/t
3e60: 65 73 74 73 22 29 29 29 0a 09 28 69 66 20 28 66  ests")))..(if (f
3e70: 69 6c 65 2d 65 78 69 73 74 73 3f 20 28 63 6f 6e  ile-exists? (con
3e80: 63 20 64 65 73 74 2d 70 61 74 68 20 22 2f 6d 65  c dest-path "/me
3e90: 67 61 74 65 73 74 2e 63 6f 6e 66 69 67 22 29 29  gatest.config"))
3ea0: 0a 09 20 20 20 20 28 62 65 67 69 6e 0a 09 20 20  ..    (begin..  
3eb0: 20 20 20 20 28 64 65 62 75 67 3a 70 72 69 6e 74      (debug:print
3ec0: 20 30 20 2a 64 65 66 61 75 6c 74 2d 6c 6f 67 2d   0 *default-log-
3ed0: 70 6f 72 74 2a 20 22 45 52 52 4f 52 3a 20 64 65  port* "ERROR: de
3ee0: 73 74 69 6e 61 74 69 6f 6e 20 70 61 74 68 20 61  stination path a
3ef0: 6c 72 65 61 64 79 20 68 61 73 20 6d 65 67 61 74  lready has megat
3f00: 65 73 74 2e 63 6f 6e 66 69 67 2c 20 73 74 6f 70  est.config, stop
3f10: 70 69 6e 67 20 6e 6f 77 2e 22 29 0a 09 20 20 20  ping now.")..   
3f20: 20 20 20 28 65 78 69 74 29 29 29 29 0a 0a 20 20     (exit))))..  
3f30: 20 20 3b 3b 20 64 75 6d 70 20 74 68 65 20 63 6f    ;; dump the co
3f40: 6e 66 69 67 20 66 69 6c 65 73 20 66 72 6f 6d 20  nfig files from 
3f50: 74 68 69 73 20 61 72 65 61 20 74 6f 20 74 68 65  this area to the
3f60: 20 64 65 73 74 20 61 72 65 61 0a 20 20 20 20 28   dest area.    (
3f70: 69 66 20 28 61 72 67 73 3a 67 65 74 2d 61 72 67  if (args:get-arg
3f80: 20 22 2d 6f 62 66 75 73 63 61 74 65 22 29 0a 09   "-obfuscate")..
3f90: 28 64 65 62 75 67 3a 70 72 69 6e 74 20 30 20 2a  (debug:print 0 *
3fa0: 64 65 66 61 75 6c 74 2d 6c 6f 67 2d 70 6f 72 74  default-log-port
3fb0: 2a 20 22 57 41 52 4e 49 4e 47 3a 20 6f 62 66 75  * "WARNING: obfu
3fc0: 73 63 61 74 69 6f 6e 20 69 73 20 4e 4f 54 20 64  scation is NOT d
3fd0: 6f 6e 65 20 6f 6e 20 6d 65 67 61 74 65 73 74 2e  one on megatest.
3fe0: 63 6f 6e 66 69 67 20 61 6e 64 20 72 75 6e 63 6f  config and runco
3ff0: 6e 66 69 67 73 2e 63 6f 6e 66 69 67 2e 20 50 6c  nfigs.config. Pl
4000: 65 61 73 65 20 65 64 69 74 20 74 68 6f 73 65 20  ease edit those 
4010: 66 69 6c 65 73 20 74 6f 20 72 65 6d 6f 76 65 20  files to remove 
4020: 61 6e 79 20 73 65 6e 73 69 74 69 76 65 20 69 6e  any sensitive in
4030: 66 6f 72 6d 61 74 69 6f 6e 21 22 29 29 0a 20 20  formation!")).  
4040: 20 20 28 73 79 73 74 65 6d 20 28 63 6f 6e 63 20    (system (conc 
4050: 22 6d 65 67 61 74 65 73 74 20 2d 73 68 6f 77 2d  "megatest -show-
4060: 63 6f 6e 66 69 67 20 3e 20 22 20 64 65 73 74 2d  config > " dest-
4070: 70 61 74 68 20 22 2f 6d 65 67 61 74 65 73 74 2e  path "/megatest.
4080: 63 6f 6e 66 69 67 22 29 29 0a 20 20 20 20 28 73  config")).    (s
4090: 79 73 74 65 6d 20 28 63 6f 6e 63 20 22 6d 65 67  ystem (conc "meg
40a0: 61 74 65 73 74 20 2d 73 68 6f 77 2d 72 75 6e 63  atest -show-runc
40b0: 6f 6e 66 69 67 20 3e 20 22 20 64 65 73 74 2d 70  onfig > " dest-p
40c0: 61 74 68 20 22 2f 72 75 6e 63 6f 6e 66 69 67 73  ath "/runconfigs
40d0: 2e 63 6f 6e 66 69 67 22 29 29 0a 0a 20 20 20 20  .config"))..    
40e0: 3b 3b 20 63 72 65 61 74 65 20 73 74 65 70 73 69  ;; create stepsi
40f0: 6e 66 6f 20 61 6e 64 20 69 74 65 6d 73 20 72 65  nfo and items re
4100: 66 64 62 73 2c 20 73 6f 6d 65 20 73 74 75 66 66  fdbs, some stuff
4110: 20 68 61 73 20 74 6f 20 62 65 20 64 6f 6e 65 20   has to be done 
4120: 64 75 65 20 74 6f 20 72 65 66 64 62 20 6e 6f 74  due to refdb not
4130: 20 69 6e 69 74 69 6e 67 20 61 72 65 61 0a 20 20   initing area.  
4140: 20 20 3b 3b 0a 20 20 20 20 3b 3b 20 20 20 20 20    ;;.    ;;     
4150: 20 20 20 20 20 20 20 73 68 65 65 74 20 20 20 20         sheet    
4160: 20 20 20 72 6f 77 20 20 20 20 20 20 20 63 6f 6c     row       col
4170: 20 20 20 20 20 20 76 61 6c 75 65 0a 20 20 20 20        value.    
4180: 3b 3b 20 73 74 65 70 73 69 6e 66 6f 20 20 74 65  ;; stepsinfo  te
4190: 73 74 6e 61 6d 65 20 20 20 20 69 74 65 6d 70 61  stname    itempa
41a0: 74 68 20 20 73 74 65 70 6e 61 6d 65 20 73 74 65  th  stepname ste
41b0: 70 74 69 6d 65 0a 20 20 20 20 3b 3b 20 6d 69 73  ptime.    ;; mis
41c0: 63 69 6e 66 6f 20 20 20 22 69 74 65 6d 73 69 6e  cinfo   "itemsin
41d0: 66 6f 22 20 74 65 73 74 6e 61 6d 65 20 20 69 74  fo" testname  it
41e0: 65 6d 70 61 74 68 20 22 78 22 0a 20 20 20 20 3b  empath "x".    ;
41f0: 3b 20 20 0a 20 20 20 20 28 66 6f 72 2d 65 61 63  ;  .    (for-eac
4200: 68 0a 20 20 20 20 20 28 6c 61 6d 62 64 61 20 28  h.     (lambda (
4210: 72 64 62 6e 61 6d 65 29 0a 20 20 20 20 20 20 20  rdbname).       
4220: 28 69 66 20 28 6e 6f 74 20 28 66 69 6c 65 2d 65  (if (not (file-e
4230: 78 69 73 74 73 3f 20 28 63 6f 6e 63 20 64 65 73  xists? (conc des
4240: 74 2d 70 61 74 68 20 22 2f 22 20 72 64 62 6e 61  t-path "/" rdbna
4250: 6d 65 29 29 29 0a 09 20 20 20 28 62 65 67 69 6e  me)))..   (begin
4260: 0a 09 20 20 20 20 20 28 63 72 65 61 74 65 2d 64  ..     (create-d
4270: 69 72 65 63 74 6f 72 79 20 28 63 6f 6e 63 20 64  irectory (conc d
4280: 65 73 74 2d 70 61 74 68 20 22 2f 22 20 72 64 62  est-path "/" rdb
4290: 6e 61 6d 65 20 22 2f 73 78 6d 6c 22 29 20 23 74  name "/sxml") #t
42a0: 29 0a 09 20 20 20 20 20 28 77 69 74 68 2d 6f 75  )..     (with-ou
42b0: 74 70 75 74 2d 74 6f 2d 66 69 6c 65 20 28 63 6f  tput-to-file (co
42c0: 6e 63 20 64 65 73 74 2d 70 61 74 68 20 22 2f 22  nc dest-path "/"
42d0: 20 72 64 62 6e 61 6d 65 20 22 2f 73 68 65 65 74   rdbname "/sheet
42e0: 2d 6e 61 6d 65 73 2e 63 66 67 22 29 0a 09 20 20  -names.cfg")..  
42f0: 20 20 20 20 20 28 6c 61 6d 62 64 61 20 28 29 28       (lambda ()(
4300: 70 72 69 6e 74 29 29 29 29 29 29 0a 20 20 20 20  print)))))).    
4310: 20 27 28 22 73 74 65 70 73 69 6e 66 6f 22 20 22   '("stepsinfo" "
4320: 6d 69 73 63 69 6e 66 6f 22 29 29 0a 20 20 20 20  miscinfo")).    
4330: 0a 20 20 20 20 28 6c 65 74 2a 20 28 28 72 75 6e  .    (let* ((run
4340: 73 20 20 20 20 20 28 72 6d 74 3a 73 69 6d 70 6c  s     (rmt:simpl
4350: 65 2d 67 65 74 2d 72 75 6e 73 20 28 6f 72 20 72  e-get-runs (or r
4360: 75 6e 6e 61 6d 65 20 22 25 22 29 20 23 66 20 23  unname "%") #f #
4370: 66 20 28 6f 72 20 74 61 72 67 65 74 20 22 25 22  f (or target "%"
4380: 29 20 23 66 29 29 0a 09 20 20 20 28 74 65 73 74  ) #f))..   (test
4390: 73 20 20 20 20 28 6d 61 6b 65 2d 68 61 73 68 2d  s    (make-hash-
43a0: 74 61 62 6c 65 29 29 20 3b 3b 20 6a 75 73 74 20  table)) ;; just 
43b0: 74 65 73 74 73 0a 09 20 20 20 28 66 75 6c 6c 74  tests..   (fullt
43c0: 20 20 20 20 28 6d 61 6b 65 2d 68 61 73 68 2d 74      (make-hash-t
43d0: 61 62 6c 65 29 29 20 3b 3b 20 61 6c 6c 20 74 65  able)) ;; all te
43e0: 73 74 2f 69 74 65 6d 73 0a 09 20 20 20 28 74 65  st/items..   (te
43f0: 73 74 72 65 67 20 20 28 6d 61 6b 65 2d 68 61 73  streg  (make-has
4400: 68 2d 74 61 62 6c 65 29 29 20 3b 3b 20 66 6f 72  h-table)) ;; for
4410: 20 74 68 65 20 74 65 73 74 63 6f 6e 66 69 67 73   the testconfigs
4420: 0a 09 20 20 20 28 73 74 65 70 73 72 64 62 20 28  ..   (stepsrdb (
4430: 63 6f 6e 63 20 64 65 73 74 2d 70 61 74 68 20 22  conc dest-path "
4440: 2f 73 74 65 70 73 69 6e 66 6f 22 29 29 0a 09 20  /stepsinfo")).. 
4450: 20 20 28 6d 69 73 63 72 64 62 20 20 28 63 6f 6e    (miscrdb  (con
4460: 63 20 64 65 73 74 2d 70 61 74 68 20 22 2f 6d 69  c dest-path "/mi
4470: 73 63 69 6e 66 6f 22 29 29 29 0a 20 20 20 20 20  scinfo"))).     
4480: 20 28 69 66 20 28 3e 20 28 6c 65 6e 67 74 68 20   (if (> (length 
4490: 72 75 6e 73 29 20 31 29 0a 09 20 20 28 64 65 62  runs) 1)..  (deb
44a0: 75 67 3a 70 72 69 6e 74 2d 69 6e 66 6f 20 30 20  ug:print-info 0 
44b0: 2a 64 65 66 61 75 6c 74 2d 6c 6f 67 2d 70 6f 72  *default-log-por
44c0: 74 2a 20 22 4d 6f 72 65 20 74 68 61 6e 20 6f 6e  t* "More than on
44d0: 65 20 72 75 6e 20 6d 61 74 63 68 65 73 2c 20 66  e run matches, f
44e0: 69 72 73 74 20 66 6f 75 6e 64 20 64 61 74 61 20  irst found data 
44f0: 77 69 6c 6c 20 62 65 20 75 73 65 64 2e 22 29 29  will be used."))
4500: 0a 20 20 20 20 20 20 3b 3b 20 67 65 74 20 61 6c  .      ;; get al
4510: 6c 20 74 65 73 74 6e 61 6d 65 73 0a 20 20 20 20  l testnames.    
4520: 20 20 28 66 6f 72 2d 65 61 63 68 0a 20 20 20 20    (for-each.    
4530: 20 20 20 28 6c 61 6d 62 64 61 20 28 72 75 6e 2d     (lambda (run-
4540: 69 64 29 0a 09 20 28 6c 65 74 2a 20 28 28 74 65  id).. (let* ((te
4550: 73 74 73 2d 64 61 74 61 20 28 72 6d 74 3a 67 65  sts-data (rmt:ge
4560: 74 2d 74 65 73 74 73 2d 66 6f 72 2d 72 75 6e 20  t-tests-for-run 
4570: 72 75 6e 2d 69 64 20 22 25 22 20 27 28 29 20 27  run-id "%" '() '
4580: 28 29 20 23 66 20 23 66 20 23 66 20 23 66 20 23  () #f #f #f #f #
4590: 66 20 23 66 20 23 66 20 23 66 29 29 29 0a 09 20  f #f #f #f))).. 
45a0: 20 20 28 66 6f 72 2d 65 61 63 68 0a 09 20 20 20    (for-each..   
45b0: 20 28 6c 61 6d 62 64 61 20 28 74 65 73 74 64 61   (lambda (testda
45c0: 74 29 0a 09 20 20 20 20 20 20 28 6c 65 74 2a 20  t)..      (let* 
45d0: 28 28 74 65 73 74 2d 69 64 20 20 20 20 20 20 28  ((test-id      (
45e0: 64 62 3a 74 65 73 74 2d 67 65 74 2d 69 64 20 74  db:test-get-id t
45f0: 65 73 74 64 61 74 29 29 0a 09 09 20 20 20 20 20  estdat))...     
4600: 28 74 65 73 74 6e 61 6d 65 20 20 20 20 20 28 64  (testname     (d
4610: 62 3a 74 65 73 74 2d 67 65 74 2d 74 65 73 74 6e  b:test-get-testn
4620: 61 6d 65 20 74 65 73 74 64 61 74 29 29 0a 09 09  ame testdat))...
4630: 20 20 20 20 20 28 69 74 65 6d 2d 70 61 74 68 20       (item-path 
4640: 20 20 20 28 64 62 3a 74 65 73 74 2d 67 65 74 2d     (db:test-get-
4650: 69 74 65 6d 2d 70 61 74 68 20 74 65 73 74 64 61  item-path testda
4660: 74 29 29 0a 09 09 20 20 20 20 20 28 74 6c 65 76  t))...     (tlev
4670: 65 6c 20 20 20 20 20 20 20 28 64 62 3a 74 65 73  el       (db:tes
4680: 74 2d 67 65 74 2d 69 73 2d 74 6f 70 6c 65 76 65  t-get-is-topleve
4690: 6c 20 74 65 73 74 64 61 74 29 29 0a 09 09 20 20  l testdat))...  
46a0: 20 20 20 28 74 66 75 6c 6c 6e 61 6d 65 20 20 20     (tfullname   
46b0: 20 28 64 62 3a 74 65 73 74 2d 67 65 74 2d 66 75   (db:test-get-fu
46c0: 6c 6c 6e 61 6d 65 20 74 65 73 74 64 61 74 29 29  llname testdat))
46d0: 0a 09 09 20 20 20 20 20 3b 3b 20 6e 6f 77 20 67  ...     ;; now g
46e0: 65 74 20 73 74 65 70 73 20 69 6e 66 6f 0a 09 09  et steps info...
46f0: 20 20 20 20 20 28 74 65 73 74 2d 73 74 65 70 73       (test-steps
4700: 20 20 20 28 74 65 73 74 73 3a 67 65 74 2d 63 6f     (tests:get-co
4710: 6d 70 72 65 73 73 65 64 2d 73 74 65 70 73 20 72  mpressed-steps r
4720: 75 6e 2d 69 64 20 74 65 73 74 2d 69 64 29 29 0a  un-id test-id)).
4730: 09 09 20 20 20 20 20 28 74 65 73 74 63 6f 6e 66  ..     (testconf
4740: 69 67 20 20 20 28 74 65 73 74 73 3a 67 65 74 2d  ig   (tests:get-
4750: 74 65 73 74 63 6f 6e 66 69 67 20 74 65 73 74 6e  testconfig testn
4760: 61 6d 65 20 69 74 65 6d 2d 70 61 74 68 20 74 65  ame item-path te
4770: 73 74 72 65 67 20 23 66 29 29 29 0a 0a 09 09 0a  streg #f))).....
4780: 09 09 28 69 66 20 28 6e 6f 74 20 28 68 61 73 68  ..(if (not (hash
4790: 2d 74 61 62 6c 65 2d 65 78 69 73 74 73 3f 20 66  -table-exists? f
47a0: 75 6c 6c 74 20 74 66 75 6c 6c 6e 61 6d 65 29 29  ullt tfullname))
47b0: 0a 09 09 20 20 20 20 3b 3b 20 64 6f 20 74 68 65  ...    ;; do the
47c0: 20 77 6f 72 6b 20 66 6f 72 20 74 68 69 73 20 74   work for this t
47d0: 65 73 74 20 69 66 20 6e 6f 74 20 70 72 65 76 69  est if not previ
47e0: 6f 75 73 6c 79 20 64 6f 6e 65 0a 09 09 20 20 20  ously done...   
47f0: 20 28 6c 65 74 2a 20 28 28 6e 65 77 2d 74 65 73   (let* ((new-tes
4800: 74 2d 64 69 72 20 28 63 6f 6e 63 20 64 65 73 74  t-dir (conc dest
4810: 2d 70 61 74 68 20 22 2f 74 65 73 74 73 2f 22 20  -path "/tests/" 
4820: 28 6f 62 66 75 73 63 61 74 65 20 74 65 73 74 6e  (obfuscate testn
4830: 61 6d 65 29 29 29 0a 09 09 09 20 20 20 28 74 63  ame)))....   (tc
4840: 6f 6e 66 69 67 66 20 20 20 20 20 28 63 6f 6e 63  onfigf     (conc
4850: 20 6e 65 77 2d 74 65 73 74 2d 64 69 72 20 22 2f   new-test-dir "/
4860: 74 65 73 74 63 6f 6e 66 69 67 22 29 29 29 0a 09  testconfig")))..
4870: 09 20 20 20 20 20 20 28 70 72 69 6e 74 20 22 41  .      (print "A
4880: 6e 61 6c 79 7a 69 6e 67 20 61 6e 64 20 65 78 74  nalyzing and ext
4890: 72 61 63 74 69 6e 67 20 69 6e 66 6f 20 66 6f 72  racting info for
48a0: 20 22 20 74 66 75 6c 6c 6e 61 6d 65 20 22 20 61   " tfullname " a
48b0: 73 20 22 20 28 6f 62 66 75 73 63 61 74 65 20 74  s " (obfuscate t
48c0: 65 73 74 6e 61 6d 65 29 29 0a 09 09 20 20 20 20  estname))...    
48d0: 20 20 28 70 72 69 6e 74 20 22 20 20 74 6f 70 6c    (print "  topl
48e0: 65 76 65 6c 3a 20 22 20 28 69 66 20 74 6c 65 76  evel: " (if tlev
48f0: 65 6c 20 22 79 65 73 22 20 22 6e 6f 22 29 29 0a  el "yes" "no")).
4900: 09 09 20 20 20 20 20 20 28 68 61 73 68 2d 74 61  ..      (hash-ta
4910: 62 6c 65 2d 73 65 74 21 20 66 75 6c 6c 74 20 74  ble-set! fullt t
4920: 66 75 6c 6c 6e 61 6d 65 20 23 74 29 20 3b 3b 20  fullname #t) ;; 
4930: 74 72 61 63 6b 20 74 68 61 74 20 74 68 69 73 20  track that this 
4940: 6f 6e 65 20 68 61 73 20 62 65 65 6e 20 73 65 65  one has been see
4950: 6e 0a 09 09 20 20 20 20 20 20 28 69 66 20 28 6e  n...      (if (n
4960: 6f 74 20 28 64 69 72 65 63 74 6f 72 79 2d 65 78  ot (directory-ex
4970: 69 73 74 73 3f 20 6e 65 77 2d 74 65 73 74 2d 64  ists? new-test-d
4980: 69 72 29 29 0a 09 09 09 20 20 28 63 72 65 61 74  ir))....  (creat
4990: 65 2d 64 69 72 65 63 74 6f 72 79 20 6e 65 77 2d  e-directory new-
49a0: 74 65 73 74 2d 64 69 72 20 23 74 29 29 0a 0a 09  test-dir #t))...
49b0: 09 20 20 20 20 20 20 3b 3b 20 63 72 65 61 74 65  .      ;; create
49c0: 20 74 68 65 20 74 65 73 74 63 6f 6e 66 69 67 20   the testconfig 
49d0: 49 49 46 20 77 65 20 61 72 65 20 61 20 74 6f 70  IIF we are a top
49e0: 6c 65 76 65 6c 20 6f 72 20 61 6e 20 69 74 65 6d  level or an item
49f0: 20 41 4e 44 20 74 68 65 20 74 65 73 74 63 6f 6e   AND the testcon
4a00: 66 69 67 20 68 61 73 20 6e 6f 74 20 62 65 65 6e  fig has not been
4a10: 20 70 72 65 76 69 6f 75 73 6c 79 20 63 72 65 61   previously crea
4a20: 74 65 64 0a 09 09 20 20 20 20 20 20 28 69 66 20  ted...      (if 
4a30: 28 61 6e 64 20 28 6f 72 20 28 6e 6f 74 20 74 6c  (and (or (not tl
4a40: 65 76 65 6c 29 0a 09 09 09 09 20 20 20 28 6e 6f  evel).....   (no
4a50: 74 20 28 65 71 75 61 6c 3f 20 69 74 65 6d 2d 70  t (equal? item-p
4a60: 61 74 68 20 22 22 29 29 29 0a 09 09 09 20 20 20  ath "")))....   
4a70: 20 20 20 20 28 6e 6f 74 20 28 66 69 6c 65 2d 65      (not (file-e
4a80: 78 69 73 74 73 3f 20 74 63 6f 6e 66 69 67 66 29  xists? tconfigf)
4a90: 29 29 0a 09 09 09 20 20 28 77 69 74 68 2d 6f 75  ))....  (with-ou
4aa0: 74 70 75 74 2d 74 6f 2d 66 69 6c 65 20 74 63 6f  tput-to-file tco
4ab0: 6e 66 69 67 66 0a 09 09 09 20 20 20 20 28 6c 61  nfigf....    (la
4ac0: 6d 62 64 61 20 28 29 0a 09 09 09 20 20 20 20 20  mbda ()....     
4ad0: 20 3b 3b 20 66 69 72 73 74 20 74 68 65 20 65 7a   ;; first the ez
4ae0: 73 74 65 70 73 0a 09 09 09 20 20 20 20 20 20 28  steps....      (
4af0: 70 72 69 6e 74 20 22 5b 65 7a 73 74 65 70 73 5d  print "[ezsteps]
4b00: 22 29 0a 09 09 09 20 20 20 20 20 20 28 66 6f 72  ")....      (for
4b10: 2d 65 61 63 68 0a 09 09 09 20 20 20 20 20 20 20  -each....       
4b20: 28 6c 61 6d 62 64 61 20 28 74 65 73 74 73 74 65  (lambda (testste
4b30: 70 29 0a 09 09 09 09 20 28 6c 65 74 2a 20 28 28  p)..... (let* ((
4b40: 73 74 65 70 2d 6e 61 6d 65 20 20 28 76 65 63 74  step-name  (vect
4b50: 6f 72 2d 72 65 66 20 74 65 73 74 73 74 65 70 20  or-ref teststep 
4b60: 30 29 29 29 0a 09 09 09 09 20 20 20 28 70 72 69  0))).....   (pri
4b70: 6e 74 20 28 6f 62 66 75 73 63 61 74 65 20 73 74  nt (obfuscate st
4b80: 65 70 2d 6e 61 6d 65 29 0a 09 09 09 09 09 20 20  ep-name)......  
4b90: 22 20 73 6c 65 65 70 20 24 28 72 65 66 64 62 20  " sleep $(refdb 
4ba0: 6c 6f 6f 6b 75 70 20 23 7b 67 65 74 65 6e 76 20  lookup #{getenv 
4bb0: 4d 54 5f 52 55 4e 5f 41 52 45 41 5f 48 4f 4d 45  MT_RUN_AREA_HOME
4bc0: 7d 2f 73 74 65 70 73 69 6e 66 6f 20 22 0a 09 09  }/stepsinfo "...
4bd0: 09 09 09 20 20 28 6f 62 66 75 73 63 61 74 65 20  ...  (obfuscate 
4be0: 74 65 73 74 6e 61 6d 65 29 20 22 20 24 4d 54 5f  testname) " $MT_
4bf0: 49 54 45 4d 50 41 54 48 20 22 0a 09 09 09 09 09  ITEMPATH "......
4c00: 20 20 28 6f 62 66 75 73 63 61 74 65 20 73 74 65    (obfuscate ste
4c10: 70 2d 6e 61 6d 65 29 20 22 29 22 29 29 29 0a 09  p-name) ")")))..
4c20: 09 09 20 20 20 20 20 20 20 74 65 73 74 2d 73 74  ..       test-st
4c30: 65 70 73 29 0a 0a 09 09 09 20 20 20 20 20 20 3b  eps).....      ;
4c40: 3b 20 6e 6f 77 20 74 68 65 20 72 65 71 75 69 72  ; now the requir
4c50: 65 6d 65 6e 74 73 20 73 65 63 74 69 6f 6e 0a 09  ements section..
4c60: 09 09 20 20 20 20 20 20 28 69 66 20 74 65 73 74  ..      (if test
4c70: 63 6f 6e 66 69 67 0a 09 09 09 09 20 20 28 62 65  config.....  (be
4c80: 67 69 6e 0a 09 09 09 09 20 20 20 20 28 70 72 69  gin.....    (pri
4c90: 6e 74 20 22 5c 6e 5b 72 65 71 75 69 72 65 6d 65  nt "\n[requireme
4ca0: 6e 74 73 5d 22 29 0a 09 09 09 09 20 20 20 20 28  nts]").....    (
4cb0: 66 6f 72 2d 65 61 63 68 0a 09 09 09 09 20 20 20  for-each.....   
4cc0: 20 20 28 6c 61 6d 62 64 61 20 28 65 6e 74 72 79    (lambda (entry
4cd0: 29 0a 09 09 09 09 20 20 20 20 20 20 20 28 6c 65  ).....       (le
4ce0: 74 2a 20 28 28 6b 65 79 20 28 63 61 72 20 65 6e  t* ((key (car en
4cf0: 74 72 79 29 29 0a 09 09 09 09 09 20 20 20 20 20  try))......     
4d00: 20 28 76 61 6c 20 28 63 61 64 72 20 65 6e 74 72   (val (cadr entr
4d10: 79 29 29 29 0a 09 09 09 09 09 20 28 63 61 73 65  y)))...... (case
4d20: 20 28 73 74 72 69 6e 67 2d 3e 73 79 6d 62 6f 6c   (string->symbol
4d30: 20 6b 65 79 29 0a 09 09 09 09 09 20 20 20 28 28   key)......   ((
4d40: 77 61 69 74 6f 6e 29 20 20 28 70 72 69 6e 74 20  waiton)  (print 
4d50: 22 77 61 69 74 6f 6e 20 22 20 28 6f 62 66 75 73  "waiton " (obfus
4d60: 63 61 74 65 20 76 61 6c 29 29 29 0a 09 09 09 09  cate val))).....
4d70: 09 20 20 20 28 65 6c 73 65 20 20 20 20 20 20 28  .   (else      (
4d80: 70 72 69 6e 74 20 6b 65 79 20 22 20 22 20 76 61  print key " " va
4d90: 6c 29 29 29 29 29 0a 09 09 09 09 20 20 20 20 20  l))))).....     
4da0: 28 63 6f 6e 66 69 67 66 3a 67 65 74 2d 73 65 63  (configf:get-sec
4db0: 74 69 6f 6e 20 74 65 73 74 63 6f 6e 66 69 67 20  tion testconfig 
4dc0: 22 72 65 71 75 69 72 65 6d 65 6e 74 73 22 29 29  "requirements"))
4dd0: 29 0a 09 09 09 09 20 20 23 3b 28 70 72 69 6e 74  ).....  #;(print
4de0: 20 22 57 41 52 4e 49 4e 47 3a 20 4e 6f 20 74 65   "WARNING: No te
4df0: 73 74 63 6f 6e 66 69 67 20 64 61 74 61 20 66 6f  stconfig data fo
4e00: 72 20 22 20 74 65 73 74 6e 61 6d 65 20 22 2c 20  r " testname ", 
4e10: 22 20 69 74 65 6d 2d 70 61 74 68 29 29 0a 09 09  " item-path))...
4e20: 09 09 20 20 20 20 0a 09 09 09 20 20 20 20 20 20  ..    ....      
4e30: 28 70 72 69 6e 74 20 22 5c 6e 5b 69 74 65 6d 73  (print "\n[items
4e40: 5d 22 29 0a 09 09 09 20 20 20 20 20 20 28 70 72  ]")....      (pr
4e50: 69 6e 74 20 22 54 48 45 5f 49 54 45 4d 20 5b 73  int "THE_ITEM [s
4e60: 79 73 74 65 6d 20 72 65 66 64 62 20 67 65 74 72  ystem refdb getr
4e70: 6f 77 20 23 7b 67 65 74 65 6e 76 20 4d 54 5f 52  ow #{getenv MT_R
4e80: 55 4e 5f 41 52 45 41 5f 48 4f 4d 45 7d 2f 6d 69  UN_AREA_HOME}/mi
4e90: 73 63 69 6e 66 6f 20 69 74 65 6d 73 69 6e 66 6f  scinfo itemsinfo
4ea0: 20 22 20 28 6f 62 66 75 73 63 61 74 65 20 74 65   " (obfuscate te
4eb0: 73 74 6e 61 6d 65 29 22 20 7c 20 61 77 6b 20 27  stname)" | awk '
4ec0: 7b 70 72 69 6e 74 20 24 31 7d 27 5d 22 29 0a 09  {print $1}']")..
4ed0: 09 09 20 20 20 20 20 20 29 29 29 0a 0a 09 09 20  ..      ))).... 
4ee0: 20 20 20 20 20 3b 3b 20 66 69 6c 6c 20 74 68 65       ;; fill the
4ef0: 20 73 74 65 70 73 72 64 62 0a 09 09 20 20 20 20   stepsrdb...    
4f00: 20 20 28 66 6f 72 2d 65 61 63 68 0a 09 09 20 20    (for-each...  
4f10: 20 20 20 20 20 28 6c 61 6d 62 64 61 20 28 74 65       (lambda (te
4f20: 73 74 73 74 65 70 29 0a 09 09 09 20 28 6c 65 74  ststep).... (let
4f30: 2a 20 28 28 73 74 65 70 2d 6e 61 6d 65 20 20 20  * ((step-name   
4f40: 20 20 28 76 65 63 74 6f 72 2d 72 65 66 20 74 65    (vector-ref te
4f50: 73 74 73 74 65 70 20 30 29 29 0a 09 09 09 09 28  ststep 0)).....(
4f60: 73 74 65 70 2d 64 75 72 61 74 69 6f 6e 20 28 68  step-duration (h
4f70: 72 73 2d 6d 69 6e 2d 73 65 63 2d 3e 73 65 63 6f  rs-min-sec->seco
4f80: 6e 64 73 20 28 76 65 63 74 6f 72 2d 72 65 66 20  nds (vector-ref 
4f90: 74 65 73 74 73 74 65 70 20 34 29 29 29 29 0a 09  teststep 4))))..
4fa0: 09 09 20 20 20 0a 09 09 09 20 20 20 28 73 79 73  ..   ....   (sys
4fb0: 74 65 6d 20 28 63 6f 6e 63 20 22 72 65 66 64 62  tem (conc "refdb
4fc0: 20 73 65 74 20 22 20 73 74 65 70 73 72 64 62 20   set " stepsrdb 
4fd0: 22 20 22 20 28 6f 62 66 75 73 63 61 74 65 20 74  " " (obfuscate t
4fe0: 65 73 74 6e 61 6d 65 29 0a 09 09 09 09 09 20 22  estname)...... "
4ff0: 20 27 22 20 28 69 66 20 28 65 71 75 61 6c 3f 20   '" (if (equal? 
5000: 69 74 65 6d 2d 70 61 74 68 20 22 22 29 0a 09 09  item-path "")...
5010: 09 09 09 09 20 20 22 6e 6f 2d 69 74 65 6d 2d 70  ....  "no-item-p
5020: 61 74 68 22 0a 09 09 09 09 09 09 20 20 28 6f 62  ath".......  (ob
5030: 66 75 73 63 61 74 65 20 69 74 65 6d 2d 70 61 74  fuscate item-pat
5040: 68 29 29 0a 09 09 09 09 09 20 22 27 20 22 20 28  h))...... "' " (
5050: 6f 62 66 75 73 63 61 74 65 20 73 74 65 70 2d 6e  obfuscate step-n
5060: 61 6d 65 29 20 22 20 22 20 73 74 65 70 2d 64 75  ame) " " step-du
5070: 72 61 74 69 6f 6e 29 29 29 29 0a 09 09 20 20 20  ration))))...   
5080: 20 20 20 20 74 65 73 74 2d 73 74 65 70 73 29 0a      test-steps).
5090: 0a 09 09 20 20 20 20 20 20 3b 3b 20 6d 69 73 63  ...      ;; misc
50a0: 69 6e 66 6f 20 20 20 22 69 74 65 6d 73 69 6e 66  info   "itemsinf
50b0: 6f 22 20 74 65 73 74 6e 61 6d 65 20 20 69 74 65  o" testname  ite
50c0: 6d 70 61 74 68 20 22 78 22 0a 09 09 20 20 20 20  mpath "x"...    
50d0: 20 20 28 69 66 20 28 6e 6f 74 20 28 65 71 75 61    (if (not (equa
50e0: 6c 3f 20 69 74 65 6d 2d 70 61 74 68 20 22 22 29  l? item-path "")
50f0: 29 0a 09 09 09 20 20 28 73 79 73 74 65 6d 20 28  )....  (system (
5100: 63 6f 6e 63 20 22 72 65 66 64 62 20 73 65 74 20  conc "refdb set 
5110: 22 20 6d 69 73 63 72 64 62 20 22 20 69 74 65 6d  " miscrdb " item
5120: 73 69 6e 66 6f 20 22 20 28 6f 62 66 75 73 63 61  sinfo " (obfusca
5130: 74 65 20 74 65 73 74 6e 61 6d 65 29 20 22 20 22  te testname) " "
5140: 20 28 6f 62 66 75 73 63 61 74 65 20 69 74 65 6d   (obfuscate item
5150: 2d 70 61 74 68 29 20 22 20 78 22 29 29 29 0a 0a  -path) " x")))..
5160: 09 09 20 20 20 20 20 20 29 29 29 29 0a 09 20 20  ..      ))))..  
5170: 20 20 74 65 73 74 73 2d 64 61 74 61 29 29 29 0a    tests-data))).
5180: 20 20 20 20 20 20 20 28 6d 61 70 20 28 6c 61 6d         (map (lam
5190: 62 64 61 20 28 72 75 6e 72 65 63 29 28 73 69 6d  bda (runrec)(sim
51a0: 70 6c 65 2d 72 75 6e 2d 69 64 20 72 75 6e 72 65  ple-run-id runre
51b0: 63 29 29 20 72 75 6e 73 29 29 29 0a 20 20 20 20  c)) runs))).    
51c0: 29 29 0a                                         )).