Hex Artifact Content

Artifact b38b166c9c35b2a61b4d885198072f88793d74bd:


0000: 23 21 20 2f 62 69 6e 2f 62 61 73 68 0a 0a 56 45  #! /bin/bash..VE
0010: 52 53 49 4f 4e 53 3d 22 38 2e 34 2e 31 39 20 38  RSIONS="8.4.19 8
0020: 2e 35 2e 31 30 20 63 76 73 5f 48 45 41 44 22 0a  .5.10 cvs_HEAD".
0030: 0a 23 20 46 69 6e 64 20 74 68 65 20 62 61 73 65  .# Find the base
0040: 20 64 69 72 65 63 74 6f 72 79 0a 66 6f 72 20 78   directory.for x
0050: 20 69 6e 20 31 20 32 20 33 20 34 20 5f 5f 66 61   in 1 2 3 4 __fa
0060: 69 6c 5f 5f 3b 20 64 6f 0a 09 69 66 20 5b 20 22  il__; do..if [ "
0070: 24 7b 78 7d 22 20 3d 20 22 5f 5f 66 61 69 6c 5f  ${x}" = "__fail_
0080: 5f 22 20 5d 3b 20 74 68 65 6e 0a 09 09 65 63 68  _" ]; then...ech
0090: 6f 20 27 55 6e 61 62 6c 65 20 74 6f 20 66 69 6e  o 'Unable to fin
00a0: 64 20 4b 69 74 43 72 65 61 74 6f 72 2c 20 61 62  d KitCreator, ab
00b0: 6f 72 74 69 6e 67 2e 27 20 3e 26 32 0a 0a 09 09  orting.' >&2....
00c0: 65 78 69 74 20 31 0a 09 66 69 0a 0a 09 69 66 20  exit 1..fi...if 
00d0: 5b 20 2d 78 20 6b 69 74 63 72 65 61 74 6f 72 20  [ -x kitcreator 
00e0: 5d 3b 20 74 68 65 6e 0a 09 09 62 72 65 61 6b 0a  ]; then...break.
00f0: 09 66 69 0a 0a 09 63 64 20 2e 2e 0a 64 6f 6e 65  .fi...cd ...done
0100: 0a 0a 52 4f 4f 54 44 49 52 3d 22 24 28 70 77 64  ..ROOTDIR="$(pwd
0110: 29 22 0a 54 45 53 54 44 49 52 3d 22 24 7b 52 4f  )".TESTDIR="${RO
0120: 4f 54 44 49 52 7d 2f 62 75 69 6c 64 2f 74 65 73  OTDIR}/build/tes
0130: 74 22 0a 65 78 70 6f 72 74 20 52 4f 4f 54 44 49  t".export ROOTDI
0140: 52 20 54 45 53 54 44 49 52 0a 0a 23 20 48 61 6e  R TESTDIR..# Han
0150: 64 6c 65 20 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65  dle command-line
0160: 20 61 72 67 75 6d 65 6e 74 73 0a 69 66 20 5b 20   arguments.if [ 
0170: 22 24 31 22 20 3d 20 22 63 6c 65 61 6e 22 20 5d  "$1" = "clean" ]
0180: 3b 20 74 68 65 6e 0a 09 72 6d 20 2d 72 66 20 22  ; then..rm -rf "
0190: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
01a0: 0a 66 69 0a 0a 23 20 43 72 65 61 74 65 20 70 6c  .fi..# Create pl
01b0: 61 63 65 20 74 6f 20 70 75 74 20 6b 69 74 73 0a  ace to put kits.
01c0: 6d 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52  mkdir "${TESTDIR
01d0: 7d 2f 6b 69 74 73 22 20 3e 2f 64 65 76 2f 6e 75  }/kits" >/dev/nu
01e0: 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 6d  ll 2>/dev/null.m
01f0: 6b 64 69 72 20 22 24 7b 54 45 53 54 44 49 52 7d  kdir "${TESTDIR}
0200: 2f 6b 69 74 73 2f 66 61 69 6c 65 64 22 20 3e 2f  /kits/failed" >/
0210: 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f  dev/null 2>/dev/
0220: 6e 75 6c 6c 0a 69 66 20 5b 20 21 20 2d 64 20 22  null.if [ ! -d "
0230: 24 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 22  ${TESTDIR}/kits"
0240: 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68 6f 20 27   ]; then..echo '
0250: 55 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65  Unable to create
0260: 20 6b 69 74 73 2f 20 64 69 72 65 63 74 6f 72 79   kits/ directory
0270: 2c 20 61 62 6f 72 74 69 6e 67 2e 27 20 3e 26 32  , aborting.' >&2
0280: 0a 0a 09 65 78 69 74 20 31 0a 66 69 0a 0a 23 20  ...exit 1.fi..# 
0290: 43 6c 65 61 6e 75 70 0a 66 6f 72 20 66 69 6c 65  Cleanup.for file
02a0: 20 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22   in "${TESTDIR}"
02b0: 2f 6b 69 74 73 2f 2a 2e 6c 6f 67 3b 20 64 6f 0a  /kits/*.log; do.
02c0: 09 69 66 20 65 63 68 6f 20 22 24 7b 66 69 6c 65  .if echo "${file
02d0: 7d 22 20 7c 20 67 72 65 70 20 2d 2d 20 27 2d 62  }" | grep -- '-b
02e0: 75 69 6c 64 2e 6c 6f 67 24 27 20 3e 2f 64 65 76  uild.log$' >/dev
02f0: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 63 6f  /null; then...co
0300: 6e 74 69 6e 75 65 0a 09 66 69 0a 0a 09 72 6d 20  ntinue..fi...rm 
0310: 2d 66 20 22 24 7b 66 69 6c 65 7d 22 0a 64 6f 6e  -f "${file}".don
0320: 65 0a 0a 23 20 44 69 73 61 62 6c 65 20 57 49 4e  e..# Disable WIN
0330: 45 20 64 65 62 75 67 67 69 6e 67 0a 57 49 4e 45  E debugging.WINE
0340: 50 52 45 46 49 58 3d 22 24 7b 54 45 53 54 44 49  PREFIX="${TESTDI
0350: 52 7d 2f 2e 77 69 6e 65 22 0a 65 78 70 6f 72 74  R}/.wine".export
0360: 20 57 49 4e 45 50 52 45 46 49 58 0a 72 6d 20 2d   WINEPREFIX.rm -
0370: 72 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58  rf "${WINEPREFIX
0380: 7d 22 0a 6d 6b 64 69 72 20 22 24 7b 57 49 4e 45  }".mkdir "${WINE
0390: 50 52 45 46 49 58 7d 22 0a 0a 63 61 74 20 3c 3c  PREFIX}"..cat <<
03a0: 20 5c 5f 45 4f 46 5f 20 3e 20 22 24 7b 57 49 4e   \_EOF_ > "${WIN
03b0: 45 50 52 45 46 49 58 7d 2f 75 70 64 61 74 65 2d  EPREFIX}/update-
03c0: 72 65 67 22 0a 5b 48 4b 45 59 5f 4c 4f 43 41 4c  reg".[HKEY_LOCAL
03d0: 5f 4d 41 43 48 49 4e 45 5c 53 6f 66 74 77 61 72  _MACHINE\Softwar
03e0: 65 5c 4d 69 63 72 6f 73 6f 66 74 5c 57 69 6e 64  e\Microsoft\Wind
03f0: 6f 77 73 20 4e 54 5c 43 75 72 72 65 6e 74 56 65  ows NT\CurrentVe
0400: 72 73 69 6f 6e 5c 41 65 44 65 62 75 67 5d 0a 22  rsion\AeDebug]."
0410: 41 75 74 6f 22 3d 64 77 6f 72 64 3a 30 30 30 30  Auto"=dword:0000
0420: 30 30 30 31 0a 22 44 65 62 75 67 67 65 72 22 3d  0001."Debugger"=
0430: 22 66 61 6c 73 65 22 0a 5f 45 4f 46 5f 0a 0a 72  "false"._EOF_..r
0440: 65 67 65 64 69 74 20 22 24 7b 57 49 4e 45 50 52  egedit "${WINEPR
0450: 45 46 49 58 7d 2f 75 70 64 61 74 65 2d 72 65 67  EFIX}/update-reg
0460: 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f  " >/dev/null 2>/
0470: 64 65 76 2f 6e 75 6c 6c 0a 0a 23 20 53 74 61 72  dev/null..# Star
0480: 74 20 58 76 66 62 20 66 6f 72 20 58 31 31 2d 62  t Xvfb for X11-b
0490: 61 73 65 64 20 74 65 73 74 73 0a 58 56 46 42 5f  ased tests.XVFB_
04a0: 50 49 44 3d 22 24 28 0a 09 58 76 66 62 20 3a 33  PID="$(..Xvfb :3
04b0: 31 20 2d 73 63 72 65 65 6e 20 30 20 38 30 30 78  1 -screen 0 800x
04c0: 36 30 30 78 32 34 20 2d 6e 6f 6c 69 73 74 65 6e  600x24 -nolisten
04d0: 20 74 63 70 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20   tcp >/dev/null 
04e0: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 20 26 0a 09 65  2>/dev/null &..e
04f0: 63 68 6f 20 22 24 21 22 0a 29 22 0a 44 49 53 50  cho "$!".)".DISP
0500: 4c 41 59 3d 3a 33 31 0a 65 78 70 6f 72 74 20 44  LAY=:31.export D
0510: 49 53 50 4c 41 59 0a 0a 69 66 20 5b 20 22 24 7b  ISPLAY..if [ "${
0520: 42 49 47 42 55 49 4c 44 7d 22 20 3d 20 22 31 22  BIGBUILD}" = "1"
0530: 20 5d 3b 20 74 68 65 6e 0a 09 6b 69 74 73 3d 22   ]; then..kits="
0540: 24 28 65 63 68 6f 20 6e 6f 72 6d 61 6c 7b 2c 2d  $(echo normal{,-
0550: 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68  zip,-nomk4}{,-th
0560: 72 65 61 64 65 64 7d 7b 2c 2d 73 74 61 74 69 63  readed}{,-static
0570: 74 6b 7d 7b 2c 2d 6e 6f 74 6b 7d 20 6e 6f 72 6d  tk}{,-notk} norm
0580: 61 6c 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c  al{,-threaded}{,
0590: 2d 6e 6f 74 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 2d  -notk}{,-nomk4}-
05a0: 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38  kitdll win32-i58
05b0: 36 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b 34 7d 7b  6{,-zip,-nomk4}{
05c0: 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f  ,-threaded}{,-no
05d0: 74 6b 7d 20 77 69 6e 33 32 2d 69 35 38 36 7b 2c  tk} win32-i586{,
05e0: 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f 74  -threaded}{,-not
05f0: 6b 7d 7b 2c 2d 6e 6f 6d 6b 34 7d 2d 6b 69 74 64  k}{,-nomk4}-kitd
0600: 6c 6c 20 6d 69 6e 7b 2c 2d 73 74 61 74 69 63 7d  ll min{,-static}
0610: 20 7b 6c 69 6e 75 78 2d 6d 69 70 73 65 6c 2d 6d   {linux-mipsel-m
0620: 69 6e 2c 6c 69 6e 75 78 2d 61 6d 64 36 34 2d 6e  in,linux-amd64-n
0630: 6f 74 6b 7d 7b 2c 2d 6b 69 74 64 6c 6c 7d 20 7b  otk}{,-kitdll} {
0640: 73 6f 6c 61 72 69 73 2d 69 33 38 36 2c 73 6f 6c  solaris-i386,sol
0650: 61 72 69 73 2d 61 6d 64 36 34 2c 73 6f 6c 61 72  aris-amd64,solar
0660: 69 73 2d 73 70 61 72 63 2c 73 6f 6c 61 72 69 73  is-sparc,solaris
0670: 2d 73 70 61 72 63 36 34 2c 66 72 65 65 62 73 64  -sparc64,freebsd
0680: 2d 61 6d 64 36 34 2c 6e 65 74 62 73 64 2d 61 6d  -amd64,netbsd-am
0690: 64 36 34 7d 7b 2c 2d 7a 69 70 2c 2d 6e 6f 6d 6b  d64}{,-zip,-nomk
06a0: 34 7d 7b 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c  4}{,-threaded}{,
06b0: 2d 73 74 61 74 69 63 74 6b 7d 7b 2c 2d 6e 6f 74  -statictk}{,-not
06c0: 6b 7d 20 7b 73 6f 6c 61 72 69 73 2d 69 33 38 36  k} {solaris-i386
06d0: 2c 73 6f 6c 61 72 69 73 2d 61 6d 64 36 34 2c 73  ,solaris-amd64,s
06e0: 6f 6c 61 72 69 73 2d 73 70 61 72 63 2c 73 6f 6c  olaris-sparc,sol
06f0: 61 72 69 73 2d 73 70 61 72 63 36 34 2c 66 72 65  aris-sparc64,fre
0700: 65 62 73 64 2d 61 6d 64 36 34 2c 6e 65 74 62 73  ebsd-amd64,netbs
0710: 64 2d 61 6d 64 36 34 7d 7b 2c 2d 74 68 72 65 61  d-amd64}{,-threa
0720: 64 65 64 7d 7b 2c 2d 6e 6f 74 6b 7d 7b 2c 2d 6e  ded}{,-notk}{,-n
0730: 6f 6d 6b 34 7d 2d 6b 69 74 64 6c 6c 20 6e 65 74  omk4}-kitdll net
0740: 62 73 64 2d 69 33 38 36 7b 2c 2d 7a 69 70 2c 2d  bsd-i386{,-zip,-
0750: 6e 6f 6d 6b 34 7d 7b 2c 2d 74 68 72 65 61 64 65  nomk4}{,-threade
0760: 64 7d 7b 2c 2d 73 74 61 74 69 63 74 6b 7d 2d 6e  d}{,-statictk}-n
0770: 6f 74 6b 20 6e 65 74 62 73 64 2d 69 33 38 36 7b  otk netbsd-i386{
0780: 2c 2d 74 68 72 65 61 64 65 64 7d 7b 2c 2d 6e 6f  ,-threaded}{,-no
0790: 6d 6b 34 7d 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c  mk4}-notk-kitdll
07a0: 29 22 0a 65 6c 73 65 0a 09 6b 69 74 73 3d 22 6e  )".else..kits="n
07b0: 6f 72 6d 61 6c 20 6e 6f 72 6d 61 6c 2d 7a 69 70  ormal normal-zip
07c0: 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64   normal-threaded
07d0: 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64   normal-threaded
07e0: 2d 7a 69 70 20 6e 6f 72 6d 61 6c 2d 73 74 61 74  -zip normal-stat
07f0: 69 63 74 6b 20 6e 6f 72 6d 61 6c 2d 6e 6f 74 6b  ictk normal-notk
0800: 20 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64   normal-threaded
0810: 2d 6e 6f 74 6b 20 6e 6f 72 6d 61 6c 2d 74 68 72  -notk normal-thr
0820: 65 61 64 65 64 2d 7a 69 70 2d 6e 6f 74 6b 20 6e  eaded-zip-notk n
0830: 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 20 6d 69 6e 20  ormal-nomk4 min 
0840: 6d 69 6e 2d 73 74 61 74 69 63 20 6e 6f 72 6d 61  min-static norma
0850: 6c 2d 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d  l-kitdll normal-
0860: 74 68 72 65 61 64 65 64 2d 6b 69 74 64 6c 6c 20  threaded-kitdll 
0870: 6e 6f 72 6d 61 6c 2d 6e 6f 74 6b 2d 6b 69 74 64  normal-notk-kitd
0880: 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f 6d 6b 34 2d  ll normal-nomk4-
0890: 6b 69 74 64 6c 6c 20 6e 6f 72 6d 61 6c 2d 6e 6f  kitdll normal-no
08a0: 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20  mk4-notk-kitdll 
08b0: 6e 6f 72 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d  normal-threaded-
08c0: 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6e 6f 72  nomk4-kitdll nor
08d0: 6d 61 6c 2d 74 68 72 65 61 64 65 64 2d 6e 6f 74  mal-threaded-not
08e0: 6b 2d 6e 6f 6d 6b 34 2d 6b 69 74 64 6c 6c 20 6d  k-nomk4-kitdll m
08f0: 69 6e 2d 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d  in-kitdll win32-
0900: 69 35 38 36 20 77 69 6e 33 32 2d 69 35 38 36 2d  i586 win32-i586-
0910: 7a 69 70 20 77 69 6e 33 32 2d 69 35 38 36 2d 74  zip win32-i586-t
0920: 68 72 65 61 64 65 64 20 77 69 6e 33 32 2d 69 35  hreaded win32-i5
0930: 38 36 2d 74 68 72 65 61 64 65 64 2d 7a 69 70 20  86-threaded-zip 
0940: 77 69 6e 33 32 2d 69 35 38 36 2d 6e 6f 74 6b 20  win32-i586-notk 
0950: 77 69 6e 33 32 2d 69 35 38 36 2d 74 68 72 65 61  win32-i586-threa
0960: 64 65 64 2d 6e 6f 74 6b 20 77 69 6e 33 32 2d 69  ded-notk win32-i
0970: 35 38 36 2d 6e 6f 6d 6b 34 20 77 69 6e 33 32 2d  586-nomk4 win32-
0980: 69 35 38 36 2d 6b 69 74 64 6c 6c 20 77 69 6e 33  i586-kitdll win3
0990: 32 2d 69 35 38 36 2d 74 68 72 65 61 64 65 64 2d  2-i586-threaded-
09a0: 6b 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38  kitdll win32-i58
09b0: 36 2d 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 77 69  6-notk-kitdll wi
09c0: 6e 33 32 2d 69 35 38 36 2d 6e 6f 6d 6b 34 2d 6b  n32-i586-nomk4-k
09d0: 69 74 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36  itdll win32-i586
09e0: 2d 6e 6f 6d 6b 34 2d 6e 6f 74 6b 2d 6b 69 74 64  -nomk4-notk-kitd
09f0: 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74 68  ll win32-i586-th
0a00: 72 65 61 64 65 64 2d 6e 6f 6d 6b 34 2d 6b 69 74  readed-nomk4-kit
0a10: 64 6c 6c 20 77 69 6e 33 32 2d 69 35 38 36 2d 74  dll win32-i586-t
0a20: 68 72 65 61 64 65 64 2d 6e 6f 74 6b 2d 6e 6f 6d  hreaded-notk-nom
0a30: 6b 34 2d 6b 69 74 64 6c 6c 20 6c 69 6e 75 78 2d  k4-kitdll linux-
0a40: 6d 69 70 73 65 6c 2d 6d 69 6e 20 6c 69 6e 75 78  mipsel-min linux
0a50: 2d 6d 69 70 73 65 6c 2d 6d 69 6e 2d 6b 69 74 64  -mipsel-min-kitd
0a60: 6c 6c 20 6c 69 6e 75 78 2d 61 6d 64 36 34 2d 6e  ll linux-amd64-n
0a70: 6f 74 6b 20 6c 69 6e 75 78 2d 61 6d 64 36 34 2d  otk linux-amd64-
0a80: 6e 6f 74 6b 2d 6b 69 74 64 6c 6c 20 73 6f 6c 61  notk-kitdll sola
0a90: 72 69 73 2d 69 33 38 36 20 73 6f 6c 61 72 69 73  ris-i386 solaris
0aa0: 2d 69 33 38 36 2d 6b 69 74 64 6c 6c 20 73 6f 6c  -i386-kitdll sol
0ab0: 61 72 69 73 2d 61 6d 64 36 34 20 73 6f 6c 61 72  aris-amd64 solar
0ac0: 69 73 2d 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20  is-amd64-kitdll 
0ad0: 73 6f 6c 61 72 69 73 2d 73 70 61 72 63 20 73 6f  solaris-sparc so
0ae0: 6c 61 72 69 73 2d 73 70 61 72 63 2d 6b 69 74 64  laris-sparc-kitd
0af0: 6c 6c 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  ll solaris-sparc
0b00: 36 34 20 73 6f 6c 61 72 69 73 2d 73 70 61 72 63  64 solaris-sparc
0b10: 36 34 2d 6b 69 74 64 6c 6c 20 66 72 65 65 62 73  64-kitdll freebs
0b20: 64 2d 61 6d 64 36 34 20 66 72 65 65 62 73 64 2d  d-amd64 freebsd-
0b30: 61 6d 64 36 34 2d 6b 69 74 64 6c 6c 20 6e 65 74  amd64-kitdll net
0b40: 62 73 64 2d 69 33 38 36 2d 6e 6f 74 6b 20 6e 65  bsd-i386-notk ne
0b50: 74 62 73 64 2d 69 33 38 36 2d 6e 6f 74 6b 2d 6b  tbsd-i386-notk-k
0b60: 69 74 64 6c 6c 20 6e 65 74 62 73 64 2d 61 6d 64  itdll netbsd-amd
0b70: 36 34 20 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d  64 netbsd-amd64-
0b80: 6b 69 74 64 6c 6c 22 0a 66 69 0a 0a 66 61 69 6c  kitdll".fi..fail
0b90: 65 64 3d 22 22 0a 66 6f 72 20 6b 69 74 20 69 6e  ed="".for kit in
0ba0: 20 24 6b 69 74 73 3b 20 64 6f 0a 09 6b 69 74 63   $kits; do..kitc
0bb0: 72 65 61 74 6f 72 3d 22 2e 2f 6b 69 74 63 72 65  reator="./kitcre
0bc0: 61 74 6f 72 22 0a 09 61 72 67 73 3d 22 22 0a 09  ator"..args=""..
0bd0: 72 75 6e 6e 61 62 6c 65 3d 22 31 22 0a 09 69 73  runnable="1"..is
0be0: 7a 69 70 3d 22 30 22 0a 09 73 74 61 74 69 63 74  zip="0"..statict
0bf0: 6b 3d 22 30 22 0a 09 6e 6f 74 6b 3d 22 30 22 0a  k="0"..notk="0".
0c00: 09 6e 6f 6d 6b 34 3d 22 30 22 0a 09 78 63 6f 6d  .nomk4="0"..xcom
0c10: 70 69 6c 65 3d 22 30 22 0a 09 6b 69 74 64 6c 6c  pile="0"..kitdll
0c20: 3d 22 30 22 0a 09 6b 69 74 72 75 6e 63 6d 64 3d  ="0"..kitruncmd=
0c30: 22 22 0a 0a 09 23 20 48 61 6e 64 6c 65 20 62 61  ""...# Handle ba
0c40: 73 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  se configuration
0c50: 0a 09 6f 73 3d 22 24 28 75 6e 61 6d 65 20 2d 73  ..os="$(uname -s
0c60: 20 7c 20 64 64 20 63 6f 6e 76 3d 6c 63 61 73 65   | dd conv=lcase
0c70: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 29 22 0a 09   2>/dev/null)"..
0c80: 63 70 75 3d 22 24 28 75 6e 61 6d 65 20 2d 6d 20  cpu="$(uname -m 
0c90: 7c 20 64 64 20 63 6f 6e 76 3d 6c 63 61 73 65 20  | dd conv=lcase 
0ca0: 32 3e 2f 64 65 76 2f 6e 75 6c 6c 29 22 0a 09 63  2>/dev/null)"..c
0cb0: 61 73 65 20 22 24 7b 6b 69 74 7d 22 20 69 6e 0a  ase "${kit}" in.
0cc0: 09 09 6e 6f 72 6d 61 6c 7c 6e 6f 72 6d 61 6c 2d  ..normal|normal-
0cd0: 2a 29 0a 09 09 09 6b 69 74 3d 22 24 28 65 63 68  *)....kit="$(ech
0ce0: 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65 64  o "${kit}" | sed
0cf0: 20 22 73 40 5e 6e 6f 72 6d 61 6c 40 24 6f 73 2d   "s@^normal@$os-
0d00: 24 63 70 75 40 22 29 22 0a 09 09 09 3b 3b 0a 09  $cpu@")"....;;..
0d10: 09 6d 69 6e 7c 6d 69 6e 2d 6b 69 74 64 6c 6c 29  .min|min-kitdll)
0d20: 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22  ....kitcreator="
0d30: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6d 69 6e  ./build/make-min
0d40: 6b 69 74 22 0a 09 09 09 69 73 7a 69 70 3d 22 31  kit"....iszip="1
0d50: 22 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09  "....notk="1"...
0d60: 09 6b 69 74 3d 22 24 28 65 63 68 6f 20 22 24 7b  .kit="$(echo "${
0d70: 6b 69 74 7d 22 20 7c 20 73 65 64 20 22 73 40 5e  kit}" | sed "s@^
0d80: 6d 69 6e 40 24 6f 73 2d 24 63 70 75 2d 6d 69 6e  min@$os-$cpu-min
0d90: 40 22 29 22 0a 09 09 09 3b 3b 0a 09 09 6d 69 6e  @")"....;;...min
0da0: 2d 73 74 61 74 69 63 29 0a 09 09 09 6b 69 74 63  -static)....kitc
0db0: 72 65 61 74 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f  reator="./build/
0dc0: 6d 61 6b 65 2d 6d 69 6e 6b 69 74 2d 73 74 61 74  make-minkit-stat
0dd0: 69 63 22 0a 09 09 09 69 73 7a 69 70 3d 22 31 22  ic"....iszip="1"
0de0: 0a 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09 09 09  ....notk="1"....
0df0: 6b 69 74 3d 22 24 7b 6f 73 7d 2d 24 7b 63 70 75  kit="${os}-${cpu
0e00: 7d 2d 6d 69 6e 2d 73 74 61 74 69 63 22 0a 09 09  }-min-static"...
0e10: 09 3b 3b 0a 09 09 77 69 6e 33 32 7c 77 69 6e 33  .;;...win32|win3
0e20: 32 2d 2a 29 0a 09 09 09 6b 69 74 63 72 65 61 74  2-*)....kitcreat
0e30: 6f 72 3d 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65  or="./build/make
0e40: 2d 6b 69 74 2d 77 69 6e 33 32 22 0a 09 09 09 78  -kit-win32"....x
0e50: 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09 6b  compile="1"....k
0e60: 69 74 72 75 6e 63 6d 64 3d 22 77 69 6e 65 22 0a  itruncmd="wine".
0e70: 09 09 09 3b 3b 0a 09 09 6c 69 6e 75 78 2d 6d 69  ...;;...linux-mi
0e80: 70 73 65 6c 2d 6d 69 6e 7c 6c 69 6e 75 78 2d 6d  psel-min|linux-m
0e90: 69 70 73 65 6c 2d 6d 69 6e 2d 6b 69 74 64 6c 6c  ipsel-min-kitdll
0ea0: 29 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d  )....kitcreator=
0eb0: 22 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69  "./build/make-ki
0ec0: 74 2d 6d 69 70 73 65 6c 22 0a 09 09 09 72 75 6e  t-mipsel"....run
0ed0: 6e 61 62 6c 65 3d 22 30 22 0a 09 09 09 78 63 6f  nable="0"....xco
0ee0: 6d 70 69 6c 65 3d 22 31 22 0a 09 09 09 6e 6f 74  mpile="1"....not
0ef0: 6b 3d 22 31 22 0a 09 09 09 69 73 7a 69 70 3d 22  k="1"....iszip="
0f00: 31 22 0a 09 09 09 3b 3b 0a 09 09 6c 69 6e 75 78  1"....;;...linux
0f10: 2d 61 6d 64 36 34 7c 6c 69 6e 75 78 2d 61 6d 64  -amd64|linux-amd
0f20: 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73  64-*|\...solaris
0f30: 2d 69 33 38 36 7c 73 6f 6c 61 72 69 73 2d 69 33  -i386|solaris-i3
0f40: 38 36 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72 69 73  86-*|\...solaris
0f50: 2d 61 6d 64 36 34 7c 73 6f 6c 61 72 69 73 2d 61  -amd64|solaris-a
0f60: 6d 64 36 34 2d 2a 7c 5c 0a 09 09 73 6f 6c 61 72  md64-*|\...solar
0f70: 69 73 2d 73 70 61 72 63 7c 73 6f 6c 61 72 69 73  is-sparc|solaris
0f80: 2d 73 70 61 72 63 2d 2a 7c 5c 0a 09 09 73 6f 6c  -sparc-*|\...sol
0f90: 61 72 69 73 2d 73 70 61 72 63 36 34 7c 73 6f 6c  aris-sparc64|sol
0fa0: 61 72 69 73 2d 73 70 61 72 63 36 34 2d 2a 7c 5c  aris-sparc64-*|\
0fb0: 0a 09 09 66 72 65 65 62 73 64 2d 61 6d 64 36 34  ...freebsd-amd64
0fc0: 7c 66 72 65 65 62 73 64 2d 61 6d 64 36 34 2d 2a  |freebsd-amd64-*
0fd0: 7c 5c 0a 09 09 6e 65 74 62 73 64 2d 69 33 38 36  |\...netbsd-i386
0fe0: 7c 6e 65 74 62 73 64 2d 69 33 38 36 2d 2a 7c 5c  |netbsd-i386-*|\
0ff0: 0a 09 09 6e 65 74 62 73 64 2d 61 6d 64 36 34 7c  ...netbsd-amd64|
1000: 6e 65 74 62 73 64 2d 61 6d 64 36 34 2d 2a 7c 5c  netbsd-amd64-*|\
1010: 0a 09 09 68 70 75 78 2d 68 70 70 61 36 34 7c 68  ...hpux-hppa64|h
1020: 70 75 78 2d 68 70 70 61 36 34 2d 2a 29 0a 09 09  pux-hppa64-*)...
1030: 09 70 6c 61 74 66 6f 72 6d 3d 22 24 28 65 63 68  .platform="$(ech
1040: 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 63 75 74  o "${kit}" | cut
1050: 20 2d 66 20 31 2d 32 20 2d 64 20 27 2d 27 29 22   -f 1-2 -d '-')"
1060: 0a 09 09 09 6b 69 74 63 72 65 61 74 6f 72 3d 22  ....kitcreator="
1070: 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d 6b 69 74  ./build/make-kit
1080: 2d 24 7b 70 6c 61 74 66 6f 72 6d 7d 22 0a 09 09  -${platform}"...
1090: 09 72 75 6e 6e 61 62 6c 65 3d 22 30 22 0a 09 09  .runnable="0"...
10a0: 09 78 63 6f 6d 70 69 6c 65 3d 22 31 22 0a 09 09  .xcompile="1"...
10b0: 09 69 73 7a 69 70 3d 22 30 22 0a 09 09 09 3b 3b  .iszip="0"....;;
10c0: 0a 09 65 73 61 63 0a 0a 09 69 66 20 5b 20 22 24  ..esac...if [ "$
10d0: 7b 78 63 6f 6d 70 69 6c 65 7d 22 20 21 3d 20 22  {xcompile}" != "
10e0: 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 6b 69 74  0" ]; then...kit
10f0: 3d 22 24 7b 6b 69 74 7d 2d 78 63 6f 6d 70 69 6c  ="${kit}-xcompil
1100: 65 22 0a 09 66 69 0a 0a 09 23 20 48 61 6e 64 6c  e"..fi...# Handl
1110: 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e  e additional con
1120: 66 69 67 75 72 61 74 69 6f 6e 0a 09 74 65 6d 70  figuration..temp
1130: 6b 69 74 3d 22 2d 24 7b 6b 69 74 7d 2d 22 0a 09  kit="-${kit}-"..
1140: 66 6f 72 20 74 72 79 20 69 6e 20 31 20 32 20 33  for try in 1 2 3
1150: 20 34 20 35 20 36 20 37 20 38 20 39 3b 20 64 6f   4 5 6 7 8 9; do
1160: 0a 09 09 63 61 73 65 20 22 2d 24 7b 74 65 6d 70  ...case "-${temp
1170: 6b 69 74 7d 2d 22 20 69 6e 0a 09 09 09 2a 2d 74  kit}-" in....*-t
1180: 68 72 65 61 64 65 64 2d 2a 29 0a 09 09 09 09 74  hreaded-*).....t
1190: 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f 20 22  empkit="$(echo "
11a0: 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20 73 65  ${tempkit}" | se
11b0: 64 20 27 73 40 2d 74 68 72 65 61 64 65 64 2d 40  d 's@-threaded-@
11c0: 2d 40 27 29 22 0a 09 09 09 09 61 72 67 73 3d 22  -@')".....args="
11d0: 24 7b 61 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65  ${args} --enable
11e0: 2d 74 68 72 65 61 64 73 22 0a 09 09 09 09 3b 3b  -threads".....;;
11f0: 0a 09 09 09 2a 2d 7a 69 70 2d 2a 29 0a 09 09 09  ....*-zip-*)....
1200: 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68 6f  .tempkit="$(echo
1210: 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c 20   "${tempkit}" | 
1220: 73 65 64 20 27 73 40 2d 7a 69 70 2d 40 2d 40 27  sed 's@-zip-@-@'
1230: 29 22 0a 09 09 09 09 61 72 67 73 3d 22 24 7b 61  )".....args="${a
1240: 72 67 73 7d 20 2d 2d 65 6e 61 62 6c 65 2d 6b 69  rgs} --enable-ki
1250: 74 2d 73 74 6f 72 61 67 65 3d 7a 69 70 22 0a 09  t-storage=zip"..
1260: 09 09 09 69 73 7a 69 70 3d 22 31 22 0a 09 09 09  ...iszip="1"....
1270: 09 3b 3b 0a 09 09 09 2a 2d 73 74 61 74 69 63 74  .;;....*-statict
1280: 6b 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74  k-*).....tempkit
1290: 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70  ="$(echo "${temp
12a0: 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d  kit}" | sed 's@-
12b0: 73 74 61 74 69 63 74 6b 2d 40 2d 40 27 29 22 0a  statictk-@-@')".
12c0: 09 09 09 09 69 66 20 5b 20 22 24 7b 6e 6f 74 6b  ....if [ "${notk
12d0: 7d 22 20 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e  }" = "0" ]; then
12e0: 0a 09 09 09 09 09 73 74 61 74 69 63 74 6b 3d 22  ......statictk="
12f0: 31 22 0a 09 09 09 09 65 6c 73 65 0a 09 09 09 09  1".....else.....
1300: 09 65 63 68 6f 20 22 24 7b 6b 69 74 7d 3a 20 55  .echo "${kit}: U
1310: 6e 61 62 6c 65 20 74 6f 20 63 72 65 61 74 65 20  nable to create 
1320: 53 74 61 74 69 63 54 6b 20 61 6e 64 20 4e 6f 54  StaticTk and NoT
1330: 6b 2c 20 69 67 6e 6f 72 69 6e 67 20 53 74 61 74  k, ignoring Stat
1340: 69 63 54 6b 22 20 3e 26 32 0a 09 09 09 09 66 69  icTk" >&2.....fi
1350: 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 6e 6f 74  .....;;....*-not
1360: 6b 2d 2a 29 0a 09 09 09 09 74 65 6d 70 6b 69 74  k-*).....tempkit
1370: 3d 22 24 28 65 63 68 6f 20 22 24 7b 74 65 6d 70  ="$(echo "${temp
1380: 6b 69 74 7d 22 20 7c 20 73 65 64 20 27 73 40 2d  kit}" | sed 's@-
1390: 6e 6f 74 6b 2d 40 2d 40 27 29 22 0a 09 09 09 09  notk-@-@')".....
13a0: 69 66 20 5b 20 22 24 7b 73 74 61 74 69 63 74 6b  if [ "${statictk
13b0: 7d 22 20 3d 20 22 30 22 20 5d 3b 20 74 68 65 6e  }" = "0" ]; then
13c0: 0a 09 09 09 09 09 6e 6f 74 6b 3d 22 31 22 0a 09  ......notk="1"..
13d0: 09 09 09 65 6c 73 65 0a 09 09 09 09 09 65 63 68  ...else......ech
13e0: 6f 20 22 24 7b 6b 69 74 7d 3a 20 55 6e 61 62 6c  o "${kit}: Unabl
13f0: 65 20 74 6f 20 63 72 65 61 74 65 20 53 74 61 74  e to create Stat
1400: 69 63 54 6b 20 61 6e 64 20 4e 6f 54 6b 2c 20 69  icTk and NoTk, i
1410: 67 6e 6f 72 69 6e 67 20 4e 6f 54 6b 22 20 3e 26  gnoring NoTk" >&
1420: 32 0a 09 09 09 09 66 69 0a 09 09 09 09 3b 3b 0a  2.....fi.....;;.
1430: 09 09 09 2a 2d 6e 6f 6d 6b 34 2d 2a 29 0a 09 09  ...*-nomk4-*)...
1440: 09 09 74 65 6d 70 6b 69 74 3d 22 24 28 65 63 68  ..tempkit="$(ech
1450: 6f 20 22 24 7b 74 65 6d 70 6b 69 74 7d 22 20 7c  o "${tempkit}" |
1460: 20 73 65 64 20 27 73 40 2d 6e 6f 6d 6b 34 2d 40   sed 's@-nomk4-@
1470: 2d 40 27 29 22 0a 09 09 09 09 6e 6f 6d 6b 34 3d  -@')".....nomk4=
1480: 22 31 22 0a 09 09 09 09 69 73 7a 69 70 3d 22 31  "1".....iszip="1
1490: 22 0a 09 09 09 09 3b 3b 0a 09 09 09 2a 2d 6b 69  ".....;;....*-ki
14a0: 74 64 6c 6c 2d 2a 29 0a 09 09 09 09 6b 69 74 64  tdll-*).....kitd
14b0: 6c 6c 3d 22 31 22 0a 09 09 09 09 3b 3b 0a 09 09  ll="1".....;;...
14c0: 65 73 61 63 0a 09 64 6f 6e 65 0a 0a 09 69 66 20  esac..done...if 
14d0: 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20  [ "${kitdll}" = 
14e0: 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 23 20  "1" ]; then...# 
14f0: 43 75 72 72 65 6e 74 6c 79 20 6e 6f 20 4b 69 74  Currently no Kit
1500: 44 4c 4c 20 75 73 65 73 20 5a 69 70 0a 09 09 69  DLL uses Zip...i
1510: 73 7a 69 70 3d 22 30 22 0a 09 66 69 0a 0a 09 66  szip="0"..fi...f
1520: 6f 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 24 7b  or version in ${
1530: 56 45 52 53 49 4f 4e 53 7d 3b 20 64 6f 0a 09 09  VERSIONS}; do...
1540: 23 20 57 6f 72 6b 20 61 72 6f 75 6e 64 20 63 68  # Work around ch
1550: 61 6e 67 65 73 20 69 6e 20 64 65 66 61 75 6c 74  anges in default
1560: 20 62 65 68 61 76 69 6f 75 72 0a 09 09 69 66 20   behaviour...if 
1570: 5b 20 22 24 7b 76 65 72 73 69 6f 6e 7d 22 20 3d  [ "${version}" =
1580: 20 22 63 76 73 5f 48 45 41 44 22 20 5d 3b 20 74   "cvs_HEAD" ]; t
1590: 68 65 6e 0a 09 09 09 6b 69 74 3d 22 24 28 65 63  hen....kit="$(ec
15a0: 68 6f 20 22 24 7b 6b 69 74 7d 22 20 7c 20 73 65  ho "${kit}" | se
15b0: 64 20 27 73 40 2d 74 68 72 65 61 64 65 64 40 2d  d 's@-threaded@-
15c0: 75 6e 74 68 72 65 61 64 65 64 40 27 29 22 0a 09  unthreaded@')"..
15d0: 09 09 61 72 67 73 3d 22 24 28 65 63 68 6f 20 22  ..args="$(echo "
15e0: 24 7b 61 72 67 73 7d 22 20 7c 20 73 65 64 20 27  ${args}" | sed '
15f0: 73 40 20 2d 2d 65 6e 61 62 6c 65 2d 74 68 72 65  s@ --enable-thre
1600: 61 64 73 40 20 2d 2d 64 69 73 61 62 6c 65 2d 74  ads@ --disable-t
1610: 68 72 65 61 64 73 40 27 29 22 0a 09 09 66 69 0a  hreads@')"...fi.
1620: 0a 09 09 23 20 43 72 65 61 74 65 20 54 63 6c 6b  ...# Create Tclk
1630: 69 74 0a 09 09 69 66 20 5b 20 22 24 7b 6b 69 74  it...if [ "${kit
1640: 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74  dll}" = "1" ]; t
1650: 68 65 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69  hen....createdki
1660: 74 3d 22 6c 69 62 74 63 6c 6b 69 74 2a 2e 64 6c  t="libtclkit*.dl
1670: 6c 20 6c 69 62 74 63 6c 6b 69 74 2a 2e 2a 22 0a  l libtclkit*.*".
1680: 09 09 09 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24  ...outputname="$
1690: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 6c  {TESTDIR}/kits/l
16a0: 69 62 74 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69  ibtclkit-${versi
16b0: 6f 6e 7d 2d 24 7b 6b 69 74 7d 22 0a 09 09 09 66  on}-${kit}"....f
16c0: 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 3d 22 24  ailoutputname="$
16d0: 7b 54 45 53 54 44 49 52 7d 2f 6b 69 74 73 2f 66  {TESTDIR}/kits/f
16e0: 61 69 6c 65 64 2f 6c 69 62 74 63 6c 6b 69 74 2d  ailed/libtclkit-
16f0: 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b 69 74  ${version}-${kit
1700: 7d 22 0a 09 09 65 6c 73 65 0a 09 09 09 63 72 65  }"...else....cre
1710: 61 74 65 64 6b 69 74 3d 22 74 63 6c 6b 69 74 2d  atedkit="tclkit-
1720: 24 7b 76 65 72 73 69 6f 6e 7d 22 0a 09 09 09 6f  ${version}"....o
1730: 75 74 70 75 74 6e 61 6d 65 3d 22 24 7b 54 45 53  utputname="${TES
1740: 54 44 49 52 7d 2f 6b 69 74 73 2f 74 63 6c 6b 69  TDIR}/kits/tclki
1750: 74 2d 24 7b 76 65 72 73 69 6f 6e 7d 2d 24 7b 6b  t-${version}-${k
1760: 69 74 7d 22 0a 09 09 09 66 61 69 6c 6f 75 74 70  it}"....failoutp
1770: 75 74 6e 61 6d 65 3d 22 24 7b 54 45 53 54 44 49  utname="${TESTDI
1780: 52 7d 2f 6b 69 74 73 2f 66 61 69 6c 65 64 2f 74  R}/kits/failed/t
1790: 63 6c 6b 69 74 2d 24 7b 76 65 72 73 69 6f 6e 7d  clkit-${version}
17a0: 2d 24 7b 6b 69 74 7d 22 0a 09 09 66 69 0a 09 09  -${kit}"...fi...
17b0: 62 75 69 6c 64 6c 6f 67 3d 22 24 7b 6f 75 74 70  buildlog="${outp
17c0: 75 74 6e 61 6d 65 7d 2d 62 75 69 6c 64 2e 6c 6f  utname}-build.lo
17d0: 67 22 0a 09 09 66 61 69 6c 62 75 69 6c 64 6c 6f  g"...failbuildlo
17e0: 67 3d 22 24 7b 66 61 69 6c 6f 75 74 70 75 74 6e  g="${failoutputn
17f0: 61 6d 65 7d 2d 62 75 69 6c 64 2e 6c 6f 67 22 0a  ame}-build.log".
1800: 09 09 74 65 73 74 72 65 73 75 6c 74 73 6c 6f 67  ..testresultslog
1810: 3d 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d  ="${outputname}-
1820: 74 65 73 74 73 2e 6c 6f 67 22 0a 0a 09 09 69 66  tests.log"....if
1830: 20 5b 20 21 20 2d 66 20 22 24 7b 6f 75 74 70 75   [ ! -f "${outpu
1840: 74 6e 61 6d 65 7d 22 20 5d 3b 20 74 68 65 6e 0a  tname}" ]; then.
1850: 09 09 09 75 6e 73 65 74 20 4b 49 54 43 52 45 41  ...unset KITCREA
1860: 54 4f 52 5f 50 4b 47 53 20 53 54 41 54 49 43 54  TOR_PKGS STATICT
1870: 4b 0a 0a 09 09 09 69 66 20 5b 20 2d 66 20 22 24  K.....if [ -f "$
1880: 7b 66 61 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d  {failoutputname}
1890: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63  " ]; then.....ec
18a0: 68 6f 20 22 53 6b 69 70 70 69 6e 67 20 72 65 62  ho "Skipping reb
18b0: 75 69 6c 64 69 6e 67 20 66 61 69 6c 65 64 20 6b  uilding failed k
18c0: 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b  it ${version}/${
18d0: 6b 69 74 7d 20 2e 2e 2e 22 0a 0a 09 09 09 09 66  kit} ..."......f
18e0: 61 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d  ailed="${failed}
18f0: 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69   ${version}/${ki
1900: 74 7d 2d 62 75 69 6c 64 22 0a 0a 09 09 09 09 63  t}-build"......c
1910: 6f 6e 74 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09  ontinue....fi...
1920: 09 09 72 6d 20 2d 66 20 74 63 6c 73 68 0a 09 09  ..rm -f tclsh...
1930: 09 2e 2f 6b 69 74 63 72 65 61 74 6f 72 20 63 6c  ../kitcreator cl
1940: 65 61 6e 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32  ean >/dev/null 2
1950: 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 0a 09 09 09 65  >/dev/null.....e
1960: 63 68 6f 20 22 43 72 65 61 74 69 6e 67 20 54 63  cho "Creating Tc
1970: 6c 6b 69 74 20 24 7b 76 65 72 73 69 6f 6e 7d 2f  lkit ${version}/
1980: 24 7b 6b 69 74 7d 2e 2e 2e 22 0a 09 09 09 65 63  ${kit}..."....ec
1990: 68 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20 73  ho " *** Build s
19a0: 74 61 72 74 65 64 20 24 28 77 68 6f 61 6d 69 29  tarted $(whoami)
19b0: 40 24 28 68 6f 73 74 6e 61 6d 65 29 20 6f 6e 20  @$(hostname) on 
19c0: 24 28 64 61 74 65 29 22 20 3e 20 22 24 7b 62 75  $(date)" > "${bu
19d0: 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f  ildlog}"....echo
19e0: 20 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c   '' >> "${buildl
19f0: 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 22 20 2a  og}"....echo " *
1a00: 2a 2a 20 42 75 69 6c 64 20 53 63 72 69 70 74 22  ** Build Script"
1a10: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
1a20: 22 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 6e 6f  ".....if [ "${no
1a30: 74 6b 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68  tk}" = "1" ]; th
1a40: 65 6e 0a 09 09 09 09 4b 49 54 43 52 45 41 54 4f  en.....KITCREATO
1a50: 52 5f 50 4b 47 53 3d 27 69 74 63 6c 20 6d 6b 34  R_PKGS='itcl mk4
1a60: 74 63 6c 27 0a 09 09 09 66 69 0a 0a 09 09 09 69  tcl'....fi.....i
1a70: 66 20 5b 20 22 24 7b 6e 6f 6d 6b 34 7d 22 20 3d  f [ "${nomk4}" =
1a80: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
1a90: 09 69 66 20 5b 20 2d 7a 20 22 24 7b 4b 49 54 43  .if [ -z "${KITC
1aa0: 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b  REATOR_PKGS}" ];
1ab0: 20 74 68 65 6e 0a 09 09 09 09 09 4b 49 54 43 52   then......KITCR
1ac0: 45 41 54 4f 52 5f 50 4b 47 53 3d 27 69 74 63 6c  EATOR_PKGS='itcl
1ad0: 20 74 6b 27 0a 09 09 09 09 65 6c 73 65 0a 09 09   tk'.....else...
1ae0: 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  ...KITCREATOR_PK
1af0: 47 53 3d 22 24 28 65 63 68 6f 20 22 24 7b 4b 49  GS="$(echo "${KI
1b00: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20  TCREATOR_PKGS}" 
1b10: 7c 20 73 65 64 20 27 73 40 6d 6b 34 74 63 6c 40  | sed 's@mk4tcl@
1b20: 40 27 29 22 0a 09 09 09 09 66 69 0a 09 09 09 66  @')".....fi....f
1b30: 69 0a 0a 09 09 09 69 66 20 5b 20 22 24 7b 6b 69  i.....if [ "${ki
1b40: 74 64 6c 6c 7d 22 20 3d 20 22 31 22 20 5d 3b 20  tdll}" = "1" ]; 
1b50: 74 68 65 6e 0a 09 09 09 09 69 66 20 5b 20 2d 7a  then.....if [ -z
1b60: 20 22 24 7b 4b 49 54 43 52 45 41 54 4f 52 5f 50   "${KITCREATOR_P
1b70: 4b 47 53 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09  KGS}" ]; then...
1b80: 09 09 09 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b  ...KITCREATOR_PK
1b90: 47 53 3d 27 74 6b 20 69 74 63 6c 20 6d 6b 34 74  GS='tk itcl mk4t
1ba0: 63 6c 20 6b 69 74 64 6c 6c 27 0a 09 09 09 09 65  cl kitdll'.....e
1bb0: 6c 73 65 0a 09 09 09 09 09 4b 49 54 43 52 45 41  lse......KITCREA
1bc0: 54 4f 52 5f 50 4b 47 53 3d 22 24 7b 4b 49 54 43  TOR_PKGS="${KITC
1bd0: 52 45 41 54 4f 52 5f 50 4b 47 53 7d 20 6b 69 74  REATOR_PKGS} kit
1be0: 64 6c 6c 22 0a 09 09 09 09 66 69 0a 09 09 09 66  dll".....fi....f
1bf0: 69 0a 0a 09 09 09 65 78 70 6f 72 74 20 4b 49 54  i.....export KIT
1c00: 43 52 45 41 54 4f 52 5f 50 4b 47 53 0a 0a 09 09  CREATOR_PKGS....
1c10: 09 69 66 20 5b 20 2d 6e 20 22 24 7b 4b 49 54 43  .if [ -n "${KITC
1c20: 52 45 41 54 4f 52 5f 50 4b 47 53 7d 22 20 5d 3b  REATOR_PKGS}" ];
1c30: 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20 22   then.....echo "
1c40: 20 20 4b 49 54 43 52 45 41 54 4f 52 5f 50 4b 47    KITCREATOR_PKG
1c50: 53 3d 5c 22 24 7b 4b 49 54 43 52 45 41 54 4f 52  S=\"${KITCREATOR
1c60: 5f 50 4b 47 53 7d 5c 22 22 20 3e 3e 20 22 24 7b  _PKGS}\"" >> "${
1c70: 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65  buildlog}".....e
1c80: 63 68 6f 20 22 20 20 65 78 70 6f 72 74 20 4b 49  cho "  export KI
1c90: 54 43 52 45 41 54 4f 52 5f 50 4b 47 53 22 20 3e  TCREATOR_PKGS" >
1ca0: 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a  > "${buildlog}".
1cb0: 09 09 09 66 69 0a 0a 09 09 09 69 66 20 5b 20 22  ...fi.....if [ "
1cc0: 24 7b 73 74 61 74 69 63 74 6b 7d 22 20 3d 20 22  ${statictk}" = "
1cd0: 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 53  1" ]; then.....S
1ce0: 54 41 54 49 43 54 4b 3d 22 31 22 0a 09 09 09 09  TATICTK="1".....
1cf0: 65 78 70 6f 72 74 20 53 54 41 54 49 43 54 4b 0a  export STATICTK.
1d00: 0a 09 09 09 09 65 63 68 6f 20 22 20 20 53 54 41  .....echo "  STA
1d10: 54 49 43 54 4b 3d 5c 22 24 7b 53 54 41 54 49 43  TICTK=\"${STATIC
1d20: 54 4b 7d 5c 22 22 20 3e 3e 20 22 24 7b 62 75 69  TK}\"" >> "${bui
1d30: 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f  ldlog}".....echo
1d40: 20 22 20 20 65 78 70 6f 72 74 20 53 54 41 54 49   "  export STATI
1d50: 43 54 4b 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  CTK" >> "${build
1d60: 6c 6f 67 7d 22 0a 09 09 09 66 69 0a 0a 09 09 09  log}"....fi.....
1d70: 69 66 20 5b 20 22 24 7b 6b 69 74 63 72 65 61 74  if [ "${kitcreat
1d80: 6f 72 7d 22 20 21 3d 20 22 2e 2f 6b 69 74 63 72  or}" != "./kitcr
1d90: 65 61 74 6f 72 22 20 5d 3b 20 74 68 65 6e 0a 09  eator" ]; then..
1da0: 09 09 09 65 63 68 6f 20 22 20 20 6d 6b 64 69 72  ...echo "  mkdir
1db0: 20 62 75 69 6c 64 22 20 3e 3e 20 22 24 7b 62 75   build" >> "${bu
1dc0: 69 6c 64 6c 6f 67 7d 22 0a 0a 09 09 09 09 23 20  ildlog}"......# 
1dd0: 53 65 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63  Several build sc
1de0: 72 69 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 69  ripts rely on mi
1df0: 6e 6b 69 74 20 74 6f 20 77 6f 72 6b 0a 09 09 09  nkit to work....
1e00: 09 69 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c  .if grep './buil
1e10: 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 27 20 22  d/make-minkit' "
1e20: 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d 22 20 3e  ${kitcreator}" >
1e30: 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76  /dev/null 2>/dev
1e40: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
1e50: 09 65 63 68 6f 20 22 20 20 63 61 74 20 3c 3c 20  .echo "  cat << 
1e60: 5c 5f 5f 45 4f 46 5f 5f 20 3e 20 2e 2f 62 75 69  \__EOF__ > ./bui
1e70: 6c 64 2f 6d 61 6b 65 2d 6d 69 6e 6b 69 74 22 20  ld/make-minkit" 
1e80: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
1e90: 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e 40 20  ......sed 's@^@ 
1ea0: 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f 6d 61   @'  './build/ma
1eb0: 6b 65 2d 6d 69 6e 6b 69 74 27 20 3e 3e 20 22 24  ke-minkit' >> "$
1ec0: 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 09  {buildlog}".....
1ed0: 09 65 63 68 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f  .echo "  __EOF__
1ee0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
1ef0: 7d 22 0a 09 09 09 09 09 65 63 68 6f 20 27 27 20  }"......echo '' 
1f00: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
1f10: 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 23 20 53  .....fi......# S
1f20: 65 76 65 72 61 6c 20 62 75 69 6c 64 20 73 63 72  everal build scr
1f30: 69 70 74 73 20 72 65 6c 79 20 6f 6e 20 6d 61 6b  ipts rely on mak
1f40: 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69  e-kit-crosscompi
1f50: 6c 65 20 74 6f 20 77 6f 72 6b 0a 09 09 09 09 69  le to work.....i
1f60: 66 20 67 72 65 70 20 27 2e 2f 62 75 69 6c 64 2f  f grep './build/
1f70: 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f  make-kit-crossco
1f80: 6d 70 69 6c 65 27 20 22 24 7b 6b 69 74 63 72 65  mpile' "${kitcre
1f90: 61 74 6f 72 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c  ator}" >/dev/nul
1fa0: 6c 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74  l 2>/dev/null; t
1fb0: 68 65 6e 0a 09 09 09 09 09 65 63 68 6f 20 22 20  hen......echo " 
1fc0: 20 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f   cat << \__EOF__
1fd0: 20 3e 20 2e 2f 62 75 69 6c 64 2f 6d 61 6b 65 2d   > ./build/make-
1fe0: 6b 69 74 2d 63 72 6f 73 73 63 6f 6d 70 69 6c 65  kit-crosscompile
1ff0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
2000: 7d 22 0a 09 09 09 09 09 73 65 64 20 27 73 40 5e  }"......sed 's@^
2010: 40 20 20 40 27 20 20 27 2e 2f 62 75 69 6c 64 2f  @  @'  './build/
2020: 6d 61 6b 65 2d 6b 69 74 2d 63 72 6f 73 73 63 6f  make-kit-crossco
2030: 6d 70 69 6c 65 27 20 3e 3e 20 22 24 7b 62 75 69  mpile' >> "${bui
2040: 6c 64 6c 6f 67 7d 22 0a 09 09 09 09 09 65 63 68  ldlog}"......ech
2050: 6f 20 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e  o "  __EOF__" >>
2060: 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09   "${buildlog}"..
2070: 09 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20 22  ....echo '' >> "
2080: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2090: 09 66 69 0a 0a 09 09 09 09 65 63 68 6f 20 22 20  .fi......echo " 
20a0: 20 63 61 74 20 3c 3c 20 5c 5f 5f 45 4f 46 5f 5f   cat << \__EOF__
20b0: 20 3e 20 24 7b 6b 69 74 63 72 65 61 74 6f 72 7d   > ${kitcreator}
20c0: 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67  " >> "${buildlog
20d0: 7d 22 0a 09 09 09 09 73 65 64 20 27 73 40 5e 40  }".....sed 's@^@
20e0: 20 20 40 27 20 20 22 24 7b 6b 69 74 63 72 65 61    @'  "${kitcrea
20f0: 74 6f 72 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c  tor}" >> "${buil
2100: 64 6c 6f 67 7d 22 0a 09 09 09 09 65 63 68 6f 20  dlog}".....echo 
2110: 22 20 20 5f 5f 45 4f 46 5f 5f 22 20 3e 3e 20 22  "  __EOF__" >> "
2120: 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09  ${buildlog}"....
2130: 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62  .echo '' >> "${b
2140: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 66 69 0a  uildlog}"....fi.
2150: 09 09 09 65 63 68 6f 20 22 20 20 5c 22 24 7b 6b  ...echo "  \"${k
2160: 69 74 63 72 65 61 74 6f 72 7d 5c 22 20 5c 22 24  itcreator}\" \"$
2170: 7b 76 65 72 73 69 6f 6e 7d 5c 22 20 24 7b 61 72  {version}\" ${ar
2180: 67 73 7d 22 20 3e 3e 20 22 24 7b 62 75 69 6c 64  gs}" >> "${build
2190: 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20 27 27  log}"....echo ''
21a0: 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d   >> "${buildlog}
21b0: 22 0a 09 09 09 65 63 68 6f 20 27 27 20 3e 3e 20  "....echo '' >> 
21c0: 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22 0a 09 09  "${buildlog}"...
21d0: 09 65 63 68 6f 20 27 27 20 3e 3e 20 22 24 7b 62  .echo '' >> "${b
21e0: 75 69 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68  uildlog}"....ech
21f0: 6f 20 22 20 2a 2a 2a 20 42 75 69 6c 64 20 52 65  o " *** Build Re
2200: 73 75 6c 74 73 22 20 3e 3e 20 22 24 7b 62 75 69  sults" >> "${bui
2210: 6c 64 6c 6f 67 7d 22 0a 09 09 09 65 63 68 6f 20  ldlog}"....echo 
2220: 27 27 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f  '' >> "${buildlo
2230: 67 7d 22 0a 0a 09 09 09 62 75 69 6c 64 66 61 69  g}".....buildfai
2240: 6c 65 64 3d 22 30 22 0a 09 09 09 22 24 7b 6b 69  led="0"...."${ki
2250: 74 63 72 65 61 74 6f 72 7d 22 20 22 24 7b 76 65  tcreator}" "${ve
2260: 72 73 69 6f 6e 7d 22 20 24 7b 61 72 67 73 7d 20  rsion}" ${args} 
2270: 3e 3e 20 22 24 7b 62 75 69 6c 64 6c 6f 67 7d 22  >> "${buildlog}"
2280: 20 32 3e 26 31 20 7c 7c 20 62 75 69 6c 64 66 61   2>&1 || buildfa
2290: 69 6c 65 64 3d 22 31 22 0a 09 09 09 67 72 65 70  iled="1"....grep
22a0: 20 2d 6e 20 27 5e 27 20 2a 2f 62 75 69 6c 64 2e   -n '^' */build.
22b0: 6c 6f 67 20 3e 3e 20 22 24 7b 62 75 69 6c 64 6c  log >> "${buildl
22c0: 6f 67 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66  og}" 2>&1.....if
22d0: 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d   [ "${kitdll}" =
22e0: 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09   "1" ]; then....
22f0: 09 23 20 43 72 65 61 74 65 20 74 65 73 74 20 64  .# Create test d
2300: 72 69 76 65 72 73 20 66 6f 72 20 4b 69 74 44 4c  rivers for KitDL
2310: 4c 0a 09 09 09 09 28 0a 09 09 09 09 09 65 63 68  L.....(......ech
2320: 6f 20 22 22 0a 09 09 09 09 09 65 63 68 6f 20 22  o ""......echo "
2330: 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22 0a 09  "......echo ""..
2340: 09 09 09 09 65 63 68 6f 20 22 20 2a 2a 2a 20 42  ....echo " *** B
2350: 75 69 6c 64 69 6e 67 20 4b 69 74 44 4c 4c 20 74  uilding KitDLL t
2360: 65 73 74 20 64 72 69 76 65 72 20 28 74 63 6c 73  est driver (tcls
2370: 68 29 22 0a 09 09 09 09 09 65 63 68 6f 20 22 22  h)"......echo ""
2380: 0a 0a 09 09 09 09 09 63 64 20 6b 69 74 73 68 2f  .......cd kitsh/
2390: 62 75 69 6c 64 2f 6b 69 74 73 68 2d 2a 2f 20 7c  build/kitsh-*/ |
23a0: 7c 20 65 78 69 74 20 31 0a 09 09 09 09 09 6d 61  | exit 1......ma
23b0: 6b 65 20 74 63 6c 73 68 0a 09 09 09 09 09 63 70  ke tclsh......cp
23c0: 20 74 63 6c 73 68 20 2e 2e 2f 2e 2e 2f 2e 2e 2f   tclsh ../../../
23d0: 0a 09 09 09 09 29 20 3e 3e 20 22 24 7b 62 75 69  .....) >> "${bui
23e0: 6c 64 6c 6f 67 7d 22 20 32 3e 26 31 0a 09 09 09  ldlog}" 2>&1....
23f0: 66 69 0a 0a 09 09 09 23 20 50 65 72 66 6f 72 6d  fi.....# Perform
2400: 20 77 69 6c 64 63 61 72 64 20 65 78 70 61 6e 73   wildcard expans
2410: 69 6f 6e 0a 09 09 09 63 72 65 61 74 65 64 6b 69  ion....createdki
2420: 74 3d 22 24 28 6c 73 20 2d 66 31 20 24 7b 63 72  t="$(ls -f1 ${cr
2430: 65 61 74 65 64 6b 69 74 7d 20 32 3e 2f 64 65 76  eatedkit} 2>/dev
2440: 2f 6e 75 6c 6c 20 7c 20 68 65 61 64 20 2d 6e 20  /null | head -n 
2450: 31 29 22 0a 0a 09 09 09 69 66 20 5b 20 21 20 2d  1)".....if [ ! -
2460: 66 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d  f "${createdkit}
2470: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63  " ]; then.....ec
2480: 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20 63 72  ho "Failed to cr
2490: 65 61 74 65 20 6b 69 74 20 24 7b 76 65 72 73 69  eate kit ${versi
24a0: 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26 32 0a  on}/${kit}" >&2.
24b0: 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24 7b 66  .....failed="${f
24c0: 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69 6f 6e  ailed} ${version
24d0: 7d 2f 24 7b 6b 69 74 7d 2d 62 75 69 6c 64 22 0a  }/${kit}-build".
24e0: 0a 09 09 09 09 74 6f 75 63 68 20 22 24 7b 66 61  .....touch "${fa
24f0: 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09  iloutputname}"..
2500: 09 09 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c 6f  ...mv "${buildlo
2510: 67 7d 22 20 22 24 7b 66 61 69 6c 62 75 69 6c 64  g}" "${failbuild
2520: 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d 66  log}"......rm -f
2530: 20 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e 74   tclsh......cont
2540: 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23  inue....fi.....#
2550: 20 56 65 72 69 66 79 20 73 61 6e 69 74 79 20 6f   Verify sanity o
2560: 66 20 63 72 65 61 74 65 64 20 6b 69 74 0a 09 09  f created kit...
2570: 09 69 73 73 61 6e 65 3d 31 0a 0a 09 09 09 23 23  .issane=1.....##
2580: 20 56 65 72 69 66 79 20 74 68 61 74 20 57 69 6e   Verify that Win
2590: 33 32 20 62 75 69 6c 64 73 20 61 72 65 20 6f 66  32 builds are of
25a0: 20 63 6f 72 72 65 63 74 20 74 79 70 65 0a 09 09   correct type...
25b0: 09 23 23 20 56 65 72 69 66 79 20 74 68 61 74 20  .## Verify that 
25c0: 44 4c 4c 20 62 75 69 6c 64 73 20 61 72 65 20 6f  DLL builds are o
25d0: 66 20 63 6f 72 72 65 63 74 20 74 79 70 65 0a 09  f correct type..
25e0: 09 09 63 61 73 65 20 22 2d 24 7b 76 65 72 73 69  ..case "-${versi
25f0: 6f 6e 7d 2d 24 7b 6b 69 74 7d 2d 22 20 69 6e 0a  on}-${kit}-" in.
2600: 09 09 09 09 2a 2d 77 69 6e 33 32 2d 6b 69 74 64  ....*-win32-kitd
2610: 6c 6c 2d 2a 7c 2a 2d 77 69 6e 33 32 2d 2a 2d 6b  ll-*|*-win32-*-k
2620: 69 74 64 6c 6c 2d 2a 29 0a 09 09 09 09 09 69 66  itdll-*)......if
2630: 20 21 20 66 69 6c 65 20 22 24 7b 63 72 65 61 74   ! file "${creat
2640: 65 64 6b 69 74 7d 22 20 7c 20 67 72 65 70 20 27  edkit}" | grep '
2650: 4d 53 20 57 69 6e 64 6f 77 73 20 28 44 4c 4c 29  MS Windows (DLL)
2660: 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68  ' >/dev/null; th
2670: 65 6e 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d  en.......issane=
2680: 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b  0......fi......;
2690: 3b 0a 09 09 09 09 2a 2d 6b 69 74 64 6c 6c 2d 2a  ;.....*-kitdll-*
26a0: 29 0a 09 09 09 09 09 69 66 20 21 20 66 69 6c 65  )......if ! file
26b0: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
26c0: 20 7c 20 67 72 65 70 20 27 73 68 61 72 65 64 20   | grep 'shared 
26d0: 6f 62 6a 65 63 74 27 20 3e 2f 64 65 76 2f 6e 75  object' >/dev/nu
26e0: 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09 09 69  ll; then.......i
26f0: 73 73 61 6e 65 3d 30 0a 09 09 09 09 09 66 69 0a  ssane=0......fi.
2700: 09 09 09 09 09 3b 3b 0a 09 09 09 09 2a 2d 77 69  .....;;.....*-wi
2710: 6e 33 32 2d 6e 6f 74 6b 2d 2a 7c 2a 2d 77 69 6e  n32-notk-*|*-win
2720: 33 32 2d 2a 2d 6e 6f 74 6b 2d 2a 29 0a 09 09 09  32-*-notk-*)....
2730: 09 09 69 66 20 21 20 66 69 6c 65 20 22 24 7b 63  ..if ! file "${c
2740: 72 65 61 74 65 64 6b 69 74 7d 22 20 7c 20 67 72  reatedkit}" | gr
2750: 65 70 20 27 4d 53 20 57 69 6e 64 6f 77 73 20 28  ep 'MS Windows (
2760: 63 6f 6e 73 6f 6c 65 29 27 20 3e 2f 64 65 76 2f  console)' >/dev/
2770: 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09 09  null; then......
2780: 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c 65  .echo "Kit faile
2790: 64 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20 66  d sanity check f
27a0: 6f 72 20 62 65 69 6e 67 20 61 20 63 6f 6e 73 6f  or being a conso
27b0: 6c 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 22 20  le application" 
27c0: 3e 26 32 0a 09 09 09 09 09 09 69 73 73 61 6e 65  >&2.......issane
27d0: 3d 30 0a 09 09 09 09 09 66 69 0a 09 09 09 09 09  =0......fi......
27e0: 3b 3b 0a 09 09 09 09 2a 2d 77 69 6e 33 32 2d 2a  ;;.....*-win32-*
27f0: 29 0a 09 09 09 09 09 69 66 20 21 20 66 69 6c 65  )......if ! file
2800: 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22   "${createdkit}"
2810: 20 7c 20 67 72 65 70 20 27 4d 53 20 57 69 6e 64   | grep 'MS Wind
2820: 6f 77 73 20 28 47 55 49 29 27 20 3e 2f 64 65 76  ows (GUI)' >/dev
2830: 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a 09 09 09 09  /null; then.....
2840: 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69 6c  ..echo "Kit fail
2850: 65 64 20 73 61 6e 69 74 79 20 63 68 65 63 6b 20  ed sanity check 
2860: 66 6f 72 20 62 65 69 6e 67 20 61 20 47 55 49 20  for being a GUI 
2870: 61 70 70 6c 69 63 61 74 69 6f 6e 22 20 3e 26 32  application" >&2
2880: 0a 09 09 09 09 09 09 69 73 73 61 6e 65 3d 30 0a  .......issane=0.
2890: 09 09 09 09 09 66 69 0a 09 09 09 09 09 3b 3b 0a  .....fi......;;.
28a0: 09 09 09 65 73 61 63 0a 0a 09 09 09 23 23 20 56  ...esac.....## V
28b0: 65 72 69 66 79 20 74 68 65 20 62 75 69 6c 64 20  erify the build 
28c0: 63 6f 6d 70 6c 65 74 65 64 20 77 69 74 68 6f 75  completed withou
28d0: 74 20 77 61 72 6e 69 6e 67 73 0a 09 09 09 69 66  t warnings....if
28e0: 20 5b 20 22 24 7b 62 75 69 6c 64 66 61 69 6c 65   [ "${buildfaile
28f0: 64 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68 65  d}" = "1" ]; the
2900: 6e 0a 09 09 09 09 65 63 68 6f 20 22 4b 69 74 20  n.....echo "Kit 
2910: 66 61 69 6c 65 64 20 73 61 6e 69 74 79 20 63 68  failed sanity ch
2920: 65 63 6b 20 66 6f 72 20 42 75 69 6c 64 69 6e 67  eck for Building
2930: 22 20 3e 26 32 0a 0a 09 09 09 09 69 73 73 61 6e  " >&2......issan
2940: 65 3d 30 0a 09 09 09 66 69 0a 0a 09 09 09 23 20  e=0....fi.....# 
2950: 4d 61 6b 65 20 6e 6f 74 65 20 6f 66 20 73 61 6e  Make note of san
2960: 69 74 79 20 66 61 69 6c 75 72 65 0a 09 09 09 69  ity failure....i
2970: 66 20 5b 20 22 24 7b 69 73 73 61 6e 65 7d 22 20  f [ "${issane}" 
2980: 21 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09  != "1" ]; then..
2990: 09 09 09 65 63 68 6f 20 22 4b 69 74 20 66 61 69  ...echo "Kit fai
29a0: 6c 65 64 20 73 61 6e 69 74 79 20 24 7b 76 65 72  led sanity ${ver
29b0: 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20 3e 26  sion}/${kit}" >&
29c0: 32 0a 0a 09 09 09 09 66 61 69 6c 65 64 3d 22 24  2......failed="$
29d0: 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73 69  {failed} ${versi
29e0: 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 73 61 6e 69 74  on}/${kit}-sanit
29f0: 79 22 0a 0a 09 09 09 09 6d 76 20 22 24 7b 63 72  y"......mv "${cr
2a00: 65 61 74 65 64 6b 69 74 7d 22 20 22 24 7b 66 61  eatedkit}" "${fa
2a10: 69 6c 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09  iloutputname}"..
2a20: 09 09 09 6d 76 20 22 24 7b 62 75 69 6c 64 6c 6f  ...mv "${buildlo
2a30: 67 7d 22 20 22 24 7b 66 61 69 6c 62 75 69 6c 64  g}" "${failbuild
2a40: 6c 6f 67 7d 22 0a 0a 09 09 09 09 72 6d 20 2d 66  log}"......rm -f
2a50: 20 74 63 6c 73 68 0a 0a 09 09 09 09 63 6f 6e 74   tclsh......cont
2a60: 69 6e 75 65 0a 09 09 09 66 69 0a 0a 09 09 09 23  inue....fi.....#
2a70: 20 52 65 6e 61 6d 65 20 63 72 65 61 74 65 64 20   Rename created 
2a80: 6b 69 74 20 74 6f 20 66 69 6e 61 6c 20 64 65 73  kit to final des
2a90: 74 69 6e 61 74 69 6f 6e 0a 09 09 09 6d 76 20 22  tination....mv "
2aa0: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 20 22  ${createdkit}" "
2ab0: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 0a 09  ${outputname}"..
2ac0: 09 09 69 66 20 5b 20 2d 66 20 22 74 63 6c 73 68  ..if [ -f "tclsh
2ad0: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 6d 76  " ]; then.....mv
2ae0: 20 22 74 63 6c 73 68 22 20 22 24 7b 6f 75 74 70   "tclsh" "${outp
2af0: 75 74 6e 61 6d 65 7d 2d 74 63 6c 73 68 22 0a 09  utname}-tclsh"..
2b00: 09 09 66 69 0a 0a 09 09 09 23 20 46 6f 72 20 4b  ..fi.....# For K
2b10: 69 74 44 4c 4c 2c 20 6d 61 6b 65 20 61 20 6e 6f  itDLL, make a no
2b20: 74 65 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e  te of the origin
2b30: 61 6c 20 6e 61 6d 65 0a 09 09 09 69 66 20 5b 20  al name....if [ 
2b40: 22 24 7b 6b 69 74 64 6c 6c 7d 22 20 3d 20 22 31  "${kitdll}" = "1
2b50: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09 65 63  " ]; then.....ec
2b60: 68 6f 20 22 24 7b 63 72 65 61 74 65 64 6b 69 74  ho "${createdkit
2b70: 7d 22 20 3e 20 22 24 7b 6f 75 74 70 75 74 6e 61  }" > "${outputna
2b80: 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 0a 09 09  me}-origname"...
2b90: 09 66 69 0a 09 09 66 69 0a 0a 09 09 23 20 54 65  .fi...fi....# Te
2ba0: 73 74 20 7a 69 70 20 73 74 61 74 75 73 0a 09 09  st zip status...
2bb0: 69 66 20 75 6e 7a 69 70 20 2d 6c 20 22 24 7b 6f  if unzip -l "${o
2bc0: 75 74 70 75 74 6e 61 6d 65 7d 22 20 32 3e 26 31  utputname}" 2>&1
2bd0: 20 7c 20 67 72 65 70 20 27 62 6f 6f 74 5c 2e 74   | grep 'boot\.t
2be0: 63 6c 27 20 3e 2f 64 65 76 2f 6e 75 6c 6c 3b 20  cl' >/dev/null; 
2bf0: 74 68 65 6e 0a 09 09 09 63 61 6e 75 6e 7a 69 70  then....canunzip
2c00: 3d 22 31 22 0a 09 09 65 6c 73 65 0a 09 09 09 63  ="1"...else....c
2c10: 61 6e 75 6e 7a 69 70 3d 22 30 22 0a 09 09 66 69  anunzip="0"...fi
2c20: 0a 0a 09 09 69 66 20 5b 20 22 24 7b 69 73 7a 69  ....if [ "${iszi
2c30: 70 7d 22 20 21 3d 20 22 24 7b 63 61 6e 75 6e 7a  p}" != "${canunz
2c40: 69 70 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09  ip}" ]; then....
2c50: 65 63 68 6f 20 22 46 61 69 6c 65 64 20 74 6f 20  echo "Failed to 
2c60: 75 6e 7a 69 70 20 7a 69 70 6b 69 74 20 6f 72 20  unzip zipkit or 
2c70: 77 61 73 20 61 62 6c 65 20 74 6f 20 75 6e 7a 69  was able to unzi
2c80: 70 20 6e 6f 6e 2d 7a 69 70 6b 69 74 20 24 7b 76  p non-zipkit ${v
2c90: 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 22 20  ersion}/${kit}" 
2ca0: 3e 26 32 0a 0a 09 09 09 66 61 69 6c 65 64 3d 22  >&2.....failed="
2cb0: 24 7b 66 61 69 6c 65 64 7d 20 24 7b 76 65 72 73  ${failed} ${vers
2cc0: 69 6f 6e 7d 2f 24 7b 6b 69 74 7d 2d 7a 69 70 22  ion}/${kit}-zip"
2cd0: 0a 0a 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09  .....continue...
2ce0: 66 69 0a 0a 09 09 23 20 44 6f 20 6e 6f 74 20 63  fi....# Do not c
2cf0: 6f 6e 74 69 6e 75 65 20 70 61 73 74 20 68 65 72  ontinue past her
2d00: 65 20 66 6f 72 20 75 6e 2d 72 75 6e 6e 61 62 6c  e for un-runnabl
2d10: 65 20 6b 69 74 73 0a 09 09 69 66 20 5b 20 22 24  e kits...if [ "$
2d20: 7b 72 75 6e 6e 61 62 6c 65 7d 22 20 21 3d 20 22  {runnable}" != "
2d30: 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 63 6f  1" ]; then....co
2d40: 6e 74 69 6e 75 65 0a 09 09 66 69 0a 0a 09 09 23  ntinue...fi....#
2d50: 20 49 66 20 74 68 65 20 6e 61 6d 65 20 6f 66 20   If the name of 
2d60: 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 62 75 69  the original bui
2d70: 6c 64 20 6d 61 74 74 65 72 73 2c 20 73 79 6d 6c  ld matters, syml
2d80: 69 6e 6b 20 69 74 20 75 70 0a 09 09 69 66 20 5b  ink it up...if [
2d90: 20 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d   -f "${outputnam
2da0: 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b 20  e}-origname" ]; 
2db0: 74 68 65 6e 0a 09 09 09 63 72 65 61 74 65 64 6b  then....createdk
2dc0: 69 74 3d 22 24 28 63 61 74 20 22 24 7b 6f 75 74  it="$(cat "${out
2dd0: 70 75 74 6e 61 6d 65 7d 2d 6f 72 69 67 6e 61 6d  putname}-orignam
2de0: 65 22 29 22 0a 0a 09 09 09 6c 6e 20 2d 73 20 22  e")".....ln -s "
2df0: 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22 20 22  ${outputname}" "
2e00: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09  ${createdkit}"..
2e10: 09 66 69 0a 0a 09 09 23 20 50 65 72 66 6f 72 6d  .fi....# Perform
2e20: 20 62 61 74 74 65 72 79 20 6f 66 20 74 65 73 74   battery of test
2e30: 73 0a 09 09 23 23 20 43 6c 65 61 6e 20 74 65 73  s...## Clean tes
2e40: 74 73 20 6c 6f 67 0a 09 09 72 6d 20 2d 66 20 22  ts log...rm -f "
2e50: 24 7b 74 65 73 74 72 65 73 75 6c 74 73 6c 6f 67  ${testresultslog
2e60: 7d 22 0a 09 09 66 6f 72 20 74 65 73 74 73 63 70  }"...for testscp
2e70: 20 69 6e 20 22 24 7b 54 45 53 54 44 49 52 7d 22   in "${TESTDIR}"
2e80: 2f 74 65 73 74 73 2f 2a 2e 74 63 6c 3b 20 64 6f  /tests/*.tcl; do
2e90: 0a 09 09 09 74 65 73 74 73 63 70 5f 74 61 67 3d  ....testscp_tag=
2ea0: 22 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b 74  "$(basename "${t
2eb0: 65 73 74 73 63 70 7d 22 20 2e 74 63 6c 29 22 0a  estscp}" .tcl)".
2ec0: 09 09 09 74 65 73 74 73 63 70 70 72 65 3d 22 24  ...testscppre="$
2ed0: 28 64 69 72 6e 61 6d 65 20 22 24 7b 74 65 73 74  (dirname "${test
2ee0: 73 63 70 7d 22 29 2f 24 7b 74 65 73 74 73 63 70  scp}")/${testscp
2ef0: 5f 74 61 67 7d 2e 73 68 22 0a 09 09 09 73 63 70  _tag}.sh"....scp
2f00: 6c 6f 67 66 69 6c 65 3d 22 24 7b 6f 75 74 70 75  logfile="${outpu
2f10: 74 6e 61 6d 65 7d 2d 24 7b 74 65 73 74 73 63 70  tname}-${testscp
2f20: 5f 74 61 67 7d 2e 6c 6f 67 22 0a 0a 09 09 09 23  _tag}.log".....#
2f30: 20 49 66 20 61 20 63 6f 6d 6d 61 6e 64 20 69 73   If a command is
2f40: 20 72 65 71 75 69 72 65 64 20 74 6f 20 73 74 61   required to sta
2f50: 72 74 20 74 68 65 20 6b 69 74 2c 20 70 72 65 70  rt the kit, prep
2f60: 61 72 65 20 74 6f 20 6b 69 6c 6c 20 69 74 0a 09  are to kill it..
2f70: 09 09 23 20 69 6e 20 63 61 73 65 20 6f 66 20 74  ..# in case of t
2f80: 69 6d 65 6f 75 74 2e 0a 09 09 09 23 23 20 54 65  imeout.....## Te
2f90: 6d 70 6f 72 61 72 69 6c 79 20 64 69 73 61 62 6c  mporarily disabl
2fa0: 65 64 20 73 69 6e 63 65 20 63 75 72 72 65 6e 74  ed since current
2fb0: 6c 79 20 69 74 20 69 73 20 63 61 75 73 69 6e 67  ly it is causing
2fc0: 0a 09 09 09 23 23 20 6d 6f 72 65 20 70 72 6f 62  ....## more prob
2fd0: 6c 65 6d 73 20 69 6e 20 74 68 65 20 66 6f 72 6d  lems in the form
2fe0: 20 6f 66 20 74 65 73 74 73 20 62 65 69 6e 67 20   of tests being 
2ff0: 6b 69 6c 6c 65 64 0a 09 09 09 23 23 20 70 72 65  killed....## pre
3000: 6d 61 74 75 72 65 6c 79 20 74 68 61 6e 20 77 65  maturely than we
3010: 20 61 72 65 20 68 61 76 69 6e 67 20 69 73 73 75   are having issu
3020: 65 73 20 77 69 74 68 20 74 65 73 74 73 0a 09 09  es with tests...
3030: 09 23 23 20 68 61 6e 67 69 6e 67 0a 09 09 09 6b  .## hanging....k
3040: 69 74 72 75 6e 6b 69 6c 6c 70 69 64 3d 22 22 0a  itrunkillpid="".
3050: 09 09 09 69 66 20 5b 20 22 31 22 20 3d 20 22 30  ...if [ "1" = "0
3060: 22 20 2d 61 20 2d 6e 20 22 24 7b 6b 69 74 72 75  " -a -n "${kitru
3070: 6e 63 6d 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09  ncmd}" ]; then..
3080: 09 09 09 28 0a 09 09 09 09 09 73 6c 65 65 70 20  ...(......sleep 
3090: 31 32 30 0a 09 09 09 09 09 6b 69 6c 6c 61 6c 6c  120......killall
30a0: 20 22 24 28 62 61 73 65 6e 61 6d 65 20 22 24 7b   "$(basename "${
30b0: 6f 75 74 70 75 74 6e 61 6d 65 7d 22 29 22 20 3e  outputname}")" >
30c0: 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76  /dev/null 2>/dev
30d0: 2f 6e 75 6c 6c 0a 09 09 09 09 29 20 3e 2f 64 65  /null.....) >/de
30e0: 76 2f 6e 75 6c 6c 20 32 3e 2f 64 65 76 2f 6e 75  v/null 2>/dev/nu
30f0: 6c 6c 20 26 0a 09 09 09 09 6b 69 74 72 75 6e 6b  ll &.....kitrunk
3100: 69 6c 6c 70 69 64 3d 22 24 21 22 0a 09 09 09 66  illpid="$!"....f
3110: 69 0a 0a 09 09 09 28 0a 09 09 09 09 69 66 20 5b  i.....(.....if [
3120: 20 2d 66 20 22 24 7b 74 65 73 74 73 63 70 70 72   -f "${testscppr
3130: 65 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 09  e}" ]; then.....
3140: 09 2e 20 22 24 7b 74 65 73 74 73 63 70 70 72 65  .. "${testscppre
3150: 7d 22 0a 09 09 09 09 66 69 0a 0a 09 09 09 09 69  }".....fi......i
3160: 66 20 5b 20 22 24 7b 6b 69 74 64 6c 6c 7d 22 20  f [ "${kitdll}" 
3170: 3d 20 22 31 22 20 5d 3b 20 74 68 65 6e 0a 09 09  = "1" ]; then...
3180: 09 09 09 24 7b 6b 69 74 72 75 6e 63 6d 64 7d 20  ...${kitruncmd} 
3190: 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 2d 74  "${outputname}-t
31a0: 63 6c 73 68 22 20 22 24 7b 74 65 73 74 73 63 70  clsh" "${testscp
31b0: 7d 22 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65  }" "${outputname
31c0: 7d 22 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76  }" "${kit}" "${v
31d0: 65 72 73 69 6f 6e 7d 22 0a 09 09 09 09 65 6c 73  ersion}".....els
31e0: 65 0a 09 09 09 09 09 24 7b 6b 69 74 72 75 6e 63  e......${kitrunc
31f0: 6d 64 7d 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d  md} "${outputnam
3200: 65 7d 22 20 22 24 7b 74 65 73 74 73 63 70 7d 22  e}" "${testscp}"
3210: 20 22 24 7b 6f 75 74 70 75 74 6e 61 6d 65 7d 22   "${outputname}"
3220: 20 22 24 7b 6b 69 74 7d 22 20 22 24 7b 76 65 72   "${kit}" "${ver
3230: 73 69 6f 6e 7d 22 0a 09 09 09 09 66 69 0a 09 09  sion}".....fi...
3240: 09 29 20 3e 20 22 24 7b 73 63 70 6c 6f 67 66 69  .) > "${scplogfi
3250: 6c 65 7d 22 20 32 3e 26 31 0a 0a 09 09 09 69 66  le}" 2>&1.....if
3260: 20 5b 20 22 24 3f 22 20 21 3d 20 22 30 22 20 5d   [ "$?" != "0" ]
3270: 3b 20 74 68 65 6e 0a 09 09 09 09 65 63 68 6f 20  ; then.....echo 
3280: 22 53 63 72 69 70 74 20 66 61 69 6c 65 64 3a 20  "Script failed: 
3290: 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d 20 6f  ${testscp_tag} o
32a0: 6e 20 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b  n ${version}/${k
32b0: 69 74 7d 22 20 3e 26 32 0a 0a 09 09 09 09 66 61  it}" >&2......fa
32c0: 69 6c 65 64 3d 22 24 7b 66 61 69 6c 65 64 7d 20  iled="${failed} 
32d0: 24 7b 76 65 72 73 69 6f 6e 7d 2f 24 7b 6b 69 74  ${version}/${kit
32e0: 7d 2d 74 65 73 74 2d 24 7b 74 65 73 74 73 63 70  }-test-${testscp
32f0: 5f 74 61 67 7d 22 0a 0a 09 09 09 09 65 63 68 6f  _tag}"......echo
3300: 20 22 24 7b 74 65 73 74 73 63 70 5f 74 61 67 7d   "${testscp_tag}
3310: 3a 20 46 41 49 4c 22 20 3e 3e 20 20 22 24 7b 74  : FAIL" >>  "${t
3320: 65 73 74 72 65 73 75 6c 74 73 6c 6f 67 7d 22 0a  estresultslog}".
3330: 0a 09 09 09 09 63 6f 6e 74 69 6e 75 65 0a 09 09  .....continue...
3340: 09 66 69 0a 0a 09 09 09 23 20 4b 69 6c 6c 20 74  .fi.....# Kill t
3350: 68 65 20 77 61 74 63 68 64 6f 67 20 66 6f 72 20  he watchdog for 
3360: 74 68 69 73 20 69 74 65 72 61 74 69 6f 6e 0a 09  this iteration..
3370: 09 09 69 66 20 5b 20 2d 6e 20 22 24 7b 6b 69 74  ..if [ -n "${kit
3380: 72 75 6e 6b 69 6c 6c 70 69 64 7d 22 20 5d 3b 20  runkillpid}" ]; 
3390: 74 68 65 6e 0a 09 09 09 09 6b 69 6c 6c 20 2d 39  then.....kill -9
33a0: 20 22 24 7b 6b 69 74 72 75 6e 6b 69 6c 6c 70 69   "${kitrunkillpi
33b0: 64 7d 22 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 32  d}" >/dev/null 2
33c0: 3e 2f 64 65 76 2f 6e 75 6c 6c 0a 09 09 09 66 69  >/dev/null....fi
33d0: 0a 0a 09 09 09 65 63 68 6f 20 22 24 7b 74 65 73  .....echo "${tes
33e0: 74 73 63 70 5f 74 61 67 7d 3a 20 50 41 53 53 22  tscp_tag}: PASS"
33f0: 20 3e 3e 20 20 22 24 7b 74 65 73 74 72 65 73 75   >>  "${testresu
3400: 6c 74 73 6c 6f 67 7d 22 0a 0a 09 09 09 72 6d 20  ltslog}".....rm 
3410: 2d 66 20 22 24 7b 73 63 70 6c 6f 67 66 69 6c 65  -f "${scplogfile
3420: 7d 22 0a 09 09 64 6f 6e 65 0a 0a 09 09 69 66 20  }"...done....if 
3430: 5b 20 2d 66 20 22 24 7b 6f 75 74 70 75 74 6e 61  [ -f "${outputna
3440: 6d 65 7d 2d 6f 72 69 67 6e 61 6d 65 22 20 5d 3b  me}-origname" ];
3450: 20 74 68 65 6e 0a 09 09 09 72 6d 20 2d 66 20 22   then....rm -f "
3460: 24 7b 63 72 65 61 74 65 64 6b 69 74 7d 22 0a 09  ${createdkit}"..
3470: 09 66 69 0a 09 64 6f 6e 65 0a 64 6f 6e 65 0a 0a  .fi..done.done..
3480: 69 66 20 5b 20 2d 6e 20 22 24 7b 66 61 69 6c 65  if [ -n "${faile
3490: 64 7d 22 20 5d 3b 20 74 68 65 6e 0a 09 65 63 68  d}" ]; then..ech
34a0: 6f 20 22 46 61 69 6c 65 64 3a 20 24 7b 66 61 69  o "Failed: ${fai
34b0: 6c 65 64 7d 22 0a 66 69 0a 0a 23 20 43 6c 65 61  led}".fi..# Clea
34c0: 6e 75 70 0a 23 23 20 54 65 72 6d 69 6e 61 74 65  nup.## Terminate
34d0: 20 58 76 66 62 0a 6b 69 6c 6c 20 2d 39 20 22 24   Xvfb.kill -9 "$
34e0: 7b 58 56 46 42 5f 50 49 44 7d 22 0a 0a 23 23 20  {XVFB_PID}"..## 
34f0: 52 65 6d 6f 76 65 20 77 69 6e 65 0a 72 6d 20 2d  Remove wine.rm -
3500: 72 66 20 22 24 7b 57 49 4e 45 50 52 45 46 49 58  rf "${WINEPREFIX
3510: 7d 22 0a 0a 2e 2f 6b 69 74 63 72 65 61 74 6f 72  }".../kitcreator
3520: 20 63 6c 65 61 6e 0a 72 6d 20 2d 66 20 74 63 6c   clean.rm -f tcl
3530: 73 68 0a                                         sh.