Megatest

Hex Artifact Content
Login

Artifact 8e37510f96af83dacb7a51ea13733210a14b5f92:


0000: 23 20 20 43 6f 70 79 72 69 67 68 74 20 32 30 30  #  Copyright 200
0010: 36 2d 32 30 31 37 2c 20 4d 61 74 74 68 65 77 20  6-2017, Matthew 
0020: 57 65 6c 6c 61 6e 64 2e 0a 23 20 0a 23 20 54 68  Welland..# .# Th
0030: 69 73 20 66 69 6c 65 20 69 73 20 70 61 72 74 20  is file is part 
0040: 6f 66 20 4d 65 67 61 74 65 73 74 2e 0a 23 20 0a  of Megatest..# .
0050: 23 20 20 20 20 20 4d 65 67 61 74 65 73 74 20 69  #     Megatest i
0060: 73 20 66 72 65 65 20 73 6f 66 74 77 61 72 65 3a  s free software:
0070: 20 79 6f 75 20 63 61 6e 20 72 65 64 69 73 74 72   you can redistr
0080: 69 62 75 74 65 20 69 74 20 61 6e 64 2f 6f 72 20  ibute it and/or 
0090: 6d 6f 64 69 66 79 0a 23 20 20 20 20 20 69 74 20  modify.#     it 
00a0: 75 6e 64 65 72 20 74 68 65 20 74 65 72 6d 73 20  under the terms 
00b0: 6f 66 20 74 68 65 20 47 4e 55 20 47 65 6e 65 72  of the GNU Gener
00c0: 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73  al Public Licens
00d0: 65 20 61 73 20 70 75 62 6c 69 73 68 65 64 20 62  e as published b
00e0: 79 0a 23 20 20 20 20 20 74 68 65 20 46 72 65 65  y.#     the Free
00f0: 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 61   Software Founda
0100: 74 69 6f 6e 2c 20 65 69 74 68 65 72 20 76 65 72  tion, either ver
0110: 73 69 6f 6e 20 33 20 6f 66 20 74 68 65 20 4c 69  sion 3 of the Li
0120: 63 65 6e 73 65 2c 20 6f 72 0a 23 20 20 20 20 20  cense, or.#     
0130: 28 61 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 29  (at your option)
0140: 20 61 6e 79 20 6c 61 74 65 72 20 76 65 72 73 69   any later versi
0150: 6f 6e 2e 0a 23 20 0a 23 20 20 20 20 20 4d 65 67  on..# .#     Meg
0160: 61 74 65 73 74 20 69 73 20 64 69 73 74 72 69 62  atest is distrib
0170: 75 74 65 64 20 69 6e 20 74 68 65 20 68 6f 70 65  uted in the hope
0180: 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20 62 65   that it will be
0190: 20 75 73 65 66 75 6c 2c 0a 23 20 20 20 20 20 62   useful,.#     b
01a0: 75 74 20 57 49 54 48 4f 55 54 20 41 4e 59 20 57  ut WITHOUT ANY W
01b0: 41 52 52 41 4e 54 59 3b 20 77 69 74 68 6f 75 74  ARRANTY; without
01c0: 20 65 76 65 6e 20 74 68 65 20 69 6d 70 6c 69 65   even the implie
01d0: 64 20 77 61 72 72 61 6e 74 79 20 6f 66 0a 23 20  d warranty of.# 
01e0: 20 20 20 20 4d 45 52 43 48 41 4e 54 41 42 49 4c      MERCHANTABIL
01f0: 49 54 59 20 6f 72 20 46 49 54 4e 45 53 53 20 46  ITY or FITNESS F
0200: 4f 52 20 41 20 50 41 52 54 49 43 55 4c 41 52 20  OR A PARTICULAR 
0210: 50 55 52 50 4f 53 45 2e 20 20 53 65 65 20 74 68  PURPOSE.  See th
0220: 65 0a 23 20 20 20 20 20 47 4e 55 20 47 65 6e 65  e.#     GNU Gene
0230: 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e  ral Public Licen
0240: 73 65 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61  se for more deta
0250: 69 6c 73 2e 0a 23 20 0a 23 20 20 20 20 20 59 6f  ils..# .#     Yo
0260: 75 20 73 68 6f 75 6c 64 20 68 61 76 65 20 72 65  u should have re
0270: 63 65 69 76 65 64 20 61 20 63 6f 70 79 20 6f 66  ceived a copy of
0280: 20 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 6c   the GNU General
0290: 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 0a   Public License.
02a0: 23 20 20 20 20 20 61 6c 6f 6e 67 20 77 69 74 68  #     along with
02b0: 20 4d 65 67 61 74 65 73 74 2e 20 20 49 66 20 6e   Megatest.  If n
02c0: 6f 74 2c 20 73 65 65 20 3c 68 74 74 70 3a 2f 2f  ot, see <http://
02d0: 77 77 77 2e 67 6e 75 2e 6f 72 67 2f 6c 69 63 65  www.gnu.org/lice
02e0: 6e 73 65 73 2f 3e 2e 0a 0a 5b 66 69 65 6c 64 73  nses/>...[fields
02f0: 5d 0a 53 59 53 54 45 4d 20 54 45 58 54 0a 52 45  ].SYSTEM TEXT.RE
0300: 4c 45 41 53 45 20 54 45 58 54 0a 0a 5b 73 65 74  LEASE TEXT..[set
0310: 75 70 5d 0a 23 20 41 64 6a 75 73 74 20 6d 61 78  up].# Adjust max
0320: 5f 63 6f 6e 63 75 72 72 65 6e 74 5f 6a 6f 62 73  _concurrent_jobs
0330: 20 74 6f 20 6c 69 6d 69 74 20 68 6f 77 20 6d 75   to limit how mu
0340: 63 68 20 79 6f 75 20 6c 6f 61 64 20 79 6f 75 72  ch you load your
0350: 20 6d 61 63 68 69 6e 65 73 0a 6d 61 78 5f 63 6f   machines.max_co
0360: 6e 63 75 72 72 65 6e 74 5f 6a 6f 62 73 20 35 30  ncurrent_jobs 50
0370: 0a 0a 5b 73 65 72 76 65 72 5d 0a 74 69 6d 65 6f  ..[server].timeo
0380: 75 74 20 33 0a 23 20 33 36 30 30 0a 0a 23 20 55  ut 3.# 3600..# U
0390: 6e 63 6f 6d 6d 65 6e 74 20 74 68 69 73 20 74 6f  ncomment this to
03a0: 20 6d 61 6b 65 20 74 68 65 20 69 6e 2d 6d 65 6d   make the in-mem
03b0: 20 64 62 20 69 6e 74 6f 20 61 20 64 69 73 6b 20   db into a disk 
03c0: 62 61 73 65 64 20 64 62 20 28 73 6c 6f 77 65 72  based db (slower
03d0: 20 62 75 74 20 67 6f 6f 64 20 66 6f 72 20 64 65   but good for de
03e0: 62 75 67 29 0a 23 20 62 65 20 61 77 61 72 65 20  bug).# be aware 
03f0: 74 68 61 74 20 73 6f 6d 65 20 75 6e 69 74 20 74  that some unit t
0400: 65 73 74 73 20 77 69 6c 6c 20 66 61 69 6c 20 77  ests will fail w
0410: 69 74 68 20 74 68 69 73 20 64 75 65 20 74 6f 20  ith this due to 
0420: 70 65 72 73 69 73 74 65 6e 74 20 64 61 74 61 0a  persistent data.
0430: 23 0a 23 20 74 6d 70 64 62 20 2f 74 6d 70 0a 0a  #.# tmpdb /tmp..
0440: 23 20 54 68 69 73 20 69 73 20 79 6f 75 72 20 6c  # This is your l
0450: 69 6e 6b 20 70 61 74 68 2c 20 79 6f 75 20 63 61  ink path, you ca
0460: 6e 20 6d 6f 76 65 20 69 74 20 62 75 74 20 69 74  n move it but it
0470: 20 69 73 20 67 65 6e 65 72 61 6c 6c 79 20 62 65   is generally be
0480: 74 74 65 72 20 74 6f 20 6b 65 65 70 20 69 74 20  tter to keep it 
0490: 73 74 61 62 6c 65 0a 6c 69 6e 6b 74 72 65 65 20  stable.linktree 
04a0: 23 7b 67 65 74 65 6e 76 20 4d 54 5f 52 55 4e 5f  #{getenv MT_RUN_
04b0: 41 52 45 41 5f 48 4f 4d 45 7d 2f 2e 2e 2f 73 69  AREA_HOME}/../si
04c0: 6d 70 6c 65 6c 69 6e 6b 73 0a 0a 23 20 56 61 6c  mplelinks..# Val
04d0: 69 64 20 76 61 6c 75 65 73 20 66 6f 72 20 73 74  id values for st
04e0: 61 74 65 20 61 6e 64 20 73 74 61 74 75 73 20 66  ate and status f
04f0: 6f 72 20 73 74 65 70 73 2c 20 4e 42 2f 2f 20 49  or steps, NB// I
0500: 74 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65  t is not recomme
0510: 6e 64 65 64 20 79 6f 75 20 75 73 65 20 74 68 69  nded you use thi
0520: 73 0a 5b 76 61 6c 69 64 76 61 6c 75 65 73 5d 0a  s.[validvalues].
0530: 73 74 61 74 65 20 73 74 61 72 74 20 65 6e 64 20  state start end 
0540: 63 6f 6d 70 6c 65 74 65 64 0a 0a 23 20 4a 6f 62  completed..# Job
0550: 20 74 6f 6f 6c 73 20 61 72 65 20 6d 6f 72 65 20   tools are more 
0560: 61 64 76 61 6e 63 65 64 20 77 61 79 73 20 74 6f  advanced ways to
0570: 20 63 6f 6e 74 72 6f 6c 20 68 6f 77 20 79 6f 75   control how you
0580: 72 20 6a 6f 62 73 20 61 72 65 20 6c 61 75 6e 63  r jobs are launc
0590: 68 65 64 0a 5b 6a 6f 62 74 6f 6f 6c 73 5d 0a 23  hed.[jobtools].#
05a0: 20 75 73 65 73 68 65 6c 6c 20 79 65 73 0a 6c 61   useshell yes.la
05b0: 75 6e 63 68 65 72 20 6e 62 66 61 6b 65 0a 0a 23  uncher nbfake..#
05c0: 20 59 6f 75 20 63 61 6e 20 6f 76 65 72 72 69 64   You can overrid
05d0: 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61  e environment va
05e0: 72 69 61 62 6c 65 73 20 66 6f 72 20 61 6c 6c 20  riables for all 
05f0: 79 6f 75 72 20 74 65 73 74 73 20 68 65 72 65 0a  your tests here.
0600: 5b 65 6e 76 2d 6f 76 65 72 72 69 64 65 5d 0a 45  [env-override].E
0610: 58 41 4d 50 4c 45 5f 56 41 52 20 65 78 61 6d 70  XAMPLE_VAR examp
0620: 6c 65 20 76 61 6c 75 65 0a 0a 23 20 41 73 20 79  le value..# As y
0630: 6f 75 20 72 75 6e 20 6d 6f 72 65 20 74 65 73 74  ou run more test
0640: 73 20 79 6f 75 20 6d 61 79 20 6e 65 65 64 20 74  s you may need t
0650: 6f 20 61 64 64 20 61 64 64 69 74 69 6f 6e 61 6c  o add additional
0660: 20 64 69 73 6b 73 2c 20 74 68 65 20 6e 61 6d 65   disks, the name
0670: 73 20 61 72 65 20 61 72 62 69 74 72 61 72 79 20  s are arbitrary 
0680: 62 75 74 20 6d 75 73 74 20 62 65 20 75 6e 69 71  but must be uniq
0690: 75 65 0a 5b 64 69 73 6b 73 5d 0a 64 69 73 6b 30  ue.[disks].disk0
06a0: 20 23 7b 67 65 74 65 6e 76 20 4d 54 5f 52 55 4e   #{getenv MT_RUN
06b0: 5f 41 52 45 41 5f 48 4f 4d 45 7d 2f 2e 2e 2f 73  _AREA_HOME}/../s
06c0: 69 6d 70 6c 65 72 75 6e 73 0a                    impleruns.