Megatest

Check-in [3f3881b2eb]
Login
Overview
Comment:Lots more test stuff
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: 3f3881b2ebbda8f9094f8d664214e4b66b3c5bc5
User & Date: matt on 2015-07-27 00:07:23
Other Links: branch diff | manifest | tags
Context
2015-07-28
13:44
Kill runner processes when clean is called and the testpatt is an exact match check-in: 9808763d4b user: mrwellan tags: v1.60
2015-07-27
00:07
Lots more test stuff check-in: 3f3881b2eb user: matt tags: v1.60
2015-07-26
23:08
Added dep testcase check-in: 6f47b91ac8 user: matt tags: v1.60
Changes

Modified tests/dep-tests/common.testconfig from [c4b44c24a4] to [382c89b27d].

1
2
3



4




5







6
7
8
9
10
11
12
13
14
15
16




[ezsteps]
delay    sleep $SPEED;echo "Delayed $SPEED seconds"




[requirements]




#{getenv WAITON_#{getenv MT_TEST_NAME}}








[test_meta]
author matt
owner  matt
description This is a common testconfig shared by all the tests

[logpro]
delay ;; Delay step logpro
  (expect:required in "LogFileBody" > 0 "Delayed message" #/Delayed \d+ seconds/)

reviewed 09/10/2011, by Matt







>
>
>
|
>
>
>
>
|
>
>
>
>
>
>
>











>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[ezsteps]
delay    sleep $SPEED;echo "Delayed $SPEED seconds"

# lookup table for waitons
#
[std]
genlib    setup
test1     genlib
aggregate test1
test2     aggregate
results   test2

# simple removes the challenging "aggregate" dependency between test1 and test2.
# and the itempatt irregularity from genlib -> test1
#
[simple]
test1     setup
test2     test1
results   test2

[test_meta]
author matt
owner  matt
description This is a common testconfig shared by all the tests

[logpro]
delay ;; Delay step logpro
  (expect:required in "LogFileBody" > 0 "Delayed message" #/Delayed \d+ seconds/)

reviewed 09/10/2011, by Matt

[requirements]
mode itemwait

Modified tests/dep-tests/tests/aggregate/testconfig from [c2dea9e96c] to [fa95f0ff55].

1
2


[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]





>
>
1
2
3
4
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[requirements]
waiton #{get #{getenv DEPS} aggregate}

Modified tests/dep-tests/tests/genlib/testconfig from [e2cba0fe56] to [b79b5cc679].

1
2
3
4
5



[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[itemstable]
VIEWTYPE layout schematic









>
>
>
1
2
3
4
5
6
7
8
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[itemstable]
VIEWTYPE layout schematic

[requirements]
waiton #{get #{getenv DEPS} genlib}

Modified tests/dep-tests/tests/results/testconfig from [c2dea9e96c] to [33e68a628c].

1
2



[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]






>
>
>
1
2
3
4
5
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[requirements]
waiton #{get #{getenv DEPS} results}

Modified tests/dep-tests/tests/test1/testconfig from [a1ac7fb924] to [f7e45fbc74].

1
2
3




[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig]







>
>
>
>
1
2
3
4
5
6
7
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig]

[requirements]
waiton #{get #{getenv DEPS} test1}

Modified tests/dep-tests/tests/test2/testconfig from [a1ac7fb924] to [536ee9f06b].

1
2
3




[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig]







>
>
>
>
1
2
3
4
5
6
7
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig]

[requirements]
waiton #{get #{getenv DEPS} test2}

Added tests/dynamic-waiton-example/common.testconfig version [c4b44c24a4].

































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[ezsteps]
delay    sleep $SPEED;echo "Delayed $SPEED seconds"

[requirements]
#{getenv WAITON_#{getenv MT_TEST_NAME}}

[test_meta]
author matt
owner  matt
description This is a common testconfig shared by all the tests

[logpro]
delay ;; Delay step logpro
  (expect:required in "LogFileBody" > 0 "Delayed message" #/Delayed \d+ seconds/)

reviewed 09/10/2011, by Matt

Added tests/dynamic-waiton-example/common_itemstable.testconfig version [64419eaa4a].









>
>
>
>
1
2
3
4
[itemstable]
VIEW   layout layout layout schematic schematic schematic
CELL   ntran  ptran  diode  ntran     ptran     diode

Added tests/dynamic-waiton-example/megatest.config version [b96d033fe9].







































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[fields]
# this field changes the dep tree 
DEPS  TEXT

# this field changes the test run time; 0 .. N or random
SPEED TEXT

[dashboard]
pre-command  xterm -geometry 180x20 -e "
post-command |& tee results.log ;echo Press any key to continue;bash -c 'read -n 1 -s'" &
testsort -event_time

[misc]
home #{shell readlink -f $MT_RUN_AREA_HOME}
parent #{shell readlink -f $MT_RUN_AREA_HOME/..}

[setup]
linktree #{get misc parent}/links
max_concurrent_jobs 100000
# It is possible (but not recommended) to override the rsync command used
# to populate the test directories. For test development the following 
# example can be useful
#
testcopycmd cp --remove-destination -rsv TEST_SRC_PATH/. TEST_TARG_PATH/. >> TEST_TARG_PATH/mt_launch.log 2>> TEST_TARG_PATH/mt_launch.log

# or for hard links

# testcopycmd cp --remove-destination -rlv TEST_SRC_PATH/. TEST_TARG_PATH/.

# override the logview command
#
logviewer (%MTCMD%) 2> /dev/null > /dev/null

# override the html viewer launch command
#
# htmlviewercmd firefox -new-window 
htmlviewercmd arora

[env-override]
# MT_XTERM_CMD overrides the terminal command
# MT_XTERM_CMD xterm -bg lightgreen -fg black

## disks are:
## name host:/path/to/area
## -or-
## name /path/to/area
[disks]
disk0 #{get misc parent}/runs

#======================================================================
# Machine flavors
#
#   These specify lists of hosts or scripts to use or call for various
#   flavors of task.
#
#======================================================================

[flavors]

plain hosts: xena, phoebe
strong command: NBFAKE_HOST=zeus nbfake
arm hosts: cubian

# Uncomment these to emulate a job queue with a long time (look in bin/sleeprunner for the time)
[jobtools]
launcher nbfake
maxload 2.0

Added tests/dynamic-waiton-example/runconfigs.config version [81e449a935].























>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
[default]
WAITON_setup
WAITON_genlib    waiton setup
WAITON_test1     waiton genlib
WAITON_aggregate waiton test1
WAITON_test2     waiton aggregate

# [DEPS/SPEED]

[std/0]

Added tests/dynamic-waiton-example/tests/aggregate/testconfig version [c2dea9e96c].





>
>
1
2
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

Added tests/dynamic-waiton-example/tests/genlib/testconfig version [e2cba0fe56].











>
>
>
>
>
1
2
3
4
5
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[itemstable]
VIEWTYPE layout schematic

Added tests/dynamic-waiton-example/tests/results/testconfig version [c2dea9e96c].





>
>
1
2
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

Added tests/dynamic-waiton-example/tests/setup/testconfig version [c2dea9e96c].





>
>
1
2
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

Added tests/dynamic-waiton-example/tests/test1/testconfig version [a1ac7fb924].







>
>
>
1
2
3
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig]

Added tests/dynamic-waiton-example/tests/test2/testconfig version [a1ac7fb924].







>
>
>
1
2
3
[include #{getenv MT_RUN_AREA_HOME}/common.testconfig]

[include #{getenv MT_RUN_AREA_HOME}/common_itemstable.testconfig]

Added tests/release/tests/dependencies/simpleresults.logpro version [cdf9db5b94].





























































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com
;;  
;;   License GPL.

(define logbody "LogFileBody")

(define pass-specs '( ;; testname num-expected max-runtime
		     ("setup"		        1  20)
		     ("test1/layout/ptran"      1  20)
		     ("test1/schematic/ptran"	1  20)
		     ("test2/layout/ptran"      1  20)
		     ("test2/schematic/ptran"   1  20)
		     ))

(define fail-specs '( ;; testname num-expected max-runtime
		     ))
		     
(define warn-specs   '())

(define nost-specs   '(
		       ))

(define (check-one-test estate estatus testname count runtime)
   (let* ((rxe      (regexp (conc "^\\s+Test: " testname "(\\(.*|\\s+)\\s+State: " estate "\\s+Status: " estatus "\\s+Runtime:\\s+(\\d+)s")))
	  (msg1     (conc testname " expecting count of " count))
	  (msg2     (conc testname " expecting runtime less than " runtime)))
     (expect:required in logbody = count msg1 rxe)
     ;;(expect:value    in logbody count < msg2 rxe)
     ))

;; Special cases
;;
(expect:ignore   in logbody >= 0  "db_sync test might not have run"  #/Test: db_sync/)
(expect:ignore   in logbody >= 0  "all_toplevel may not yet be done" #/Test: all_toplevel/)
(expect:error    in logbody =  0  "tests left in RUNNING state"      #/State: RUNNING/)
(expect:required in logbody =  1  "priority_2 is KILLED"             #/Test: priority_2\s+State: KILLED\s+Status: KILLED/)
(expect:required in logbody =  1  "priority_5 is either PASS or SKIP" #/Test: priority_5\s+State: COMPLETED\s+Status: (SKIP|PASS)/)
(expect:required in logbody =  1  "priority_7 is either PASS or SKIP" #/Test: priority_7\s+State: COMPLETED\s+Status: (SKIP|PASS)/)
(expect:required in logbody =  1  "testxz has 1 NOT_STARTED test"    #/Test: testxz\s+State: NOT_STARTED/)
(expect:required in logbody =  1  "no items"                         #/Test: no_items\s+State: NOT_STARTED\s+Status: ZERO_ITEMS/)
(expect:warning  in logbody =  1  "dynamic waiton"                   #/Test: dynamic_waiton/)
(expect:required in logbody = 29  "blocktestxz has 29 tests"         #/Test: blocktestxz/)

;; General cases
;;
(for-each 
 (lambda (testdat)
   (apply check-one-test "COMPLETED" "PASS" testdat))
 pass-specs)

(for-each 
 (lambda (testdat)
   (apply check-one-test "COMPLETED" "FAIL" testdat))
 fail-specs)

(for-each 
 (lambda (testdat)
   (apply check-one-test "COMPLETED" "WARN" testdat))
 warn-specs)

(for-each 
 (lambda (testdat)
   (apply check-one-test "NOT_STARTED" "PREQ_DISCARDED" testdat))
 nost-specs)

;; Catch all.
;;
(expect:error    in logbody = 0   "Tests not accounted for"     #/Test: /)


;; ;; define your hooks
;; (hook:first-error   "echo \"Error hook activated: #{escaped errmsg}\"")
;; (hook:first-warning "echo \"Got warning: #{escaped warnmsg}\"")
;; (hook:value "echo \"Value hook activated: expected=#{expected}, measured=#{measured}, tolerance=#{tolerance}, message=#{message}\"")
;; 
;; ;; first ensure your run at least started
;; ;;
;; (trigger "Init"     #/This is a header/)
;; (trigger "InitEnd"  #/^\s*$/)
;; (section "Init" "Init" "InitEnd")
;; 
;; (trigger "Body"     #/^.*$/) ;; anything starts the body
;; ;; (trigger "EndBody"  #/This had better never match/)
;; 
;; (section "Body"     "Body" "EndBody")
;; 
;; (trigger "Blah2"    #/^begin Blah2/)
;; (trigger "Blah2End" #/^end Blah2/)
;; (section "Blah2"    "Blah2" "Blah2End")
;; 
;; (expect:required in "Init"  = 1 "Header"      #/This is a header/)
;; (expect:required in "LogFileBody" > 0 "Something required but not found" #/This is required but not found/)
;; (expect:value    in "LogFileBody" 1.9 0.1 "Output voltage" #/Measured voltage output:\s*([\d\.\+\-e]+)v/)
;; (expect:value    in "LogFileBody" 0.5 0.1 "Output current" #/Measured output current:\s*([\d\.\+\-e]+)mA/)
;; (expect:value    in "LogFileBody" 110e9 2e9 "A big number (first)" #/Freq:\s*([\d\.\+\-e]+)\s+Hz/)
;; (expect:value    in "LogFileBody" 110e9 1e9 "A big number (second), hook not called" #/Freq:\s*([\d\.\+\-e]+)Hz/)
;; (expect:value    in "LogFileBody" 110e9 1e9 "A big number (never activated)" #/Freq:\s*([\d\.\+\-e]+)zH/)
;; 
;; ;; Using match number
;; (expect:value    in "LogFileBody" 1.9 0.1 "Time Voltage" #/out: (\d+)\s+(\d+)/ match: 2)
;; 
;; ;; Comparison instead of tolerance
;; (expect:value    in "LogFileBody" 1.9 >   "Time voltage" #/out: (\d+)\s+(\d+)/ match: 2)
;; 
;; (expect:ignore   in "Blah2" < 99 "FALSE ERROR" #/ERROR/)
;; (expect:ignore   in "Body"  < 99 "Ignore the word error in comments" #/^\/\/.*error/)
;; (expect:warning  in "Body"  = 0 "Any warning" #/WARNING/)
;; (expect:error    in "Body"  = 0 "ERROR BLAH"  (list #/ERROR/ #/error/)) ;; but disallow any other errors
;; 
;; ;(expect in "Init"  < 1 "Junk"        #/This is bogus/)

Added tests/release/tests/dependencies/testconfig version [0654f78c14].

























>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
# test2 from the tests/Makefile

[var]
tname itemwait

[ezsteps]

# Set things up
cleansimple   $MTRUNNER $MTTESTDIR/dep-tests $MTPATH megatest -remove-runs -testpatt %             -target simple/0 -runname #{get var tname}
simple        $MTRUNNER $MTTESTDIR/dep-tests $MTPATH megatest -run         -testpatt test2/%/ptran -target simple/0 -runname #{get var tname}
simpleresults $MTRUNNER $MTTESTDIR/dep-tests $MTPATH megatest -list-runs #{get var name}           -target simple/0