Artifact 7449a3004cf983353ad1bbed18b0d3ac50728cb7:
- File genexample.scm — part of check-in [a32f37acb7] at 2012-04-23 00:18:26 on branch extend-test-get-path — Added generator of examples starting point (user: matt size: 2744)
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 20 54 68 69 73 20 70 ..;; .;; This p 0080: 72 6f 67 72 61 6d 20 69 73 20 6d 61 64 65 20 61 rogram is made a 0090: 76 61 69 6c 61 62 6c 65 20 75 6e 64 65 72 20 74 vailable under t 00a0: 68 65 20 47 4e 55 20 47 50 4c 20 76 65 72 73 69 he GNU GPL versi 00b0: 6f 6e 20 32 2e 30 20 6f 72 0a 3b 3b 20 20 67 72 on 2.0 or.;; gr 00c0: 65 61 74 65 72 2e 20 53 65 65 20 74 68 65 20 61 eater. See the a 00d0: 63 63 6f 6d 70 61 6e 79 69 6e 67 20 66 69 6c 65 ccompanying file 00e0: 20 43 4f 50 59 49 4e 47 20 66 6f 72 20 64 65 74 COPYING for det 00f0: 61 69 6c 73 2e 0a 3b 3b 20 0a 3b 3b 20 20 54 68 ails..;; .;; Th 0100: 69 73 20 70 72 6f 67 72 61 6d 20 69 73 20 64 69 is program is di 0110: 73 74 72 69 62 75 74 65 64 20 57 49 54 48 4f 55 stributed WITHOU 0120: 54 20 41 4e 59 20 57 41 52 52 41 4e 54 59 3b 20 T ANY WARRANTY; 0130: 77 69 74 68 6f 75 74 20 65 76 65 6e 20 74 68 65 without even the 0140: 0a 3b 3b 20 20 69 6d 70 6c 69 65 64 20 77 61 72 .;; implied war 0150: 72 61 6e 74 79 20 6f 66 20 4d 45 52 43 48 41 4e ranty of MERCHAN 0160: 54 41 42 49 4c 49 54 59 20 6f 72 20 46 49 54 4e TABILITY or FITN 0170: 45 53 53 20 46 4f 52 20 41 20 50 41 52 54 49 43 ESS FOR A PARTIC 0180: 55 4c 41 52 0a 3b 3b 20 20 50 55 52 50 4f 53 45 ULAR.;; PURPOSE 0190: 2e 0a 3b 3b 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ..;;============ 01a0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================ 01b0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================ 01c0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================ 01d0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 28 64 65 63 ==========..(dec 01e0: 6c 61 72 65 20 28 75 6e 69 74 20 67 65 6e 65 78 lare (unit genex 01f0: 61 6d 70 6c 65 29 29 0a 0a 0a 28 64 65 66 69 6e ample))...(defin 0200: 65 20 28 67 65 6e 65 78 61 6d 70 6c 65 3a 6d 6b e (genexample:mk 0210: 2d 6d 65 67 61 74 65 73 74 2e 63 6f 6e 66 69 67 -megatest.config 0220: 20 70 61 74 68 29 0a 20 20 28 6c 65 74 20 28 28 path). (let (( 0230: 6b 65 79 73 74 72 20 23 66 29 0a 09 28 6b 65 79 keystr #f)..(key 0240: 73 20 20 20 23 66 29 0a 09 28 6c 6e 74 72 65 65 s #f)..(lntree 0250: 20 23 66 29 0a 09 28 66 69 72 73 74 64 20 23 66 #f)..(firstd #f 0260: 29 29 0a 20 20 20 20 28 64 65 62 75 67 3a 70 72 )). (debug:pr 0270: 69 6e 74 20 30 20 22 4e 6f 74 65 3a 20 64 6f 6e int 0 "Note: don 0280: 27 74 20 77 6f 72 72 79 20 74 6f 6f 20 6d 75 63 't worry too muc 0290: 68 20 61 62 6f 75 74 20 74 79 70 6f 73 20 69 6e h about typos in 02a0: 20 74 68 69 73 20 70 72 6f 63 65 73 73 2c 20 79 this process, y 02b0: 6f 75 20 77 69 6c 6c 20 62 65 20 61 62 6c 65 20 ou will be able 02c0: 74 6f 20 65 64 69 74 0a 74 68 65 20 67 65 6e 65 to edit.the gene 02d0: 72 61 74 65 64 20 66 69 6c 65 73 20 62 65 66 6f rated files befo 02e0: 72 65 20 73 74 61 72 74 69 6e 67 20 79 6f 75 72 re starting your 02f0: 20 66 69 72 73 74 20 72 75 6e 73 22 29 0a 0a 20 first runs").. 0300: 20 20 20 3b 3b 20 66 69 72 73 74 20 70 72 6f 6d ;; first prom 0310: 70 74 20 75 73 65 72 20 66 6f 72 20 66 69 65 6c pt user for fiel 0320: 64 73 0a 20 20 20 20 3b 3b 0a 20 20 20 20 28 64 ds. ;;. (d 0330: 65 62 75 67 3a 70 72 69 6e 74 20 30 20 22 46 69 ebug:print 0 "Fi 0340: 72 73 74 20 79 6f 75 20 6d 75 73 74 20 73 70 65 rst you must spe 0350: 63 69 66 79 20 66 69 65 6c 64 73 20 6f 72 20 6b cify fields or k 0360: 65 79 73 20 66 6f 72 20 79 6f 75 72 20 6d 65 67 eys for your meg 0370: 61 74 65 73 74 20 61 72 65 61 2e 20 54 68 65 73 atest area. Thes 0380: 65 20 77 69 6c 6c 20 0a 62 65 20 75 73 65 64 20 e will .be used 0390: 74 6f 20 6f 72 67 61 6e 69 73 65 20 79 6f 75 72 to organise your 03a0: 20 72 75 6e 73 2e 20 4f 6e 65 20 66 69 65 6c 64 runs. One field 03b0: 20 73 68 6f 75 6c 64 20 70 72 6f 62 61 62 6c 79 should probably 03c0: 20 62 65 20 5c 22 52 45 4c 45 41 53 45 5c 22 2e be \"RELEASE\". 03d0: 20 0a 4f 74 68 65 72 20 65 78 61 6d 70 6c 65 73 .Other examples 03e0: 20 6f 66 20 75 73 65 66 75 6c 20 66 69 65 6c 64 of useful field 03f0: 73 20 6d 69 67 68 74 20 62 65 20 5c 22 50 4c 41 s might be \"PLA 0400: 54 46 4f 52 4d 5c 22 2c 20 5c 22 54 41 52 47 45 TFORM\", \"TARGE 0410: 54 5f 4f 53 5c 22 20 6f 72 20 69 66 20 79 6f 75 T_OS\" or if you 0420: 20 61 72 65 20 69 6e 20 74 68 65 0a 73 65 6d 69 are in the.semi 0430: 63 6f 6e 64 75 63 74 6f 72 20 62 75 73 69 6e 65 conductor busine 0440: 73 73 20 70 65 72 68 61 70 73 20 74 68 69 6e 67 ss perhaps thing 0450: 73 20 6c 69 6b 65 20 5c 22 54 45 43 48 4e 4f 4c s like \"TECHNOL 0460: 4f 47 59 5f 4e 4f 44 45 5c 22 2c 20 5c 22 44 45 OGY_NODE\", \"DE 0470: 53 49 47 4e 5f 4b 49 54 5c 22 20 6f 72 20 5c 22 SIGN_KIT\" or \" 0480: 4d 45 54 41 4c 5f 53 54 41 43 4b 5c 22 2e 0a 0a METAL_STACK\"... 0490: 54 68 65 20 61 6c 6c 20 63 61 70 73 20 69 73 20 The all caps is 04a0: 61 20 63 6f 6e 76 65 6e 74 69 6f 6e 20 62 65 63 a convention bec 04b0: 61 75 73 65 20 74 68 65 20 76 61 72 69 61 62 6c ause the variabl 04c0: 65 73 20 79 6f 75 20 63 68 6f 6f 73 65 20 77 69 es you choose wi 04d0: 6c 6c 20 62 65 20 61 76 61 69 6c 61 62 6c 65 20 ll be available 04e0: 74 6f 20 79 6f 75 72 20 74 65 73 74 73 0a 61 73 to your tests.as 04f0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 environment var 0500: 69 61 62 6c 65 73 2e 20 59 6f 75 20 63 61 6e 20 iables. You can 0510: 65 64 69 74 20 74 68 65 73 65 20 76 61 6c 75 65 edit these value 0520: 73 20 6c 61 74 65 72 20 62 75 74 20 69 74 20 69 s later but it i 0530: 73 20 67 65 6e 65 72 61 6c 6c 79 20 61 20 67 6f s generally a go 0540: 6f 64 20 69 64 65 61 20 74 6f 0a 73 65 74 74 6c od idea to.settl 0550: 65 20 6f 6e 20 74 68 65 6d 20 61 6e 64 20 67 65 e on them and ge 0560: 74 20 74 68 65 6d 20 72 69 67 68 74 20 65 61 72 t them right ear 0570: 6c 79 20 6f 6e 2e 20 59 6f 75 72 20 72 75 6e 73 ly on. Your runs 0580: 20 77 69 6c 6c 20 62 65 20 73 74 6f 72 65 64 20 will be stored 0590: 69 6e 20 64 69 72 65 63 74 6f 72 69 65 73 20 73 in directories s 05a0: 70 65 63 69 66 69 65 64 20 62 79 0a 79 6f 75 72 pecified by.your 05b0: 20 6b 65 79 73 2e 20 45 78 61 6d 70 6c 65 2c 20 keys. Example, 05c0: 69 66 20 79 6f 75 20 68 61 76 65 20 6b 65 79 73 if you have keys 05d0: 20 4f 53 46 41 4d 49 4c 59 2f 56 41 52 49 41 4e OSFAMILY/VARIAN 05e0: 54 2f 4f 53 56 45 52 2f 52 45 4c 45 41 53 45 20 T/OSVER/RELEASE 05f0: 79 6f 75 20 6d 61 79 20 67 65 74 20 61 20 74 65 you may get a te 0600: 73 74 20 5c 22 62 75 69 6c 64 5c 22 0a 69 6e 20 st \"build\".in 0610: 61 20 64 69 72 65 63 74 6f 72 79 20 6c 69 6b 65 a directory like 0620: 20 74 68 69 73 3a 20 6c 69 6e 75 78 2f 75 62 75 this: linux/ubu 0630: 6e 74 75 2f 31 31 2e 30 34 2f 72 65 76 5f 31 2e ntu/11.04/rev_1. 0640: 32 2f 62 75 69 6c 64 0a 0a 50 6c 65 61 73 65 20 2/build..Please 0650: 65 6e 74 65 72 20 79 6f 75 72 20 6b 65 79 73 20 enter your keys 0660: 6e 6f 77 2c 20 73 65 70 61 72 61 74 65 64 20 62 now, separated b 0670: 79 20 73 70 61 63 65 73 20 6f 72 20 73 6c 61 73 y spaces or slas 0680: 68 65 73 2e 20 4f 6e 6c 79 20 61 6c 70 68 61 2d hes. Only alpha- 0690: 6e 75 6d 65 72 69 63 20 63 68 61 72 61 63 74 65 numeric characte 06a0: 72 73 2e 20 0a 55 70 70 65 72 20 63 61 73 65 20 rs. .Upper case 06b0: 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 22 29 0a 20 recommended."). 06c0: 20 20 20 28 73 65 74 21 20 6b 65 79 73 74 72 20 (set! keystr 06d0: 28 72 65 61 64 2d 6c 69 6e 65 29 29 0a 20 20 20 (read-line)). 06e0: 20 28 73 65 74 21 20 6b 65 79 73 20 20 20 28 61 (set! keys (a 06f0: 70 70 6c 79 20 61 70 70 65 6e 64 0a 09 09 09 28 pply append....( 0700: 6d 61 70 20 73 74 72 69 6e 67 2d 73 70 6c 69 74 map string-split 0710: 20 28 73 74 72 69 6e 67 2d 73 70 6c 69 74 20 6b (string-split k 0720: 65 79 73 74 72 20 22 2f 22 29 29 29 29 0a 20 20 eystr "/")))). 0730: 20 20 0a 20 20 20 20 3b 3b 20 4e 6f 77 20 67 65 . ;; Now ge 0740: 74 20 74 68 65 20 6c 69 6e 6b 20 74 72 65 65 20 t the link tree 0750: 6c 6f 63 61 74 69 6f 6e 20 61 6e 64 20 61 20 66 location and a f 0760: 69 72 73 74 20 64 69 73 6b 0a 20 20 20 20 28 64 irst disk. (d 0770: 65 62 75 67 3a 70 72 69 6e 74 20 30 20 22 4e 6f ebug:print 0 "No 0780: 77 20 79 6f 75 20 6e 65 65 64 20 61 6e 20 69 6e w you need an in 0790: 69 74 69 61 6c 20 70 6c 61 63 65 20 74 6f 20 73 itial place to s 07a0: 74 6f 72 65 20 79 6f 75 72 20 72 75 6e 73 2e 20 tore your runs. 07b0: 54 68 65 73 65 20 61 72 65 20 63 61 6c 6c 65 64 These are called 07c0: 20 5c 22 64 69 73 6b 73 5c 22 20 61 6e 64 20 79 \"disks\" and y 07d0: 6f 75 0a 63 61 6e 20 61 64 64 20 6d 6f 72 65 20 ou.can add more 07e0: 61 74 20 61 6e 79 20 74 69 6d 65 2e 20 54 6f 20 at any time. To 07f0: 67 65 74 20 67 6f 69 6e 67 20 70 72 6f 76 69 64 get going provid 0800: 65 20 61 20 77 72 69 74 65 61 62 6c 65 20 64 69 e a writeable di 0810: 72 65 63 74 6f 72 79 20 6e 61 6d 65 2e 20 22 29 rectory name. ") 0820: 0a 20 20 20 20 28 73 65 74 21 20 66 69 72 73 74 . (set! first 0830: 64 20 28 72 65 61 64 2d 6c 69 6e 65 29 29 0a 0a d (read-line)).. 0840: 20 20 20 20 28 64 65 62 75 67 3a 70 72 69 6e 74 (debug:print 0850: 20 30 20 22 4d 65 67 61 74 65 73 74 20 75 73 65 0 "Megatest use 0860: 73 20 61 20 74 72 65 65 20 6f 66 20 73 79 6d 6c s a tree of syml 0870: 69 6e 6b 73 20 74 6f 20 70 72 6f 76 69 64 65 20 inks to provide 0880: 61 20 75 6e 69 66 6f 72 6d 20 73 74 72 75 63 74 a uniform struct 0890: 75 72 65 20 66 6f 72 20 66 69 6e 64 69 6e 67 20 ure for finding 08a0: 61 6c 6c 20 74 68 65 20 74 65 73 74 73 0a 79 6f all the tests.yo 08b0: 75 20 72 75 6e 20 6f 76 65 72 20 74 69 6d 65 2e u run over time. 08c0: 20 50 6c 65 61 73 65 20 70 72 6f 76 69 64 65 20 Please provide 08d0: 61 20 70 61 74 68 20 77 68 65 72 65 20 77 65 20 a path where we 08e0: 63 61 6e 20 63 72 65 61 74 65 20 74 68 69 73 20 can create this 08f0: 6c 69 6e 6b 20 74 72 65 65 2e 22 29 0a 20 20 20 link tree."). 0900: 20 28 73 65 74 21 20 6c 6e 74 72 65 65 20 28 72 (set! lntree (r 0910: 65 61 64 2d 6c 69 6e 65 29 29 0a 20 20 20 20 0a ead-line)). . 0920: 20 20 20 20 28 77 69 74 68 2d 6f 75 74 70 75 74 (with-output 0930: 2d 74 6f 2d 66 69 6c 65 20 0a 09 28 6c 61 6d 62 -to-file ..(lamb 0940: 64 61 20 28 29 0a 09 20 20 28 70 72 69 6e 74 20 da ().. (print 0950: 22 5b 66 69 65 6c 64 73 5d 22 29 0a 09 20 20 28 "[fields]").. ( 0960: 6d 61 70 20 28 6c 61 6d 62 64 61 20 28 6b 29 28 map (lambda (k)( 0970: 70 72 69 6e 74 20 6b 20 22 20 54 45 58 54 22 29 print k " TEXT") 0980: 29 20 6b 65 79 73 29 0a 09 20 20 28 70 72 69 6e ) keys).. (prin 0990: 74 20 22 22 29 0a 09 20 20 28 70 72 69 6e 74 20 t "").. (print 09a0: 22 5b 73 65 74 75 70 5d 22 29 0a 09 20 20 28 70 "[setup]").. (p 09b0: 72 69 6e 74 20 22 23 20 41 64 6a 75 73 74 20 6d rint "# Adjust m 09c0: 61 78 5f 63 6f 6e 63 75 72 72 65 6e 74 5f 6a 6f ax_concurrent_jo 09d0: 62 73 20 74 6f 20 6c 69 6d 69 74 20 68 6f 77 20 bs to limit how 09e0: 6d 75 63 68 20 79 6f 75 20 6c 6f 61 64 20 79 6f much you load yo 09f0: 75 72 20 6d 61 63 68 69 6e 65 73 22 29 0a 09 20 ur machines").. 0a00: 20 28 70 72 69 6e 74 20 22 6d 61 78 5f 63 6f 6e (print "max_con 0a10: 63 75 72 72 65 6e 74 5f 6a 6f 62 73 20 35 30 5c current_jobs 50\ 0a20: 6e 22 29 0a 09 20 20 28 70 72 69 6e 74 20 22 23 n").. (print "# 0a30: 20 54 68 69 73 20 69 73 20 79 6f 75 72 20 6c 69 This is your li 0a40: 6e 6b 20 70 61 74 68 2c 20 79 6f 75 20 63 61 6e nk path, you can 0a50: 20 6d 6f 76 65 20 69 74 20 62 75 74 20 69 74 20 move it but it 0a60: 69 73 20 67 65 6e 65 72 61 6c 6c 79 20 62 65 74 is generally bet 0a70: 74 65 72 20 74 6f 20 6b 65 65 70 20 69 74 20 73 ter to keep it s 0a80: 74 61 62 6c 65 22 29 0a 09 20 20 28 70 72 69 6e table").. (prin 0a90: 74 20 22 6c 69 6e 6b 74 72 65 65 20 22 20 6c 6e t "linktree " ln 0aa0: 74 72 65 65 29 0a 09 20 20 28 70 72 69 6e 74 20 tree).. (print 0ab0: 22 22 29 29 29 29 29 0a ""))))).