Artifact
d7171cfe123796c2e9bc2513534f73cc7afe0a8f:
0000: 23 21 2f 62 69 6e 2f 62 61 73 68 0a 0a 23 20 54 #!/bin/bash..# T
0010: 68 69 73 20 66 69 6c 65 20 69 73 20 70 61 72 74 his file is part
0020: 20 6f 66 20 4d 65 67 61 74 65 73 74 2e 0a 23 20 of Megatest..#
0030: 0a 23 20 20 20 20 20 4d 65 67 61 74 65 73 74 20 .# Megatest
0040: 69 73 20 66 72 65 65 20 73 6f 66 74 77 61 72 65 is free software
0050: 3a 20 79 6f 75 20 63 61 6e 20 72 65 64 69 73 74 : you can redist
0060: 72 69 62 75 74 65 20 69 74 20 61 6e 64 2f 6f 72 ribute it and/or
0070: 20 6d 6f 64 69 66 79 0a 23 20 20 20 20 20 69 74 modify.# it
0080: 20 75 6e 64 65 72 20 74 68 65 20 74 65 72 6d 73 under the terms
0090: 20 6f 66 20 74 68 65 20 47 4e 55 20 47 65 6e 65 of the GNU Gene
00a0: 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e ral Public Licen
00b0: 73 65 20 61 73 20 70 75 62 6c 69 73 68 65 64 20 se as published
00c0: 62 79 0a 23 20 20 20 20 20 74 68 65 20 46 72 65 by.# the Fre
00d0: 65 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 e Software Found
00e0: 61 74 69 6f 6e 2c 20 65 69 74 68 65 72 20 76 65 ation, either ve
00f0: 72 73 69 6f 6e 20 33 20 6f 66 20 74 68 65 20 4c rsion 3 of the L
0100: 69 63 65 6e 73 65 2c 20 6f 72 0a 23 20 20 20 20 icense, or.#
0110: 20 28 61 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e (at your option
0120: 29 20 61 6e 79 20 6c 61 74 65 72 20 76 65 72 73 ) any later vers
0130: 69 6f 6e 2e 0a 23 20 0a 23 20 20 20 20 20 4d 65 ion..# .# Me
0140: 67 61 74 65 73 74 20 69 73 20 64 69 73 74 72 69 gatest is distri
0150: 62 75 74 65 64 20 69 6e 20 74 68 65 20 68 6f 70 buted in the hop
0160: 65 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20 62 e that it will b
0170: 65 20 75 73 65 66 75 6c 2c 0a 23 20 20 20 20 20 e useful,.#
0180: 62 75 74 20 57 49 54 48 4f 55 54 20 41 4e 59 20 but WITHOUT ANY
0190: 57 41 52 52 41 4e 54 59 3b 20 77 69 74 68 6f 75 WARRANTY; withou
01a0: 74 20 65 76 65 6e 20 74 68 65 20 69 6d 70 6c 69 t even the impli
01b0: 65 64 20 77 61 72 72 61 6e 74 79 20 6f 66 0a 23 ed warranty of.#
01c0: 20 20 20 20 20 4d 45 52 43 48 41 4e 54 41 42 49 MERCHANTABI
01d0: 4c 49 54 59 20 6f 72 20 46 49 54 4e 45 53 53 20 LITY or FITNESS
01e0: 46 4f 52 20 41 20 50 41 52 54 49 43 55 4c 41 52 FOR A PARTICULAR
01f0: 20 50 55 52 50 4f 53 45 2e 20 20 53 65 65 20 74 PURPOSE. See t
0200: 68 65 0a 23 20 20 20 20 20 47 4e 55 20 47 65 6e he.# GNU Gen
0210: 65 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 eral Public Lice
0220: 6e 73 65 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 nse for more det
0230: 61 69 6c 73 2e 0a 23 20 0a 23 20 20 20 20 20 59 ails..# .# Y
0240: 6f 75 20 73 68 6f 75 6c 64 20 68 61 76 65 20 72 ou should have r
0250: 65 63 65 69 76 65 64 20 61 20 63 6f 70 79 20 6f eceived a copy o
0260: 66 20 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 f the GNU Genera
0270: 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 l Public License
0280: 0a 23 20 20 20 20 20 61 6c 6f 6e 67 20 77 69 74 .# along wit
0290: 68 20 4d 65 67 61 74 65 73 74 2e 20 20 49 66 20 h Megatest. If
02a0: 6e 6f 74 2c 20 73 65 65 20 3c 68 74 74 70 3a 2f not, see <http:/
02b0: 2f 77 77 77 2e 67 6e 75 2e 6f 72 67 2f 6c 69 63 /www.gnu.org/lic
02c0: 65 6e 73 65 73 2f 3e 2e 0a 0a 72 75 6e 6e 61 6d enses/>...runnam
02d0: 65 3d 24 31 0a 0a 70 61 73 73 3d 6e 6f 0a 61 6c e=$1..pass=no.al
02e0: 6c 64 6f 6e 65 3d 6e 6f 0a 77 68 69 6c 65 20 5b ldone=no.while [
02f0: 5b 20 24 61 6c 6c 64 6f 6e 65 20 3d 3d 20 6e 6f [ $alldone == no
0300: 20 5d 5d 3b 64 6f 0a 20 20 20 20 73 6c 65 65 70 ]];do. sleep
0310: 20 35 0a 20 20 20 20 24 4d 54 52 55 4e 4e 45 52 5. $MTRUNNER
0320: 20 24 4d 54 54 45 53 54 44 49 52 2f 66 64 6b 74 $MTTESTDIR/fdkt
0330: 65 73 74 71 61 2f 74 65 73 74 71 61 20 24 4d 54 estqa/testqa $MT
0340: 50 41 54 48 20 6d 65 67 61 74 65 73 74 20 2d 6c PATH megatest -l
0350: 69 73 74 2d 72 75 6e 73 20 24 72 75 6e 6e 61 6d ist-runs $runnam
0360: 65 20 3e 20 6c 69 73 74 2d 72 75 6e 73 2e 6c 6f e > list-runs.lo
0370: 67 0a 20 20 20 20 62 69 67 72 75 6e 5f 72 75 6e g. bigrun_run
0380: 6e 69 6e 67 3d 24 28 63 61 74 20 6c 69 73 74 2d ning=$(cat list-
0390: 72 75 6e 73 2e 6c 6f 67 20 7c 20 65 67 72 65 70 runs.log | egrep
03a0: 20 27 62 69 67 72 75 6e 5c 28 2e 2a 52 55 4e 4e 'bigrun\(.*RUNN
03b0: 49 4e 47 27 7c 77 63 20 2d 6c 29 0a 20 20 20 20 ING'|wc -l).
03c0: 62 69 67 72 75 6e 32 5f 70 61 73 73 3d 24 28 63 bigrun2_pass=$(c
03d0: 61 74 20 6c 69 73 74 2d 72 75 6e 73 2e 6c 6f 67 at list-runs.log
03e0: 20 20 20 7c 20 65 67 72 65 70 20 27 62 69 67 72 | egrep 'bigr
03f0: 75 6e 32 2e 2a 43 4f 4d 50 4c 45 54 45 44 2e 2a un2.*COMPLETED.*
0400: 50 41 53 53 27 7c 77 63 20 2d 6c 29 0a 20 20 20 PASS'|wc -l).
0410: 20 65 63 68 6f 20 22 62 69 67 72 75 6e 5f 72 75 echo "bigrun_ru
0420: 6e 6e 69 6e 67 3d 24 62 69 67 72 75 6e 5f 72 75 nning=$bigrun_ru
0430: 6e 6e 69 6e 67 2c 20 62 69 67 72 75 6e 32 5f 70 nning, bigrun2_p
0440: 61 73 73 3d 24 62 69 67 72 75 6e 32 5f 70 61 73 ass=$bigrun2_pas
0450: 73 22 0a 20 20 20 20 69 66 20 5b 5b 20 24 62 69 s". if [[ $bi
0460: 67 72 75 6e 5f 72 75 6e 6e 69 6e 67 20 2d 67 74 grun_running -gt
0470: 20 30 20 5d 5d 20 26 26 20 5b 5b 20 24 62 69 67 0 ]] && [[ $big
0480: 72 75 6e 32 5f 70 61 73 73 20 2d 67 74 20 30 20 run2_pass -gt 0
0490: 5d 5d 3b 74 68 65 6e 0a 09 70 61 73 73 3d 79 65 ]];then..pass=ye
04a0: 73 0a 09 61 6c 6c 64 6f 6e 65 3d 79 65 73 0a 20 s..alldone=yes.
04b0: 20 20 20 66 69 0a 20 20 20 20 69 66 20 5b 5b 20 fi. if [[
04c0: 24 62 69 67 72 75 6e 5f 72 75 6e 6e 69 6e 67 20 $bigrun_running
04d0: 2d 65 71 20 30 20 5d 5d 3b 74 68 65 6e 0a 09 65 -eq 0 ]];then..e
04e0: 63 68 6f 20 22 62 69 67 72 75 6e 20 61 6c 6c 20 cho "bigrun all
04f0: 64 6f 6e 65 20 61 6e 64 20 6e 6f 20 62 69 67 72 done and no bigr
0500: 75 6e 32 20 66 6f 75 6e 64 20 77 69 74 68 20 50 un2 found with P
0510: 41 53 53 2e 22 0a 09 61 6c 6c 64 6f 6e 65 3d 79 ASS."..alldone=y
0520: 65 73 0a 20 20 20 20 66 69 0a 64 6f 6e 65 0a 0a es. fi.done..
0530: 69 66 20 5b 5b 20 24 70 61 73 73 20 3d 3d 20 79 if [[ $pass == y
0540: 65 73 20 5d 5d 3b 74 68 65 6e 0a 20 20 20 20 65 es ]];then. e
0550: 63 68 6f 20 50 41 53 53 0a 20 20 20 20 65 78 69 cho PASS. exi
0560: 74 20 30 0a 65 6c 73 65 0a 20 20 20 20 65 63 68 t 0.else. ech
0570: 6f 20 46 41 49 4c 0a 20 20 20 20 65 78 69 74 20 o FAIL. exit
0580: 31 0a 66 69 0a 1.fi.