Megatest

Hex Artifact Content
Login

Artifact f575e06d2a25eb060213381cad7cd7fef6f096c3:


0000: 23 21 2f 62 69 6e 2f 62 61 73 68 0a 0a 23 20 6d  #!/bin/bash..# m
0010: 65 67 61 74 65 73 74 20 2d 73 74 65 70 20 77 61  egatest -step wa
0020: 73 74 69 6e 67 5f 74 69 6d 65 20 3a 73 74 61 74  sting_time :stat
0030: 65 20 73 74 61 72 74 20 3a 73 74 61 74 75 73 20  e start :status 
0040: 6e 2f 61 20 2d 6d 20 22 54 68 69 73 20 69 73 20  n/a -m "This is 
0050: 61 20 74 65 73 74 20 73 74 65 70 20 63 6f 6d 6d  a test step comm
0060: 65 6e 74 22 0a 23 20 73 6c 65 65 70 20 32 30 0a  ent".# sleep 20.
0070: 23 20 6d 65 67 61 74 65 73 74 20 2d 73 74 65 70  # megatest -step
0080: 20 77 61 73 74 69 6e 67 5f 74 69 6d 65 20 3a 73   wasting_time :s
0090: 74 61 74 65 20 65 6e 64 20 3a 73 74 61 74 75 73  tate end :status
00a0: 20 24 3f 0a 0a 74 6f 75 63 68 20 2e 2e 2f 49 5f   $?..touch ../I_
00b0: 77 61 73 5f 68 65 72 65 0a 0a 24 4d 54 5f 4d 45  was_here..$MT_ME
00c0: 47 41 54 45 53 54 20 2d 72 75 6e 73 74 65 70 20  GATEST -runstep 
00d0: 77 61 73 74 69 6e 67 5f 74 69 6d 65 20 2d 6c 6f  wasting_time -lo
00e0: 67 70 72 6f 20 77 61 73 74 69 6e 67 5f 74 69 6d  gpro wasting_tim
00f0: 65 2e 6c 6f 67 70 72 6f 20 22 73 6c 65 65 70 20  e.logpro "sleep 
0100: 38 3b 65 63 68 6f 20 61 6c 6c 20 64 6f 6e 65 20  8;echo all done 
0110: 65 68 3f 22 20 2d 6d 20 22 54 68 69 73 20 69 73  eh?" -m "This is
0120: 20 61 20 74 65 73 74 20 73 74 65 70 20 63 6f 6d   a test step com
0130: 6d 65 6e 74 22 0a 0a 24 4d 54 5f 4d 45 47 41 54  ment"..$MT_MEGAT
0140: 45 53 54 20 2d 74 65 73 74 2d 73 74 61 74 75 73  EST -test-status
0150: 20 3a 73 74 61 74 65 20 43 4f 4d 50 4c 45 54 45   :state COMPLETE
0160: 44 20 3a 73 74 61 74 75 73 20 24 3f 20 2d 6d 20  D :status $? -m 
0170: 22 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20  "This is a test 
0180: 6c 65 76 65 6c 20 63 6f 6d 6d 65 6e 74 22 20 2d  level comment" -
0190: 73 65 74 2d 74 6f 70 6c 6f 67 20 74 68 65 5f 74  set-toplog the_t
01a0: 6f 70 5f 6c 6f 67 2e 68 74 6d 6c 0a              op_log.html.