Megatest

Check-in [38b7f592d7]
Login
Overview
Comment:added -mode and -tagexpr options
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.63-tag-mode
Files: files | file ages | folders
SHA1: 38b7f592d7f821f97b29251ae35d06a0ad49eae2
User & Date: bjbarcla on 2016-12-20 16:23:53
Other Links: branch diff | manifest | tags
Context
2016-12-21
15:26
Fixes to keep servers running to sync back changes to megatest.db from /tmp/ ... db files check-in: 471ca93f41 user: mrwellan tags: v1.63
12:49
merged in -mode and -tagexpr support check-in: 848bdf7c97 user: bjbarcla tags: v1.63
2016-12-20
16:55
Automated merge of v1.63-tag-mode/38b7f592d7/integ into integ-home Closed-Leaf check-in: 6102726302 user: matt tags: integ-home-defunct
16:23
added -mode and -tagexpr options Closed-Leaf check-in: 38b7f592d7 user: bjbarcla tags: v1.63-tag-mode
2016-12-19
22:32
Added function to get tests that match a tag list/pattern: tag1,tag2,tpatt% etc. (runs::get-tests-matching-tags tagpatts) check-in: 777bae8a54 user: mrwellan tags: v1.63
Changes

Modified common.scm from [5eabc5f129] to [642b77f666].

777
778
779
780
781
782
783


784

785
786
787

788

789
790
791

792
793
794
795
796
797
798
777
778
779
780
781
782
783
784
785

786
787
788
789
790

791
792
793

794
795
796
797
798
799
800
801







+
+
-
+



+
-
+


-
+







(define (common:args-get-state)
  (or (args:get-arg "-state")(args:get-arg ":state")))

(define (common:args-get-status)
  (or (args:get-arg "-status")(args:get-arg ":status")))

(define (common:args-get-testpatt rconf)
  (let* ((tags-testpatt (if (args:get-arg "-tagexpr") (string-join (runs:get-tests-matching-tags (args:get-arg "-tagexpr")) ",") #f))
         (testpatt-key  (if (args:get-arg "-mode") (args:get-arg "-mode") "TESTPATT"))
  (let* ((rtestpatt     (if rconf (runconfigs-get rconf "TESTPATT") #f))
         (rtestpatt     (if rconf (runconfigs-get rconf testpatt-key) #f))
	 (args-testpatt (or (args:get-arg "-testpatt")
			    (args:get-arg "-runtests")
			    "%"))
	 (testpatt    (or tags-testpatt
	 (testpatt    (or (and (equal? args-testpatt "%")
                          (and (equal? args-testpatt "%")
			       rtestpatt)
			  args-testpatt)))
    (if rtestpatt (debug:print-info 0 *default-log-port* "TESTPATT from runconfigs: " rtestpatt))
    (if rtestpatt (debug:print-info 0 *default-log-port* "testpatt defined in "testpatt-key" from runconfigs: " rtestpatt))
    testpatt))

(define (common:get-linktree)
  (or (getenv "MT_LINKTREE")
      (if *configdat*
	  (configf:lookup *configdat* "setup" "linktree"))))

Modified megatest.scm from [e236b0be17] to [b3a1c940ab].

91
92
93
94
95
96
97


98
99
100
101
102
103
104
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106







+
+







Selectors (e.g. use for -runtests, -remove-runs, -set-state-status, -list-runs etc.)
  -target key1/key2/...   : run for key1, key2, etc.
  -reqtarg key1/key2/...  : run for key1, key2, etc. but key1/key2 must be in runconfig
  -testpatt patt1/patt2,patt3/...  : % is wildcard
  -runname                : required, name for this particular test run
  -state                  : Applies to runs, tests or steps depending on context
  -status                 : Applies to runs, tests or steps depending on context
  -mode key               : load testpatt from <key> in runconfigs instead of default TESTPATT
  -tagexpr tag1,tag2%,..  : select tests with tags matching expression

Test helpers (for use inside tests)
  -step stepname
  -test-status            : set the state and status of a test (use :state and :status)
  -setlog logfname        : set the path/filename to the final log relative to the test
                            directory. may be used with -test-status
  -set-toplog logfname    : set the overall log for a suite of sub-tests
207
208
209
210
211
212
213
214



215
216
217
218
219
220
221
209
210
211
212
213
214
215

216
217
218
219
220
221
222
223
224
225







-
+
+
+







			":runname"
			"-runname"
			":state"  
			"-state"
			":status"
			"-status"
			"-list-runs"
			"-testpatt" 
			"-testpatt"
                        "-mode"
                        "-tagexpr"
			"-itempatt"
			"-setlog"
			"-set-toplog"
			"-runstep"
			"-logpro"
			"-m"
			"-rerun"